ADTF File Library
Loading...
Searching...
No Matches
adtfdat_processing Namespace Reference

namespace for ADTF DAT Processing library. More...

Namespaces

namespace  meta_info
 namespace for meta information
 

Classes

class  Demultiplexer
 
class  MultiFileReader
 Abstract base class for a multi reader. To use this class you need to override MultiFileReader::getFactories. More...
 
class  Multiplexer
 
class  OffsetReaderWrapper
 
class  Processor
 
class  ProcessorFactories
 
class  ProcessorFactory
 
class  ProcessorFactoryImplementation
 
class  ReferencedFilesReader
 Reader implementation to read multiple files and its referenced files extension. More...
 
class  SampleTimestampSanitizerReader
 Proxy Reader that ensures sample timestamps are monotonically increasing without reordering samples. Only fixes non-monotonic sample timestamps. The logged file remains invalid in general. In contrast to 'sorted_by_timestamps', which reorders items, this reader adjusts timestamps, but preserves the original order. Using the wrong reader may further corrupt the data.". More...
 
class  SingleStreamProcessor
 
class  SortingProxyReader
 Proxy Reader that allows you to sort items from delegate readers. More...
 
class  SortingReader
 Proxy reader that reorders items within a sliding window to restore timestamp order. Only fixes out-of-order items. The logged file remains invalid in general. In contrast to 'sample_timestamp_sanitizer', which adjusts non-monotonic sample timestamps, this reader reorders the items but preserves the original sample data. Using the wrong reader may further corrupt the data.". More...
 
class  StreamRenamingReader
 Proxy Reader that allows renaming input streams based on user-defined regex rules. More...
 
class  StreamsToSubstreamsReader
 Proxy Reader that merges all streams into a single stream with substreams. More...
 
class  TimeExtensionReader
 Proxy Reader that allows you to provide samples after the orignal reader has signal EOF. More...
 

Typedefs

template<typename ElementsType>
using element_callback
 Callback type for member elements.
 
using MultiFileReaderFactory = adtf_file::ReaderFactoryImplementation<MultiFileReader>
 Default reader factory implementation for the MultiFileReader.
 
using ReferencedFilesReaderFactory = adtf_file::ReaderFactoryImplementation<ReferencedFilesReader>
 Default reader factory implementation for the ReferencedFilesReader.
 
using SampleTimestampSanitizerReaderFactory = adtf_file::ReaderFactoryImplementation<SampleTimestampSanitizerReader>
 Default reader factory implementation for the SampleTimestampSanitizerReader.
 
using SortingReaderFactory = adtf_file::ReaderFactoryImplementation<SortingProxyReader>
 Default reader factory implementation for the SortingProxyReader.
 
using StreamRenamingReaderFactory = adtf_file::ReaderFactoryImplementation<StreamRenamingReader>
 Default reader factory implementation for the StreamRenamingReader.
 
using StreamsToSubstreamsReaderFactory = adtf_file::ReaderFactoryImplementation<StreamsToSubstreamsReader>
 Default reader factory implementation for the StreamsToSubstreamsReader.
 
using TimeExtensionReaderFactory = adtf_file::ReaderFactoryImplementation<TimeExtensionReader>
 Default reader factory implementation for the TimeExtensionReader.
 

Functions

std::tuple< std::string, std::string, bool > getMediaDescriptionFromStreamType (const std::shared_ptr< const adtf_file::StreamType > &stream_type)
 
std::shared_ptr< adtf_file::StreamTypecreateAdtfDefaultStreamType (const std::string &struct_name, const std::string &struct_definition, bool is_serialized=false)
 
std::tuple< ddl::codec::CodecFactory, bool > createDDLCodecFactoryFromStreamType (const std::shared_ptr< const adtf_file::StreamType > &stream_type)
 
template<typename ElementsType>
void for_each_leaf_element (ElementsType &elements, const element_callback< ElementsType > &callback)
 Iterates ALL leaf elements within ALL array elements.
 

Detailed Description

namespace for ADTF DAT Processing library.

The ADTF DAT Processing package will provide interfaces to export and process data (with adtfdat_processing::Processor) from/to a adtf_file::Stream of an .adtfdat file.

Typedef Documentation

◆ element_callback

template<typename ElementsType>
using adtfdat_processing::element_callback
Initial value:
std::function<void(std::conditional_t<std::is_const<ElementsType>::value,
const typename ElementsType::element_type,
typename ElementsType::element_type>&)>

Callback type for member elements.

Function Documentation

◆ createAdtfDefaultStreamType()

std::shared_ptr< adtf_file::StreamType > adtfdat_processing::createAdtfDefaultStreamType ( const std::string & struct_name,
const std::string & struct_definition,
bool is_serialized = false )
inline

Creates an adft/default stream type.

Parameters
[in]struct_nameThe name of the ddl struct.
[in]struct_definitionThe definition of the ddl struct.
[in]is_serializedIf data is serialized or not.
Returns
A stream type.

◆ createDDLCodecFactoryFromStreamType()

std::tuple< ddl::codec::CodecFactory, bool > adtfdat_processing::createDDLCodecFactoryFromStreamType ( const std::shared_ptr< const adtf_file::StreamType > & stream_type)
inline

creates a ddl codec factory from the given stream type

Parameters
[in]stream_typeThe stream type.
Returns
a codec factory and whether data is serialized or not.

◆ for_each_leaf_element()

template<typename ElementsType>
void adtfdat_processing::for_each_leaf_element ( ElementsType & elements,
const element_callback< ElementsType > & callback )

Iterates ALL leaf elements within ALL array elements.

Usage:

//description contains a data description where "my_struct" is defined
struct my_sub_struct
{
uint32_t sub_element[3];
uint32_t sub_element_after;
}
struct my_struct
{
my_sub_struct element[2];
}
ddl::codec::CodecFactory factory("my_struct", description);
for_each_leaf_element(factory.GetElements(),
[](const auto& element) {
std::cout << element.getFullName() << std::endl;
});
//following output:
//"element[0].sub_element[0]"
//"element[0].sub_element[1]"
//"element[0].sub_element[2]"
//"element[0].sub_element_after"
//"element[1].sub_element[0]"
//"element[1].sub_element[1]"
//"element[1].sub_element[2]"
//"element[1].sub_element_after"
void for_each_leaf_element(ElementsType &elements, const element_callback< ElementsType > &callback)
Iterates ALL leaf elements within ALL array elements.
Definition ddl_helpers.h:147
Template Parameters
ElementsTypeThe type of elements.
Parameters
elementsThe elements
callbackThe function to call per leaf element

◆ getMediaDescriptionFromStreamType()

std::tuple< std::string, std::string, bool > adtfdat_processing::getMediaDescriptionFromStreamType ( const std::shared_ptr< const adtf_file::StreamType > & stream_type)
inline

retrieves the media description from the given stream type

Parameters
[in]stream_typeThe stream type.
Returns
a tuple containing the struct name, the media description and whether data is serialized or not.