adtf_file_library  0.13.1
Public Member Functions | List of all members
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. More...
 
virtual void setFlags (uint32_t flags)=0
 Set the Flags. More...
 
virtual void setSubStreamId (uint32_t substream_id)=0
 Set the Sub Stream Id, if needed. More...
 
virtual void * beginBufferWrite (size_t size)=0
 allocates the memory buffer for sample data More...
 
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. More...
 

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.

◆ 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:

Copyright © CARIAD SE.
Generated on Fri Apr 19 2024 by doxygen 1.9.1
GIT Commit Hash: 82d535f82776c20b12fc60740bdae991b62444a7