Default Sample implementation.
More...
#include <default_sample.h>
Default Sample implementation.
◆ addInfo()
void adtf_file::DefaultSample::addInfo |
( |
uint32_t |
key, |
|
|
DataType |
type, |
|
|
uint64_t |
raw_bytes |
|
) |
| |
|
overridevirtual |
Adds a additional sample information.
- Parameters
-
key | key for the sample information |
type | data type of the information |
raw_bytes | the raw value of the information |
Implements adtf_file::ReadSample.
◆ beginBufferRead()
std::pair<const void*, size_t> adtf_file::DefaultSample::beginBufferRead |
( |
| ) |
const |
|
overridevirtual |
Retrieve a pointer to the memory buffer for user data and size in bytes.
- Returns
- std::pair<const void*, size_t>
Implements adtf_file::WriteSample.
◆ beginBufferWrite()
void* adtf_file::DefaultSample::beginBufferWrite |
( |
size_t |
size | ) |
|
|
overridevirtual |
allocates the memory buffer for sample data
- Parameters
-
size | the memory to allocate in bytes |
- Returns
- void* the pointer to the memory
Implements adtf_file::ReadSample.
◆ getContent()
template<typename T >
const T& adtf_file::DefaultSample::getContent |
( |
| ) |
const |
|
inline |
Get the Content of the sample for trivially copyable types.
- Template Parameters
-
T | the type of the value trivially copyable |
- Returns
- const T& reference to the value
◆ getFlags()
uint32_t adtf_file::DefaultSample::getFlags |
( |
| ) |
const |
|
overridevirtual |
◆ GetInfo()
const std::unordered_map<uint32_t, std::pair<DataType, uint64_t> >& adtf_file::DefaultSample::GetInfo |
( |
| ) |
const |
Get the additional sample information.
- Returns
- a reference to the unordered map with value key and a adtf_file::Datatype - raw value pair
◆ getSubStreamId()
uint32_t adtf_file::DefaultSample::getSubStreamId |
( |
| ) |
const |
|
overridevirtual |
◆ getTimeStamp()
std::chrono::nanoseconds adtf_file::DefaultSample::getTimeStamp |
( |
| ) |
const |
|
overridevirtual |
◆ iterateInfo()
void adtf_file::DefaultSample::iterateInfo |
( |
std::function< void(uint32_t key, DataType type, uint64_t raw_bytes)> |
functor | ) |
const |
|
overridevirtual |
iterates all additional data information (if any) by calling the functor
- Parameters
-
functor | the function to call for each addition sample info value |
Implements adtf_file::WriteSample.
◆ setContent()
template<typename T >
void adtf_file::DefaultSample::setContent |
( |
const T & |
value | ) |
|
|
inline |
Set the Content of the sample for trivially copyable types.
- Template Parameters
-
T | the type of the value trivially copyable |
- Parameters
-
◆ setFlags()
void adtf_file::DefaultSample::setFlags |
( |
uint32_t |
flags | ) |
|
|
overridevirtual |
◆ setSubStreamId()
void adtf_file::DefaultSample::setSubStreamId |
( |
uint32_t |
substream_id | ) |
|
|
overridevirtual |
◆ setTimeStamp()
void adtf_file::DefaultSample::setTimeStamp |
( |
std::chrono::nanoseconds |
time_stamp | ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file: