|
ADTF File Library
|
namespace for ADTF File library More...
Namespaces | |
| namespace | adtf2 |
| namespace for support of ADTF 2 files | |
| namespace | adtf3 |
| namespace for support of ADTF 3 files | |
| namespace | exceptions |
| namespace for exceptions | |
Classes | |
| class | ADTF2StreamTypeSerializer |
| ADTF2 stream type serializer interface class to write ADTF 2 stream types. More... | |
| class | ADTFDatFileReader |
| ADTF File Reader to deserialze and read the content of a ADTF DAT File. More... | |
| class | ADTFDatFileReaderFactory |
| Special Reader factory to make readers for "adtfdat" files. More... | |
| class | ADTFDatFileWriter |
| Default ADTF DAT File Writer to write an ADTF DAT File (IFHD file with ADTF type and sample content). More... | |
| class | Configurable |
| class | DefaultSample |
| Default Sample implementation. More... | |
| class | DefaultStreamType |
| Default stream type implementation. More... | |
| class | ExplicitReader |
| class | Extension |
| Extension class for file extension. These extension are i.e.: More... | |
| class | FileItem |
| class to create or read a file item. This file item is either a sample, streamtype or trigger. More... | |
| class | InputStream |
| interface class for input streams More... | |
| struct | LogEntry |
| Bundles all data associated with a single log event. More... | |
| class | Logger |
| Abstract sink for log messages produced by the adtf_file library. More... | |
| class | Object |
| base interface class for all available objects of the ADTF File Library that can be added to the objects singleton of the library ( getObjects ). More... | |
| class | Objects |
| container for objects. this object container can be retrieved as objects singleton of the library via getObjects More... | |
| class | OutputStream |
| Interface class for an output stream. More... | |
| class | PluginInitializer |
| Plugin initializer class to use within a ADTF File Library plugin. More... | |
| class | PropertyBuilder |
| The PropertyBuilder class is an easy way to define a property with additional meta information. Multiple properties can be easily linked to an entire configuration using the "+" operator. More... | |
| class | PropertyStreamType |
| The default interface class for stream types. More... | |
| struct | PropertyValue |
| PropertyValue variant class. More... | |
| class | Reader |
| class | ReaderFactories |
| class | ReaderFactory |
| Reader Factory interface to create a reader. More... | |
| class | ReaderFactoryImplementation |
| Default Reader factory implementation for readers using a standard default CTOR. More... | |
| class | ReadRawSampleInfo |
| interface class for reading sample information. More... | |
| class | ReadSample |
| Interface class for samples that are read from a Reader. More... | |
| class | ReferencedFilesExtension |
| Referenced File Extension Interpreter to hold a collection of file paths. This class is ables to read and write the collection of file paths as data content to a Reader extensions. More... | |
| class | Sample |
| Sample base class. More... | |
| class | sample_deserializer_factory |
| default implementation template for a SampleDeserializerFactory creating More... | |
| class | sample_factory |
template class for a sample factory to create sample with implementation type SAMPLE_CLASS More... | |
| class | sample_serializer_factory |
default implementation template for SampleSerializerFactory to create an instance of the serialzer type SERIALIZER More... | |
| class | SampleCopy |
| interface for copying the contents of one sample into another, probably sharing resources (such as the sample buffer) More... | |
| class | SampleDeserializer |
| Sample deserializer interface to deserialize a sample. More... | |
| class | SampleDeserializerFactories |
| container class for SampleDeserializerFactory More... | |
| class | SampleDeserializerFactory |
| SampleDeserializerFactory interface class. More... | |
| class | SampleFactory |
| Base class for a sample factory to create sample used by the Reader. More... | |
| class | SampleSerializer |
| Interface class for a sample serializer. Usually the implementaion has a serialization state depending on the last setStreamType call. More... | |
| class | SampleSerializerFactories |
| Container class for SampleSerializerFactory. More... | |
| class | SampleSerializerFactory |
| interface class for sample serializer More... | |
| class | SeekableReader |
| Interface for seekable Reader, where the file position can be adapted. More... | |
| struct | SourceLocation |
| Identifies the source code location where a log message was emitted. More... | |
| class | StandardReader |
| Standard Reader class to use the ADTFDatFileReader in default way. More... | |
| class | StandardSampleDeserializers |
| Default container with all SampleDeserializer factories provided by the ADTF File Library. More... | |
| class | StandardSampleSerializers |
| Default container with all SampleSerializer factories provided by the ADTF File Library. More... | |
| class | StandardTypeDeserializers |
| Default container with all StreamTypeDeserializer provided by the ADTF File Library. More... | |
| class | Stream |
class to create and describe a stream within a adtf_file::Reader. Each stream has an identifier stream_id. This stream_id is used to mark a corresponding FileItem More... | |
| class | stream_type_factory |
template class for a streamtype factory to create streamtypes with implementation type STREAM_TYPE_CLASS More... | |
| class | StreamItem |
| base class for either a sample, streamtype or trigger. Following stream items are possible: More... | |
| class | StreamType |
| Stream Type base class. More... | |
| class | StreamTypeDeserializer |
| StreamType deserializer interface to deserialize a stream type. More... | |
| class | StreamTypeDeserializers |
| container class for StreamTypeDeserializers More... | |
| class | StreamTypeFactory |
| Base class for a streamtype factory to create streamtypes used by the Reader. More... | |
| class | StreamTypeSerializer |
| interface class for stream type serializers. More... | |
| class | StreamTypeSerializers |
| Container class for StreamTypeSerializer. More... | |
| class | Trigger |
| Trigger base class. More... | |
| class | WriteRawSampleInfo |
| interface class for writing sample information. More... | |
| class | WriteSample |
| Interface class for samples that are written. More... | |
Typedefs | |
| using | Configuration = std::unordered_map<std::string, PropertyValue> |
| Configuration class as set of key - property value pairs This configuration is used to adjust the readers and processors behaviour. | |
Enumerations | |
| enum class | LogLevel : uint8_t { None = 0 , Error = 10 , Warning = 20 , Info = 30 , Detail = 35 , Dump = 40 , Debug = Dump , All = 0xFF } |
| Severity levels for log messages, ordered from least to most verbose. More... | |
| enum class | DataType { uint8 , int8 , uint16 , int16 , uint32 , int32 , uint64 , int64 , float32 , float64 } |
| data type id for the adtf_file::ReadSample::addInfo call. | |
| enum | SampleInfoKeys : uint32_t { sai_device_original_time = 1851393682 , sai_counter = 1660111993 } |
| predefefined keys for the adtf_file::ReadSample::addInfo call. | |
Functions | |
| std::string | getShortDescription (const std::string &description) |
helper fuction to retrieve short description out of description | |
| std::string | getLongDescription (const std::string &description) |
helper fuction to retrieve long description out of description | |
| bool | operator== (const PropertyValue &left, const PropertyValue &right) |
| compare operator for PropertyValue | |
| Configuration | operator+ (const Configuration &config_left, const Configuration &config_right) |
| Add operator for configurations. | |
| template<typename T> | |
| T | getPropertyValue (const Configuration &configuration, const std::string &property_name) |
| template<typename T> | |
| T | getPropertyValue (const Configuration &configuration, const std::string &property_name, const T &default_value) |
| Configuration | getSubConfiguration (const Configuration &configuration, const std::string &property_name, bool top_level_reserved_properties=false) |
| Get a sub-tree of a configuration property. | |
| template<typename T> | |
| void | setPropertyValue (Configuration &configuration, const std::string &property_name, const T &property_value) |
| void | setFilePluginVersion (Configuration &configuration, const std::string &version) |
| void | setFilePluginDescription (Configuration &configuration, const std::string &description) |
| void | setPropertyDescription (Configuration &configuration, const std::string &property_name, const std::string &description) |
| void | setPropertyDisplayName (Configuration &configuration, const std::string &property_name, const std::string &display_name) |
| template<typename T> | |
| void | setPropertyValueRange (Configuration &configuration, const std::string &property_name, const T &min, const T &max) |
| template<typename T> | |
| void | setPropertyValueList (Configuration &configuration, const std::string &property_name, const std::vector< std::pair< T, std::string > > &value_list, bool restrict_to_values=true) |
| Logger & | getLogger () noexcept |
| Returns the active logger used by the library. | |
| Logger & | getDefaultLogger () noexcept |
| Returns the built-in default logger. | |
| bool | getTerminalColorSupport (FILE *output) noexcept |
| Queries whether the current terminal supports ANSI color sequences. | |
| std::string | defaultLogFormat (std::chrono::system_clock::time_point timestamp, LogLevel log_level, std::string_view message, SourceLocation location, bool bWithColor) noexcept |
| Formats a log event into a human-readable string. | |
| Objects & | getObjects () |
| Get the objects singleton of the library. | |
| template<typename FACTORIES, typename FACTORY_TYPE> | |
| FACTORIES | getFactories () |
| Get the Factories from the objects singleton of the library. | |
| void | loadPlugin (const std::string &file_name) |
| Loads a ADTF File Library plugin. | |
| Stream | findStream (const Reader &reader, const std::string &stream_name) |
| std::chrono::nanoseconds | getFirstTimeOfStreams (const std::vector< Stream > &streams) |
| Get the First Time Of the given Streams. | |
| std::chrono::nanoseconds | getLastTimeOfStreams (const std::vector< Stream > &streams) |
| Get the Last Time Of the given Streams. | |
| ReaderFactories | getReaderFactories () |
| Get the Reader Factories from the Objects instance. | |
| uint32_t | createSampleInfoHashKey (const std::string &name) |
| Create a Sample Info Hash Key. | |
| uint32_t | createAdtf2SampleInfoHashKey (uint32_t info_index) |
| Create a Adtf2 Sample Info Hash Key. | |
| void | copy_sample (adtf_file::Sample &destination, const std::shared_ptr< const Sample > &source) |
| void | add_standard_objects () |
| Adds all default implementation objects provided by the ADTF File Library. | |
| std::string | fractional_value_to_string (const int64_t fractional_value, std::optional< size_t > fixed_precision={}) |
| Converts the decimal part of a floating point number given as an integer value into a string. | |
| std::chrono::nanoseconds | parseTimestamp (const std::string &strTimestamp) |
| General parser for timestamps in several formats (ISO-8601, number+unit). | |
| std::chrono::time_point< std::chrono::system_clock, std::chrono::nanoseconds > | parseIsoTimestamp (const std::string &strTimestamp) |
| Convert ISO 8601 string to timestamp in nanoseconds of system_clock ( high performance clock ). e.g. 2024-09-26T23:59:59Z e.g. 2024-09-26T23:59:59.123456789Z. | |
| std::string | createIsoTimestampString (const std::chrono::nanoseconds &nanos, std::optional< size_t > fixed_precision={}, bool local_time=false) |
| Format ISO 8601 string from a 'std.chrono.nanoseconds' param. | |
| std::string | createDurationString (std::chrono::nanoseconds const ns, std::optional< size_t > fixed_precision={}) |
| Create string in seconds (and fractions) and without unit postfix. | |
namespace for ADTF File library
The ADTF File package with 'adtf_file::ADTFDatFileWriter' and 'adtf_file::ADTFDatFileReader'. Depending on the ADTF File version you may create and read indexed files with samples.
|
strong |
Severity levels for log messages, ordered from least to most verbose.
| Enumerator | |
|---|---|
| None | Logging disabled; no messages are emitted. |
| Error | Unrecoverable errors that require immediate attention. |
| Warning | Potentially harmful situations that do not abort processing. |
| Info | General informational messages about normal operation. |
| Detail | More detailed operational messages for diagnostics. |
| Dump | Verbose data dumps for deep troubleshooting. |
| Debug | Alias for Dump. |
| All | Enable all log levels. |
| void adtf_file::copy_sample | ( | adtf_file::Sample & | destination, |
| const std::shared_ptr< const Sample > & | source ) |
Copies all information from one sample to another
| destination | The sample that all data should be copied to. |
| source | The sample that all data should be copied from. |
| uint32_t adtf_file::createAdtf2SampleInfoHashKey | ( | uint32_t | info_index | ) |
| std::string adtf_file::createDurationString | ( | std::chrono::nanoseconds const | ns, |
| std::optional< size_t > | fixed_precision = {} ) |
Create string in seconds (and fractions) and without unit postfix.
| [in] | ns | Duration in nanoseconds |
| [in] | fixed_precision | If set, this number of decimal places is returned. If not set, only the significant digits are returned (trailing zeros are truncated, maximum 9 digits). |
| std::string adtf_file::createIsoTimestampString | ( | const std::chrono::nanoseconds & | nanos, |
| std::optional< size_t > | fixed_precision = {}, | ||
| bool | local_time = false ) |
Format ISO 8601 string from a 'std.chrono.nanoseconds' param.
| [in] | nanos | NanoSeconds |
| [in] | fixed_precision | If set, this number of decimal places is returned. |
| [in] | local_time | If set, generate a timestamp representing local time instead of GMT. If not set, only the significant digits are returned (trailing zeros are truncated, maximum 9 digits). |
| uint32_t adtf_file::createSampleInfoHashKey | ( | const std::string & | name | ) |
|
noexcept |
Formats a log event into a human-readable string.
Produces a single line suitable for printing to a terminal or log file. Used internally by the default logger.
| timestamp | Wall-clock time of the event. |
| log_level | Severity of the message. |
| message | Human-readable description of the event. |
| location | Source code location that produced the message. |
| bWithColor | If true, ANSI color escape codes are embedded in the output. |
Method to find a stream of a reader.
| [in] | reader | The reader. |
| [in] | stream_name | The name of the stream to look for. |
| std::string adtf_file::fractional_value_to_string | ( | const int64_t | fractional_value, |
| std::optional< size_t > | fixed_precision = {} ) |
Converts the decimal part of a floating point number given as an integer value into a string.
| fractional_value | decimal part. |
| fixed_precision | If set, this number of decimal places is returned. If not set, only the significant digits are returned (trailing zeros are truncated, maximum 9 digits). |
|
noexcept |
Returns the built-in default logger.
The default logger writes formatted messages to stdout using defaultLogFormat(). It is always available regardless of whether a custom logger has been injected.
| FACTORIES adtf_file::getFactories | ( | ) |
Get the Factories from the objects singleton of the library.
| FACTORIES | the factories container type to add the found factories to |
| FACTORY_TYPE | the factory type to search for |
FACTORY_TYPE | std::chrono::nanoseconds adtf_file::getFirstTimeOfStreams | ( | const std::vector< Stream > & | streams | ) |
Get the First Time Of the given Streams.
| streams | The streams vector |
| std::chrono::nanoseconds adtf_file::getLastTimeOfStreams | ( | const std::vector< Stream > & | streams | ) |
Get the Last Time Of the given Streams.
| streams | The streams vector |
|
noexcept |
Returns the active logger used by the library.
By default this returns the same instance as getDefaultLogger(). Plugins may redirect it to a host-provided logger via adtfFileSetLogger().
|
inline |
helper fuction to retrieve long description out of description
| description | the decription to retrieve from |
| Objects & adtf_file::getObjects | ( | ) |
Get the objects singleton of the library.
| T adtf_file::getPropertyValue | ( | const Configuration & | configuration, |
| const std::string & | property_name ) |
Access property values and convert them to a specific type of T.
| [in] | configuration | The configuration. |
| [in] | property_name | The name of the property. |
| T | the type to convert to. |
| std::runtime_error | if property_name does not exists or conversion is not possible |
| T adtf_file::getPropertyValue | ( | const Configuration & | configuration, |
| const std::string & | property_name, | ||
| const T & | default_value ) |
Access property values and convert it to a specific type of T. If property_name is not found the default_value is returned
| [in] | configuration | The configuration. |
| [in] | property_name | The name of the property. |
| [in] | default_value | the default value if property not set. |
| T | the type to convert to. |
| std::runtime_error | if conversion is not possible |
| ReaderFactories adtf_file::getReaderFactories | ( | ) |
Get the Reader Factories from the Objects instance.
|
inline |
helper fuction to retrieve short description out of description
| description | the decription to retrieve from |
|
inline |
Get a sub-tree of a configuration property.
| [in] | configuration | The source configuration. |
| [in] | property_name | The name of the property of which the sub-properties should be returned. |
| [in] | top_level_reserved_properties | Whether or not to include reserved direct sub-properties of 'property_name'. |
|
noexcept |
Queries whether the current terminal supports ANSI color sequences.
| output | The output to check for color support |
true if color output is supported, false otherwise. | void adtf_file::loadPlugin | ( | const std::string & | file_name | ) |
Loads a ADTF File Library plugin.
| file_name | The path to the shared object providing a ADTF File Library plugin interface. |
loadPlugin !
|
inline |
Add operator for configurations.
| config_left | the left configuration |
| config_right | the right configuration to add |
|
inline |
compare operator for PropertyValue
| left | the left value |
| right | the right value |
| std::chrono::time_point< std::chrono::system_clock, std::chrono::nanoseconds > adtf_file::parseIsoTimestamp | ( | const std::string & | strTimestamp | ) |
Convert ISO 8601 string to timestamp in nanoseconds of system_clock ( high performance clock ). e.g. 2024-09-26T23:59:59Z e.g. 2024-09-26T23:59:59.123456789Z.
| [in] | strTimestamp | A string possibly containing an ISO 8601 timestamp. |
Timestamps are absolute and cannot be negative. Timestamps are either in GMT/UTC-0 (with Z postfix) or localtime. No other timezones are supported.
| std::chrono::nanoseconds adtf_file::parseTimestamp | ( | const std::string & | strTimestamp | ) |
General parser for timestamps in several formats (ISO-8601, number+unit).
| [in] | strTimestamp | A string possibly containing a timestamp. |
|
inline |
Set description to adtffileplugin
| [in] | configuration | The configuration. |
| [in] | description | The description for the adtffileplugin. |
|
inline |
Set version to adtffileplugin
| [in] | configuration | The configuration. |
| [in] | version | The version for the adtffileplugin. |
|
inline |
Set description to property
| [in] | configuration | The configuration. |
| [in] | property_name | The name of the property. |
| [in] | description | The description for the property. |
|
inline |
Set alternate display name to property
| [in] | configuration | The configuration. |
| [in] | property_name | The name of the property. |
| [in] | display_name | The alternate display name for the property. |
| void adtf_file::setPropertyValue | ( | Configuration & | configuration, |
| const std::string & | property_name, | ||
| const T & | property_value ) |
Inserts or assigns the given property_value
| [in] | configuration | The configuration. |
| [in] | property_name | The name of the property. |
| [in] | property_value | The value to set. |
| T | The type of the property_value. See PropertyValue CTORs |
| void adtf_file::setPropertyValueList | ( | Configuration & | configuration, |
| const std::string & | property_name, | ||
| const std::vector< std::pair< T, std::string > > & | value_list, | ||
| bool | restrict_to_values = true ) |
Allow and set value list to property
| [in] | configuration | The configuration. |
| [in] | property_name | The name of the property. |
| [in] | value_list | The value list. |
| [in] | restrict_to_values | Restrict if list is extendable. |
| T | the type to convert to. |
| void adtf_file::setPropertyValueRange | ( | Configuration & | configuration, |
| const std::string & | property_name, | ||
| const T & | min, | ||
| const T & | max ) |
Define a value range for a property
| [in] | configuration | The configuration. |
| [in] | property_name | The name of the property. |
| [in] | min | The lower limit. |
| [in] | max | The upper limit. |
| T | the type to convert to. |