Dawn Framework 1.0
Universal data acquisition framework for embedded systems
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
dawn::io_sdata_t< T, N, M, TS > Struct Template Reference

Static (compile-time) I/O data buffer (no timestamp). More...

#include <sdata.hxx>

Inherits io_data_cmn_t.

Public Member Functions

 io_sdata_t ()
 Constructor - initialize all data to zero.
 
size_t getBufferSize () const
 Get total buffer size in bytes.
 
void * getDataPtr (size_t batch=0)
 Get pointer to data only (same as getPtr for no-timestamp).
 
size_t getDataSize ()
 Get data size in bytes.
 
size_t getItems ()
 Get number of items per batch.
 
void * getPtr (size_t batch=0)
 Get pointer to batch (data only, no timestamp).
 
io_ts_tgetTs (size_t batch=0)
 Get timestamp reference (returns shared dummy).
 
bool hasTimestamp ()
 This buffer has no per-batch timestamp.
 
T & operator() (size_t index, size_t batch=0)
 Get data element by index and batch.
 
io_ts_toperator[] (size_t batch)
 Get timestamp (returns shared dummy).
 

Static Public Member Functions

static size_t getBatch ()
 Get number of batches.
 
static size_t getSize ()
 Get element size in bytes.
 

Public Attributes

io_data_nots_s< T, N > data [M]
 Array of M batches (each: N elements, no timestamp)
 
io_ts_t dummyTs
 Dummy timestamp for API compatibility.
 

Detailed Description

template<typename T, size_t N, size_t M = 1, bool TS = false>
struct dawn::io_sdata_t< T, N, M, TS >

Static (compile-time) I/O data buffer (no timestamp).

Definition at line 38 of file sdata.hxx.

Member Function Documentation

◆ getDataPtr()

template<typename T , size_t N, size_t M = 1, bool TS = false>
void * dawn::io_sdata_t< T, N, M, TS >::getDataPtr ( size_t  batch = 0)
inline

Get pointer to data only (same as getPtr for no-timestamp).

Parameters
batchBatch index (default 0).
Returns
Void pointer to data.

Definition at line 138 of file sdata.hxx.

References dawn::io_sdata_t< T, N, M, TS >::data.

◆ getDataSize()

template<typename T , size_t N, size_t M = 1, bool TS = false>
size_t dawn::io_sdata_t< T, N, M, TS >::getDataSize ( )
inline

Get data size in bytes.

Returns the size of a single data item (without timestamp).

Definition at line 114 of file sdata.hxx.

◆ getPtr()

template<typename T , size_t N, size_t M = 1, bool TS = false>
void * dawn::io_sdata_t< T, N, M, TS >::getPtr ( size_t  batch = 0)
inline

Get pointer to batch (data only, no timestamp).

Parameters
batchBatch index (default 0).
Returns
Void pointer to batch.

Definition at line 126 of file sdata.hxx.

References dawn::io_sdata_t< T, N, M, TS >::data.

◆ getTs()

template<typename T , size_t N, size_t M = 1, bool TS = false>
io_ts_t & dawn::io_sdata_t< T, N, M, TS >::getTs ( size_t  batch = 0)
inline

Get timestamp reference (returns shared dummy).

Parameters
batchBatch index (ignored).
Returns
Reference to dummy timestamp.

Definition at line 157 of file sdata.hxx.

References dawn::io_sdata_t< T, N, M, TS >::dummyTs.

◆ operator()()

template<typename T , size_t N, size_t M = 1, bool TS = false>
T & dawn::io_sdata_t< T, N, M, TS >::operator() ( size_t  index,
size_t  batch = 0 
)
inline

Get data element by index and batch.

Parameters
indexElement index within batch.
batchBatch index (default 0).
Returns
Reference to data element.

Definition at line 60 of file sdata.hxx.

References dawn::io_sdata_t< T, N, M, TS >::data.

◆ operator[]()

template<typename T , size_t N, size_t M = 1, bool TS = false>
io_ts_t & dawn::io_sdata_t< T, N, M, TS >::operator[] ( size_t  batch)
inline

Get timestamp (returns shared dummy).

Parameters
batchBatch index (ignored).
Returns
Reference to dummy timestamp.

Definition at line 74 of file sdata.hxx.

References dawn::io_sdata_t< T, N, M, TS >::dummyTs.


The documentation for this struct was generated from the following file: