adtf_file_library  0.13.1
Public Member Functions | List of all members
adtfdat_processing::Multiplexer Class Reference

#include <multiplexer.h>

Public Member Functions

 Multiplexer (const std::string &destination_file_name, adtf_file::ADTFDatFileWriter::TargetADTFVersion target_adtf_version=adtf_file::ADTFDatFileWriter::TargetADTFVersion::adtf3ns, bool skip_stream_types_and_triggers=false)
 
void addStream (const std::shared_ptr< adtf_file::Reader > reader, const std::string &stream_name, const std::string &destination_stream_name, const std::shared_ptr< adtf_file::SampleSerializer > serializer)
 
void addExtension (const std::string &name, const void *extension_data, size_t extension_size, uint32_t user_id=0, uint32_t type_id=0, uint32_t version_id=0)
 
void process (const std::function< bool(double)> &progress_handler)
 

Detailed Description

This can multiplex multiple streams from multiple readers into a single ADTFDAT file.

Constructor & Destructor Documentation

◆ Multiplexer()

adtfdat_processing::Multiplexer::Multiplexer ( const std::string &  destination_file_name,
adtf_file::ADTFDatFileWriter::TargetADTFVersion  target_adtf_version = adtf_file::ADTFDatFileWriter::TargetADTFVersion::adtf3ns,
bool  skip_stream_types_and_triggers = false 
)

Initiallizes the multiplexer.

Parameters
[in]destination_file_nameThe output ADTFDAT filename.
[in]target_adtf_versionThe target file version.
[in]skip_stream_types_and_triggersWhether or not to pass on triggers and stream types to the writer.

Member Function Documentation

◆ addExtension()

void adtfdat_processing::Multiplexer::addExtension ( const std::string &  name,
const void *  extension_data,
size_t  extension_size,
uint32_t  user_id = 0,
uint32_t  type_id = 0,
uint32_t  version_id = 0 
)

Adds a new extension to the output

Parameters
[in]nameName of the extension
[in]extension_dataThe extension data.
[in]extension_sizeThe extension data size.
[in]user_idThe user id of the extension.
[in]type_idThe type id of the extension.
[in]version_idThe version id of the extension.

◆ addStream()

void adtfdat_processing::Multiplexer::addStream ( const std::shared_ptr< adtf_file::Reader reader,
const std::string &  stream_name,
const std::string &  destination_stream_name,
const std::shared_ptr< adtf_file::SampleSerializer serializer 
)

Adds a new stream to the output.

Parameters
[in]readerThe reader that the stream belongs to.
[in]stream_nameThe name of the stream.
[in]destination_stream_nameThe name of the stream in the output file.
[in]serializerThe serializer that is used to serialize the samples.

◆ process()

void adtfdat_processing::Multiplexer::process ( const std::function< bool(double)> &  progress_handler)

Performs the generation of the multiplexed file.

Parameters
[in,out]progress_handlerA callback that is called for each prosessed stream item. The value passed to thes method is in the range [0.0, 1.0]. Processing will be canceled if this returns false.

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