ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
adtf::base Namespace Reference

Namespace for the ADTF Base SDK. More...

Namespaces

namespace  ant
 Namespace for all functionality of the ADTF Base SDK provided since v3.0.
 
namespace  catwo
 Namespace for all functionality of the ADTF Base SDK provided since v3.2.
 
namespace  elasto
 Namespace for all functionality of the ADTF Base SDK provided since v3.4.
 
namespace  flash
 Namespace for all functionality of the ADTF Base SDK provided since v3.5.
 
namespace  giant
 Namespace for all functionality of the ADTF Base SDK provided since v3.6.
 
namespace  hollow
 Namespace for all functionality of the ADTF Base SDK provided since v3.7.
 
namespace  joker
 Namespace for all functionality of the ADTF Base SDK provided since v3.9.
 
namespace  lucky
 Namespace for all functionality of the ADTF Base SDK provided since v3.11.
 
namespace  penguin
 Namespace for all functionality of the ADTF Base SDK provided since v3.15.
 
namespace  quiet
 Namespace for all functionality of the ADTF Base SDK provided since v3.16.
 
namespace  spider
 Namespace for all functionality of the ADTF Base SDK provided since v3.18.
 
namespace  ultron
 Namespace for all functionality of the ADTF Base SDK provided since v3.20.
 

Classes

class  adtf_memory
 Template class implementation for the IRawMemory interface (see Supported types for adtf_memory<T> for writing and reading Samples). More...
 
class  adtf_memory_buffer
 bring latest ant::adtf_memory_buffer to users scope More...
 
struct  adtf_memory_forward
 Concept template class for non trivial adtf_memory types of type T to specialize the usage of adtf_memory<T> (see Supported types for adtf_memory<T> for writing and reading Samples). More...
 
class  adtf_memory_trivial_type
 Template class implementation for the IRawMemory interface for trivial types. More...
 
class  adtf_string
 Wrapping template for a rvalue reference of an IString interface for the type T (see Supported types for adtf_string<T> for writing and reading strings via interface IString). More...
 
struct  adtf_string_forward
 Implementation concept template for user defined adtf_string type support (see Supported types for adtf_string<T> for writing and reading strings via interface IString). More...
 
struct  adtf_version_customer
 Static Version type for the ADTF Versions which is enriched with a customer version. More...
 
struct  adtf_version_default
 Static Version type for the ADTF Versions. More...
 
class  cADTFRuntime
 
class  cConfiguration
 Implements all functionality required by ant::IConfiguration. More...
 
class  cErrorChecker
 Error checker implementation for easy use of the error handler IErrorHandler. More...
 
class  cErrorHandler
 Base class for implementing error handlers. More...
 
class  configuration
 Implementation helper template to enriches an implementation with the default implementation of IConfiguration. More...
 
class  cProperties
 
class  cPropertiesHelper
 Helper to create a copy. More...
 
class  cProperty
 
struct  cPropertyStringConversion
 Conversion type used for property<cString> More...
 
class  cPropertyValue
 
class  cRawMemoryRedirect
 
class  cRunnable
 Empty Runnable helper implementation. More...
 
class  cStringRedirect
 
class  hash_value_map
 implementation of the IHashValueMap. More...
 
class  IADTFRuntime
 Interface for accessing additional funcionality within the ADTF runtime. More...
 
class  IConfiguration
 ucom Interface to a objects configuration. More...
 
class  IErrorHandling
 Error handling interface. More...
 
class  IProperties
 Defintion of a property set container interface. More...
 
class  IProperty
 The IProperty interface provides methods for getting and setting property values, name of the property and its subproperties. More...
 
class  IPropertyObserver
 Observer Interface to react on property changes. More...
 
class  IPropertyValue
 The IPropertyValue interface provides methods for getting and setting property values. More...
 
class  IRawMemory
 The IRawMemory interface provides methods for getting and setting memory values through abstract interfaces. More...
 
