adtf_file_library  0.13.2
Public Member Functions | Static Public Attributes | List of all members
adtf_file::adtf3::SampleCopySerializer Class Reference

Standard Sample Copy Serializer implementation for ADTF 3 Samples with timestamps of microseconds resolution This serializer "only" memcpy the sample content from the sample data buffer adtf_file::WriteSample::beginBufferRead into the output stream. More...

#include <adtf3_sample_copy_serializer.h>

Inheritance diagram for adtf_file::adtf3::SampleCopySerializer:
[legend]
Collaboration diagram for adtf_file::adtf3::SampleCopySerializer:
[legend]

Public Member Functions

std::string getId () const override
 Get the Id of the sample serializer. More...
 
void setStreamType (const StreamType &stream_type) override
 Set the Stream Type and the serialization state of the serializer. More...
 
void serialize (const WriteSample &sample, OutputStream &stream) override
 Serializes the sample into the given stream. These samples usually are described by the previous set stream type. More...
 

Static Public Attributes

static constexpr const char * id = "sample_copy_serialization.serialization.adtf.cid"
 identifier for SampleCopyDeserializer and SampleCopySerializer
 

Detailed Description

Standard Sample Copy Serializer implementation for ADTF 3 Samples with timestamps of microseconds resolution This serializer "only" memcpy the sample content from the sample data buffer adtf_file::WriteSample::beginBufferRead into the output stream.

Remarks
This serialization since does not consider any byte order or platform dependent type sizes of the sample data content. Additionally, this impleemntation can not handle substream ids for samples. Please use adtf_file::adtf3::SampleCopySerializerNs instead.

Member Function Documentation

◆ getId()

std::string adtf_file::adtf3::SampleCopySerializer::getId ( ) const
overridevirtual

Get the Id of the sample serializer.

Returns
std::string

Implements adtf_file::SampleSerializer.

◆ serialize()

void adtf_file::adtf3::SampleCopySerializer::serialize ( const WriteSample sample,
OutputStream stream 
)
overridevirtual

Serializes the sample into the given stream. These samples usually are described by the previous set stream type.

Parameters
samplethe sample to serialize.
streamthe stream to write to.
Remarks
The serializer itself might have a serialization state depending on the setStreamType call.

Implements adtf_file::SampleSerializer.

◆ setStreamType()

void adtf_file::adtf3::SampleCopySerializer::setStreamType ( const StreamType stream_type)
overridevirtual

Set the Stream Type and the serialization state of the serializer.

Parameters
stream_typethe stream type describes all following samples of the serialize call

Implements adtf_file::SampleSerializer.


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

Copyright © CARIAD SE.
Generated on Mon Jun 10 2024 by doxygen 1.9.1
GIT Commit Hash: eb3af397a6b49ad6fcad9a60d8277d909b458b48