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

#include <demultiplexer.h>

Public Member Functions

 Demultiplexer (std::shared_ptr< adtf_file::Reader > reader, const ProcessorFactories &processor_factories)
 
void addProcessor (const std::string &stream_name, const std::string &processor_id, const std::string &destination_url, const adtf_file::Configuration &configuration)
 
void addProcessor (const std::string &stream_name, const std::string &substream_name, const std::string &processor_id, const std::string &destination_url, const adtf_file::Configuration &configuration)
 
void process (const std::function< bool(double)> &progress_handler={})
 

Detailed Description

This one demultiplexes the streams of an ADTFDAT file (or any other adtf_file::Reader), and passes the stream items to Processor implementations.

Constructor & Destructor Documentation

◆ Demultiplexer()

adtfdat_processing::Demultiplexer::Demultiplexer ( std::shared_ptr< adtf_file::Reader reader,
const ProcessorFactories processor_factories 
)

Initializes the demultiplexer

Parameters
[in]readerThe source reader.
[in]processor_factoriesFactories for processors, these are used by addProcessor.

Member Function Documentation

◆ addProcessor() [1/2]

void adtfdat_processing::Demultiplexer::addProcessor ( const std::string &  stream_name,
const std::string &  processor_id,
const std::string &  destination_url,
const adtf_file::Configuration configuration 
)

Adds a processor for a given stream.

Parameters
[in]stream_nameThe name of the stream.
[in]processor_idThe identifier of the processor implementation.
[in]destination_urlThe output URL.
[in]configurationThe configuration of the processor.

◆ addProcessor() [2/2]

void adtfdat_processing::Demultiplexer::addProcessor ( const std::string &  stream_name,
const std::string &  substream_name,
const std::string &  processor_id,
const std::string &  destination_url,
const adtf_file::Configuration configuration 
)

Adds a processor for a given substream.

Parameters
[in]stream_nameThe name of the stream.
[in]substream_nameThe name of the substream within stream.
[in]processor_idThe identifier of the processor implementation.
[in]destination_urlThe output URL.
[in]configurationThe configuration of the processor.

◆ process()

void adtfdat_processing::Demultiplexer::process ( const std::function< bool(double)> &  progress_handler = {})

Processes all selected streams.

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