class  IRunnable
 The Runnable interface defines common methods for a running component. More...
 
class  IString
 The IString interface provides methods for getting and setting strings through abstract interfaces. More...
 
class  property
 
struct  property_attached_configuration_type
 
struct  property_type_conversion
 Concept template to define the conversion type for the given type TYPE of a property. More...
 
struct  property_type_default_conversion
 Default conversion type used for all build in property types of adtf. More...
 
struct  property_type_definition
 Concept template to define the Name and the conversion type for the given type TYPE. More...
 
class  property_value
 
class  property_variable
 Property Variable template for the given T. More...
 
class  runnable
 
struct  tNanoSeconds
 A timestamp with nanosecond precision. More...
 
struct  tree_node_property_type
 Property type that creates a property that functions as a container for subproperties only. More...
 

Typedefs

using cRuntime = cADTFRuntime
 Type definition for the Default Runtime of ADTF.
 
using IHashValueMap = ant::IHashValueMap
 

Enumerations

enum  tADTFRunLevel
 The ADTF Runtime Level State are used to define a ADTF Runtime specialization for a adtf::ucom::ant::runtime. More...
 

Functions

template<typename DestinationTimeStamp, typename SourceTimeStamp>
DestinationTimeStamp duration_cast (const SourceTimeStamp &)
 Duration cast base template to converted between different time resolution.
 
template<typename VALUETYPE>
VALUETYPE get_property (const IConfiguration &oConfiguration, const char *strNameOfValue, VALUETYPE oDefaultValue)
 Get the property content converted to the VALUETYPE.
 
template<typename VALUETYPE>
tResult set_property (IConfiguration &oConfiguration, const char *strNameOfValue, VALUETYPE oValue)
 Set the property.
 
template<typename VALUETYPE>
tResult set_property_by_path (IConfiguration &oConfiguration, const char *strPathAndName, VALUETYPE oValue)
 
template<typename VALUETYPE>
VALUETYPE get_property_by_path (const IConfiguration &oConfiguration, const char *strPathAndName, VALUETYPE oDefaultValue)
 
tResult get_property_object_by_path (const ant::IConfiguration &oConfiguration, const char *strPropertyPathAndName, ant::IProperty &oProperty)
 Retrieves a property reference under the given oConfiguration by path.
 
ucom::ant::object_ptr< IErrorHandling::IErrorHandlercreate_error_handler (const char *strErrorSource, const char *strErrorCategory, IErrorHandling::tAction eDefaultAction)
 Creates a new error handler.
 
void handle_error (const char *strErrorSource, const char *strErrorCategory, IErrorHandling::tAction eDefaultAction, tResult oError)
 Convenience method to report an error for short lived objects.
 
std::string nested_exceptions_to_string (const std::exception &error)
 Formats nested std::exceptions into a string, line by line.
 
std::string current_exception_to_string ()
 Trys to format the current exception into a string.
 
tResult current_exception_to_result ()
 Converts the current exception object into a tResult.
 
IHashValueMap::tHashKey create_hash_value_key (const char *strToHash)
 Generation of unambigious hash key for a string.
 
adtf::util::cVariant get_hash_value (const IHashValueMap &oMap, const IHashValueMap::tHashKey &oHash, const adtf::util::cVariant oDefault)
 Retrieves a variant value for the hash key oHash out of the hashed value map oMap.
 
tResult set_hash_value (IHashValueMap &oMap, const IHashValueMap::tHashKey &oHash, const adtf::util::cVariant oValue)
 Sets a variant value for the hash key oHash into the hashed value map oMap.
 
template<typename T>
tResult get_property_value (const IPropertyValue &oValue, T &xValue)
 
template<typename VALUETYPE>
tResult set_property (IConfiguration &oConfiguration, const char *strNameOfValue, VALUETYPE oValue)
 Set the property.
 
