ADTF File Library
Loading...
Searching...
No Matches
adtf_file::ReadSample Class Referenceabstract

Interface class for samples that are read from a Reader. More...

#include <sample.h>

Inheritance diagram for adtf_file::ReadSample:
[legend]

Public Member Functions

virtual void setTimeStamp (std::chrono::nanoseconds time_stamp)=0
 Set the Time Stamp.
 
virtual void setFlags (uint32_t flags)=0
 Set the Flags.
 
virtual void setSubStreamId (uint32_t substream_id)=0
 Set the Sub Stream Id, if needed.
 
virtual void * beginBufferWrite (size_t size)=0
 allocates the memory buffer for sample data
 
virtual void endBufferWrite ()=0
 ends writing to the memory allocated with beginBufferWrite
 
virtual void addInfo (uint32_t key, DataType type, uint64_t raw_bytes)=0
 Adds a additional sample information.
 

Detailed Description

Interface class for samples that are read from a Reader.

Remarks
This class must be supported by each SampleDeserializer implementations.

Member Function Documentation

◆ addInfo()

virtual void adtf_file::ReadSample::addInfo ( uint32_t key,
DataType type,
uint64_t raw_bytes )
pure virtual

Adds a additional sample information.

Parameters
keykey for the sample information
typedata type of the information
raw_bytesthe raw value of the information

Implemented in adtf_file::DefaultSample.

◆ beginBufferWrite()

virtual void * adtf_file::ReadSample::beginBufferWrite ( size_t size)
pure virtual

allocates the memory buffer for sample data

Parameters
sizethe memory to allocate in bytes
Returns
void* the pointer to the memory
Remarks
usually it write locks the buffer, do not forget to call endBufferWrite

Implemented in adtf_file::DefaultSample.

◆ endBufferWrite()

virtual void adtf_file::ReadSample::endBufferWrite ( )
pure virtual

ends writing to the memory allocated with beginBufferWrite

Implemented in adtf_file::DefaultSample.

◆ setFlags()

virtual void adtf_file::ReadSample::setFlags ( uint32_t flags)
pure virtual

Set the Flags.

Parameters
flags

Implemented in adtf_file::DefaultSample.

◆ setSubStreamId()

virtual void adtf_file::ReadSample::setSubStreamId ( uint32_t substream_id)
pure virtual

Set the Sub Stream Id, if needed.

Parameters
substream_id

Implemented in adtf_file::DefaultSample.

◆ setTimeStamp()

virtual void adtf_file::ReadSample::setTimeStamp ( std::chrono::nanoseconds time_stamp)
pure virtual

Set the Time Stamp.

Parameters
time_stamp

Implemented in adtf_file::DefaultSample.


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