adtf_file_library  0.13.1
Classes | Typedefs | Functions
adtfdat_processing Namespace Reference

namespace for ADTF DAT Processing library. More...

Classes

class  Demultiplexer
 
class  MultiFileReader
 Abstract base class for a multi reader. To use this class you need to override MultiFileReader::getFactories. More...
 
class  OffsetReaderWrapper
 
class  Multiplexer
 
class  Processor
 
class  SingleStreamProcessor
 
class  ProcessorFactory
 
class  ProcessorFactoryImplementation
 
class  ProcessorFactories
 
class  ReferencedFilesReader
 Reader implementation to read multiple files and its referenced files extension. 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 = 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.
 
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 TimeExtensionReaderFactory = adtf_file::ReaderFactoryImplementation< TimeExtensionReader >
 Default reader factory implementation for the MultiFileReader.
 

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. More...
 

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.

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.

Copyright © CARIAD SE.
Generated on Fri Apr 19 2024 by doxygen 1.9.1
GIT Commit Hash: 82d535f82776c20b12fc60740bdae991b62444a7