template<typename VALUETYPE>
VALUETYPE get_property (const IConfiguration &oConfiguration, const char *strNameOfValue, VALUETYPE oDefaultValue)
 Get the property content converted to the VALUETYPE.
 
template<typename VALUETYPE>
tResult set_property_by_path (IConfiguration &oConfiguration, const char *strPathAndName, VALUETYPE oValue)
 
template<typename VALUETYPE>
VALUETYPE get_property_by_path (const IConfiguration &oConfiguration, const char *strPathAndName, VALUETYPE oDefaultValue)
 
tResult get_property_object_by_path (const ant::IConfiguration &oConfiguration, const char *strPropertyPathAndName, ant::IProperty &oProperty)
 Retrieves a property reference under the given oConfiguration by path.
 
std::pair< std::string, std::string > split_parents_and_leaf (const char *strPropertyPathAndName)
 Splits a property path into the parent path and the property name.
 
tResult create_property_tree (ant::IProperties &oProperties, const char *strPath)
 Creates a property tree structure.
 
void visit_properties (const ant::IProperties &oProperties, const tPropertyVisitorCallback &fnCallback)
 Utility function to visit all properties of a properties object.
 
void visit_sub_properties (const ant::IProperty &oProperty, const tPropertyVisitorCallback &fnCallback)
 Utility function to visit all sub-properties of a given property.
 
tResult visit_property (const ant::IProperties &oProperties, const char *strPropertyName, const std::function< tResult(const IProperty &oProperty)> &fnCallback)
 
tResult visit_property_by_path (const ant::IProperties &oProperties, const char *strPropertyPathAndName, const std::function< tResult(const IProperty &oProperty)> &fnCallback)
 
tResult is_equal (const ant::IProperties &oLeftProperties, const ant::IProperties &oRightProperties)
 Check if two property sets are equal.
 

Detailed Description

Namespace for the ADTF Base SDK.

Within this namespace all interfaces, classes and functions always refer to their last revised implementation. When using types defined within this namespace it is guaranteed to always use the latest version of the types.

Typedef Documentation

◆ cRuntime

Type definition for the Default Runtime of ADTF.

Definition at line 151 of file adtf_runtime.h.

◆ IHashValueMap

Definition at line 152 of file hashedvaluemap_intf.h.

Enumeration Type Documentation

◆ tADTFRunLevel

enum tADTFRunLevel : int8_t

The ADTF Runtime Level State are used to define a ADTF Runtime specialization for a adtf::ucom::ant::runtime.

See System Definition to understand runlevels of ADTF.

Definition at line 23 of file adtf_runtime.h.

Function Documentation

◆ create_error_handler()

ucom::ant::object_ptr< IErrorHandling::IErrorHandler > create_error_handler ( const char * strErrorSource,
const char * strErrorCategory,
IErrorHandling::tAction eDefaultAction )

Creates a new error handler.

This works both if an error handling service is available or not.

Parameters
[in]strErrorSourceThe name of the error source.
[in]strErrorCategoryThe name of the error category.
[in]eDefaultActionThe default action that should be taken if an error occurs.
Returns
pHandler The new handler.

Referenced by cErrorChecker::cErrorChecker().

◆ create_hash_value_key()

IHashValueMap::tHashKey create_hash_value_key ( const char * strToHash)

Generation of unambigious hash key for a string.

This generation is independent to process and platform.

Parameters
[in]strToHashnull terminated string to generate a hash key for.
Returns
Hash key for strToHash.

◆ create_property_tree()

tResult create_property_tree ( ant::IProperties & oProperties,
const char * strPath )

Creates a property tree structure.

It creates new intermediate properties if they do not exist already.

Parameters
[in,out]oPropertiesThe property container to manipulate
[in]strPathThe path the properties, elements seperated by slashes.
Returns
Standard result.

◆ current_exception_to_result()

tResult current_exception_to_result ( )
inline

◆ current_exception_to_string()

std::string current_exception_to_string ( )
inline

