adtf_file_library  0.13.1
Public Member Functions | List of all members
adtf_file::WriteSample Class Referenceabstract

Interface class for samples that are written. More...

#include <sample.h>

Inheritance diagram for adtf_file::WriteSample:
[legend]

Public Member Functions

virtual std::chrono::nanoseconds getTimeStamp () const =0
 Get the Time Stamp. More...
 
virtual uint32_t getFlags () const =0
 Get the Flags. More...
 
virtual uint32_t getSubStreamId () const =0
 Get the Sub Stream Id if set. More...
 
virtual std::pair< const void *, size_t > beginBufferRead () const =0
 Retrieve a pointer to the memory buffer for user data and size in bytes. More...
 
virtual void endBufferRead () const =0
 Ends reading from memory buffer retruned by beginBufferRead.
 
virtual void iterateInfo (std::function< void(uint32_t key, DataType type, uint64_t raw_bytes)> functor) const =0
 iterates all additional data information (if any) by calling the functor More...
 

Detailed Description

Interface class for samples that are written.

Remarks
This class must be supported by each SampleSerializer implementations.

Member Function Documentation

◆ beginBufferRead()

virtual std::pair<const void*, size_t> adtf_file::WriteSample::beginBufferRead ( ) const
pure virtual

Retrieve a pointer to the memory buffer for user data and size in bytes.

Returns
std::pair<const void*, size_t>
Remarks
usually it shared locks the buffer, do not forget to call endBufferRead

Implemented in adtf_file::DefaultSample.

◆ getFlags()

virtual uint32_t adtf_file::WriteSample::getFlags ( ) const
pure virtual

Get the Flags.

Returns
uint32_t

Implemented in adtf_file::DefaultSample.

◆ getSubStreamId()

virtual uint32_t adtf_file::WriteSample::getSubStreamId ( ) const
pure virtual

Get the Sub Stream Id if set.

Returns
uint32_t

Implemented in adtf_file::DefaultSample.

◆ getTimeStamp()

virtual std::chrono::nanoseconds adtf_file::WriteSample::getTimeStamp ( ) const
pure virtual

Get the Time Stamp.

Returns
the time stamp of the sample

Implemented in adtf_file::DefaultSample.

◆ iterateInfo()

virtual void adtf_file::WriteSample::iterateInfo ( std::function< void(uint32_t key, DataType type, uint64_t raw_bytes)>  functor) const
pure virtual

iterates all additional data information (if any) by calling the functor

Parameters
functorthe function to call for each addition sample info value

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