Trys to format the current exception into a string.

This works for std::exception and tResult exception objects.

Returns
The formatted string.

Definition at line 162 of file ucom3/include/adtfucom3/exception_handling.h.

◆ duration_cast()

template<typename DestinationTimeStamp, typename SourceTimeStamp>
DestinationTimeStamp duration_cast ( const SourceTimeStamp & )

Duration cast base template to converted between different time resolution.

Template Parameters
DestinationTimeStampthe type to convert to
SourceTimeStampthe type to convert from

Definition at line 157 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/src/libraries/base/include/adtfbase/chrono.h.

Referenced by sample_data< T >::GetTime().

◆ get_hash_value()

adtf::util::cVariant get_hash_value ( const IHashValueMap & oMap,
const IHashValueMap::tHashKey & oHash,
const adtf::util::cVariant oDefault )

Retrieves a variant value for the hash key oHash out of the hashed value map oMap.

If the value does not exists the oDefault is returned.

Parameters
[in]oMapThe map to retrieve the value from.
[in]oHashThe hash key of the value.
[in]oDefaultdefault value if value does not exist.
Returns
retrieved value.

◆ get_property() [1/2]

template<typename VALUETYPE>
VALUETYPE get_property ( const IConfiguration & oConfiguration,
const char * strNameOfValue,
VALUETYPE oDefaultValue )

Get the property content converted to the VALUETYPE.

Template Parameters
VALUETYPEThe type of the property
Parameters
oConfigurationThe configuratiion to look at
strNameOfValueThe name of the property
oDefaultValueThe default value if not found
Returns
VALUETYPE

Definition at line 271 of file configuration.h.

Referenced by adtf::streaming::ant::get_property(), stream_meta_type_string::GetEncoding(), stream_meta_type_plain::IsCompatible(), and stream_meta_type_string::IsCompatible().

◆ get_property() [2/2]

template<typename VALUETYPE>
VALUETYPE get_property ( const IConfiguration & oConfiguration,
const char * strNameOfValue,
VALUETYPE oDefaultValue )

Get the property content converted to the VALUETYPE.

Template Parameters
VALUETYPEThe type of the property
Parameters
oConfigurationThe configuratiion to look at
strNameOfValueThe name of the property
oDefaultValueThe default value if not found
Returns
VALUETYPE

Definition at line 271 of file configuration.h.

◆ get_property_by_path() [1/2]

template<typename VALUETYPE>
VALUETYPE get_property_by_path ( const IConfiguration & oConfiguration,
const char * strPathAndName,
VALUETYPE oDefaultValue )

Definition at line 344 of file configuration.h.

◆ get_property_by_path() [2/2]

template<typename VALUETYPE>
VALUETYPE get_property_by_path ( const IConfiguration & oConfiguration,
const char * strPathAndName,
VALUETYPE oDefaultValue )

Definition at line 344 of file configuration.h.

◆ get_property_object_by_path() [1/2]

tResult get_property_object_by_path ( const ant::IConfiguration & oConfiguration,
const char * strPropertyPathAndName,
ant::IProperty & oProperty )

Retrieves a property reference under the given oConfiguration by path.

Parameters
oConfigurationThe configuration
strPropertyPathAndNamethe path with '/' separator
oPropertyThe out property reference
Returns
tResult

◆ get_property_object_by_path() [2/2]

tResult get_property_object_by_path ( const ant::IConfiguration & oConfiguration,
const char * strPropertyPathAndName,
ant::IProperty & oProperty )

Retrieves a property reference under the given oConfiguration by path.

Parameters
oConfigurationThe configuration
strPropertyPathAndNamethe path with '/' separator
oPropertyThe out property reference
Returns
tResult

◆ get_property_value()

template<typename T>
tResult get_property_value ( const IPropertyValue & oValue,
T & xValue )

Definition at line 135 of file properties_v2.h.

◆ handle_error()

void handle_error ( const char * strErrorSource,
const char * strErrorCategory,
IErrorHandling::tAction eDefaultAction,
tResult oError )

Convenience method to report an error for short lived objects.

Parameters
[in]strErrorSourceThe name of the error source.
[in]strErrorCategoryThe name of the error category.
[in]eDefaultActionThe default action that should be taken if an error occurs.
[in]oErrorThe error result.

◆ is_equal()

tResult is_equal ( const ant::IProperties & oLeftProperties,
const ant::IProperties & oRightProperties )

Check if two property sets are equal.

Parameters
[in]oLeftPropertiesThe operands for the check.
[in]oRightPropertiesThe operands for the check.
Returns
Standard result.

◆ nested_exceptions_to_string()

std::string nested_exceptions_to_string ( const std::exception & error)
inline

Formats nested std::exceptions into a string, line by line.

Parameters
[in]errorthe exception
Returns
The formatted string.

Definition at line 161 of file ucom3/include/adtfucom3/exception_handling.h.

◆ set_hash_value()

tResult set_hash_value ( IHashValueMap & oMap,
const IHashValueMap::tHashKey & oHash,
const adtf::util::cVariant oValue )

Sets a variant value for the hash key oHash into the hashed value map oMap.

Parameters
[in]oMapThe map to set the value to.
[in]oHashThe hash key of the value.
[in]oValuevalue to set.
Returns
standard error code
Return values
ERR_NOERRORvalue is set
ERR_INVALID_TYPEType is not supported. See IHashValueMapValue::tType

◆ set_property() [1/2]

template<typename VALUETYPE>
tResult set_property ( IConfiguration & oConfiguration,
const char * strNameOfValue,
VALUETYPE oValue )

Set the property.

Template Parameters
VALUETYPEThe type of the property to set
Parameters
oConfigurationThe configuration to set at
strNameOfValueThe name of the property
oValueThe value of the property
Returns
tResult

Definition at line 307 of file configuration.h.

Referenced by adtf::streaming::ant::set_property(), adtf::streaming::ant::set_property(), and stream_meta_type_string::SetEncoding().

◆ set_property() [2/2]

template<typename VALUETYPE>
tResult set_property ( IConfiguration & oConfiguration,
const char * strNameOfValue,
VALUETYPE oValue )

Set the property.

Template Parameters
VALUETYPEThe type of the property to set
Parameters
oConfigurationThe configuration to set at
strNameOfValueThe name of the property
oValueThe value of the property
Returns
tResult

Definition at line 307 of file configuration.h.

◆ set_property_by_path() [1/2]

template<typename VALUETYPE>
tResult set_property_by_path ( IConfiguration & oConfiguration,
const char * strPathAndName,
VALUETYPE oValue )

Definition at line 336 of file configuration.h.

◆ set_property_by_path() [2/2]

template<typename VALUETYPE>
tResult set_property_by_path ( IConfiguration & oConfiguration,
const char * strPathAndName,
VALUETYPE oValue )

Definition at line 336 of file configuration.h.

◆ split_parents_and_leaf()

std::pair< std::string, std::string > split_parents_and_leaf ( const char * strPropertyPathAndName)

Splits a property path into the parent path and the property name.

Parameters
[in]strPropertyPathAndNamePath seperated by slashes.
Returns
parent path and property name.

◆ visit_properties()

void visit_properties ( const ant::IProperties & oProperties,
const tPropertyVisitorCallback & fnCallback )

Utility function to visit all properties of a properties object.

Parameters
[in]oPropertiesThe properties object.
[out]fnCallbackThis is called for each property.

◆ visit_sub_properties()

void visit_sub_properties ( const ant::IProperty & oProperty,
const tPropertyVisitorCallback & fnCallback )

Utility function to visit all sub-properties of a given property.

Parameters
[in]oPropertyThe property object.
[out]fnCallbackThis is called for each sub-property.