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

definition of the mapping namespace More...

Namespaces

namespace  oo
 definition of the dd namespace for mapping
 
namespace  rt
 definition of the rt namespace for mapping
 

Classes

class  ArraySourceValue
 Source Value base class that represents an array. More...
 
class  AssignmentTrigger
 Trigger interface to trigger the assignments of a specific target. More...
 
class  AssignmentTriggerSourceTime
 Trigger interface to trigger the assignments of a specific target together with a update time strategy. More...
 
class  ConstantValueFactory
 Constant value factory to create a constant numeric value of value. More...
 
class  DDLEnumTableFunction
 Enum Table function with type string "ddl_enum_table". More...
 
class  DDLSource
 DDLSource implementation class representing a MemorySource that provides named source values for ddl based decoding. More...
 
class  DDLTarget
 DDLTarget implementation class representing a MemoryTarget that provides named target values for ddl based encoding. More...
 
class  DefaultEngine
 Default engine implementation. More...
 
class  Engine
 Mapping engine base class. More...
 
class  Function
 Mapping Function base class. More...
 
class  FunctionFactoryImplementation
 FunctionFactory implementation template. More...
 
class  InlinePolynomialFunction
 Inline Polynomial function with type string "inline_polynomial". More...
 
class  MapAssignment
 MapAssignment. More...
 
class  MapConfiguration
 MapConfiguration is the central class of the mapping::dd namespace. More...
 
class  MapDataTrigger
 implementation of a data trigger in the configuration api More...
 
class  MapEnumTableTransformation
 MapEnumTableTransformation represents a transformation between to enumerations. More...
 
class  MapHeader
 MapHeader contains all information from the header-Tag of a mapping configuration. More...
 
class  Mapper
 The mapper to create the targets from sources. More...
 
class  MapperElement
 Mapper Element. More...
 
class  MapperElementBase
 Mapper Element base template. More...
 
class  MapperFactories
 Mapping factory collection class registry. More...
 
class  MapperFactory
 A mapper factory to create Source, Target or Function. More...
 
class  MapPeriodicTrigger
 implementation of a periodic trigger in the configuration api More...
 
class  MappingConfiguration
 Mapping Configuration model with validation and requirements management. More...
 
struct  MappingConfigurationFromXMLFactory
 Factory to create a MappingConfiguration out of a XML based description. More...
 
struct  MappingConfigurationFromXMLFactory10
 Factory to create a MappingConfiguration out of a XML based description. More...
 
struct  MappingConfigurationFromXMLFactoryBase
 Factory helper to create a MappingConfiguration out of a XML based description. More...
 
struct  MappingConfigurationToXMLFactory
 Template class to create MappingConfiguration DOM nodes with the help of the type DomNodeType. More...
 
struct  MappingConfigurationToXMLFactory10
 Template class to create MappingConfiguration DOM nodes with the help of the type DomNodeType. More...
 
struct  MappingConfigurationToXMLFactoryBase
 Template class to create MappingConfiguration DOM nodes with the help of the type DomNodeType. More...
 
class  MappingFile
 Convenience class to load and validate a MappingConfiguration from a xml file string. More...
 
class  MappingString
 Convenience class to load and validate a MappingConfiguration from a xml string. More...
 
class  MapPolynomTransformation
 MapPolynomTransformation represents a polynom transformation in the configuration api as well as the actual implementation of the transformation in the evaluate method. More...
 
class  MapSignalTrigger
 implementation of a signal trigger in the configuration api More...
 
class  MapSource
 MapSource represents a mapping source from the configuration file. More...
 
class  MapTarget
 MapTarget represents a mapped target from the mapping configuration. More...
 
class  MapTransformationBase
 cMapTransformation forms a base class for a single transformation More...
 
class  MapTriggerBase
 cMapTrigger forms a base class for a trigger contained in the configuration More...
 
class  Memory
 Memory base class for sources and targets representing a continous memory buffer. More...
 
class  MemorySource
 Source memory base class for sources representing a continuous memory buffer. More...
 
class  MemoryTarget
 Memory Target base class that represents a continuous memory buffer. More...
 
class  PlainSourceValue
 Value getter to retrieve a value with plain type content. More...
 
class  PolynomialFunction
 Polynomial function with type string "polynomial". More...
 
class  Property
 Property class representing a pair of value and its type. More...
 
class  SimulationTimeFunction
 Simulation time function to retrieve the last known simulation time updated by time trigger. More...
 
class  SimulationTimeFunctionFactory
 Factory for SimulationTimeFunction as type "simulation_time". More...
 
class  Source
 Mapping Source base class. More...
 
class  SourceFactoryImplementation
 SourceFactory implementation template. More...
 
class  SourceValue
 Source Value base class. More...
 
class  SpecificMapperFactory
 A specific mapper factory to create Source, Target or Function. More...
 
class  Target
 Mapping Target base class. More...
 
class  TargetFactoryImplementation
 TargetFactory implementation template. More...
 
class  TargetValue
 Value setter to set a value. More...
 
class  TimeStrategy
 Time strategy interface to evaluate the targets update time. More...
 
class  TriggerCounterFunction
 Trigger counter function to retrieve the current count of a certain trigger fired. More...
 
class  Updateable
 Updateable interface class. More...
 
class  Version
 Mapping Version. More...
 
class  WasReceivedFunction
 Was received function to retrieve if at least the given source with name was received. More...
 

Typedefs

typedef std::vector< std::string > MapErrorList
 container type for mapping errors
 
typedef std::vector< MapAssignmentMapAssignmentList
 Public composite types used in the mapping::dd namespace.
 
typedef std::vector< MapSourceMapSourceList
 Public composite types used in the mapping::dd namespace.
 
typedef std::set< std::string > MapSourceNameList
 defintion of MapSource name list
 
typedef std::vector< MapTargetMapTargetList
 Public composite types used in the mapping::dd namespace.
 
typedef std::vector< MapTransformationBase * > MapTransformationList
 Public composite types used in the mapping::dd namespace.
 
typedef std::vector< MapTriggerBase * > MapTriggerList
 Public composite types used in the mapping::dd namespace.
 
typedef std::map< std::string, uint8_t > TypeMap
 String -> Datatype Enum Map.
 
using ValueVariant
 Variant Value to retrieve a plain type value of a source.
 
using Properties = std::unordered_map<std::string, Property>
 Properties class as set of key - property value pairs This proerties are used to adjust the readers and propcessors behaviour.
 
using SourceFactory = SpecificMapperFactory<Source>
 A Source factory to create a Source.
 
using TargetFactory = SpecificMapperFactory<Target>
 A Target factory to create a Target.
 
using FunctionFactory = SpecificMapperFactory<Function>
 A Function factory to create a Function.
 
using Error = ddl::utility::Error
 mapping error definition
 
using Problem = ddl::utility::Problem
 defintion of problems for validation of the MappingConfiguration
 
using Requirement = ddl::utility::VersionRequirement<Version>
 mapping version requirements
 
using VersionConversion = ddl::dd::VersionConversion
 Resuse of ddl Version conversion utility class for mapping version.
 

Enumerations

enum  DataTypes {
  e_uint8 = 1 , e_uint16 , e_uint32 , e_uint64 ,
  e_int8 , e_int16 , e_int32 , e_int64 ,
  e_float32 , e_float64 , e_bool , e_char
}
 Enum for all relevant data types. More...
 
enum class  ValidationLevel : uint8_t { dont_know , invalid , good_enough , valid }
 MappingConfiguration validation level. More...
 

Functions

std::string getMapping10FunctionCallAttributes (const datamodel::Assignment &assignment, const std::string &current_target_name, const datamodel::MappingConfiguration::Functions &functions, std::vector< std::pair< std::string, std::string > > &attributes_to_set)
 Get the Mapping10 Module Call Attributes.
 
bool operator== (const MapAssignment &a, const MapAssignment &b)
 compares the Assignments
 
bool operator!= (const MapAssignment &a, const MapAssignment &b)
 compares the Assignments
 
bool operator== (const MapSource &a, const MapSource &b)
 compares MapSources in type and name
 
bool operator!= (const MapSource &a, const MapSource &b)
 compares MapSources in type and name
 
bool operator== (const MapTarget &a, const MapTarget &b)
 compares the targets
 
bool operator!= (const MapTarget &a, const MapTarget &b)
 compares the targets
 
template<typename T>
void getValueRef (const ValueVariant &value, T &value_reference)
 Get the value from a variant as plain type T.
 
template<typename T>
getValue (const ValueVariant &value)
 Get the value.
 
bool operator== (const Property &left, const Property &right)
 compare operator for Property
 
Properties operator+ (const Properties &properties_left, const Properties &properties_right)
 Add operator for properties.
 
std::vector< std::string > transformValidationProblemList (const std::vector< Problem > &problems)
 transforms the validation protocol of problems to a simple vector of strings.
 
MapperFactories getDefaultMapperFactories ()
 Retrieves the default mapper factories This contains:
 

Detailed Description

definition of the mapping namespace

Typedef Documentation

◆ Error

mapping error definition

Definition at line 35 of file mapping_configuration_types.h.

◆ FunctionFactory

A Function factory to create a Function.

Definition at line 610 of file mapper_interfaces.h.

◆ MapAssignmentList

typedef std::vector<MapAssignment> MapAssignmentList

Public composite types used in the mapping::dd namespace.

Definition at line 205 of file map_assignment.h.

◆ MapErrorList

typedef std::vector< std::string > MapErrorList

container type for mapping errors

Definition at line 29 of file map_assignment.h.

◆ MapSourceList

typedef std::vector<MapSource> MapSourceList

Public composite types used in the mapping::dd namespace.

Definition at line 134 of file map_source.h.

◆ MapSourceNameList

typedef std::set<std::string> MapSourceNameList

defintion of MapSource name list

Definition at line 139 of file map_source.h.

◆ MapTargetList

typedef std::vector<MapTarget> MapTargetList

Public composite types used in the mapping::dd namespace.

Definition at line 251 of file map_target.h.

◆ MapTransformationList

Public composite types used in the mapping::dd namespace.

Definition at line 361 of file map_transformation.h.

◆ MapTriggerList

typedef std::vector<MapTriggerBase*> MapTriggerList

Public composite types used in the mapping::dd namespace.

Definition at line 346 of file map_trigger.h.

◆ Problem

defintion of problems for validation of the MappingConfiguration

Definition at line 62 of file mapping_configuration_types.h.

◆ Properties

using Properties = std::unordered_map<std::string, Property>

Properties class as set of key - property value pairs This proerties are used to adjust the readers and propcessors behaviour.

Definition at line 331 of file mapper_interfaces.h.

◆ Requirement

mapping version requirements

Definition at line 71 of file mapping_configuration_types.h.

◆ SourceFactory

A Source factory to create a Source.

Definition at line 504 of file mapper_interfaces.h.

◆ TargetFactory

A Target factory to create a Target.

Definition at line 556 of file mapper_interfaces.h.

◆ TypeMap

typedef std::map<std::string, uint8_t> TypeMap

String -> Datatype Enum Map.

Definition at line 32 of file element.h.

◆ ValueVariant

using ValueVariant
Initial value:
std::variant<uint8_t,
int8_t,
uint16_t,
int16_t,
uint32_t,
int32_t,
uint64_t,
int64_t,
float,
double,
bool>

Variant Value to retrieve a plain type value of a source.

Definition at line 39 of file mapper_interfaces.h.

◆ VersionConversion

Resuse of ddl Version conversion utility class for mapping version.

Definition at line 90 of file mapping_version.h.

Enumeration Type Documentation

◆ DataTypes

enum DataTypes

Enum for all relevant data types.

Definition at line 40 of file element.h.

◆ ValidationLevel

enum class ValidationLevel : uint8_t
strong

MappingConfiguration validation level.

Enumerator
dont_know 

The validation is not known.

This means there was no validation.

invalid 

the validation level is invalid.

good_enough 

the mapping is valid for running at engine, but has problems

valid 

every thing is well defined.

Definition at line 40 of file mapping_configuration_types.h.

Function Documentation

◆ getDefaultMapperFactories()

MapperFactories getDefaultMapperFactories ( )

Retrieves the default mapper factories This contains:

◆ getMapping10FunctionCallAttributes()

std::string getMapping10FunctionCallAttributes ( const datamodel::Assignment & assignment,
const std::string & current_target_name,
const datamodel::MappingConfiguration::Functions & functions,
std::vector< std::pair< std::string, std::string > > & attributes_to_set )
inline

Get the Mapping10 Module Call Attributes.

Remarks
this is a DOM independent function to reuse within requirements model of the MappingConfiguration!
Parameters
assignmentthe assignemnt to serialize
current_target_namethe current target the assignment belongs to
functionsthe "functions" node
attributes_to_setthe resulting attributes to set
Returns
std::string error message return value, if empty no error occured

Definition at line 45 of file datamodel_xml_configurationtoxml_10.h.

References TypeAccessMap< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS >::get(), Assignment::getFunctionCall(), Assignment::getParameterValues(), ddl::utility::isInteger(), and ParameterValue::source_value.

Referenced by MappingConfigurationToXMLFactory10< DomNodeType >::resolveFunctionCall().

◆ getValue()

template<typename T>
T getValue ( const ValueVariant & value)

Get the value.

Template Parameters
TThe type to convert the value to
Returns
T The value retrieved

Definition at line 71 of file mapper_interfaces.h.

◆ getValueRef()

template<typename T>
void getValueRef ( const ValueVariant & value,
T & value_reference )

Get the value from a variant as plain type T.

Template Parameters
Tthe type of the value to retrieve and convert
Parameters
valuethe variant value
value_referencethe value reference to retrieve and convert to

Definition at line 58 of file mapper_interfaces.h.

Referenced by PlainSourceValue::getValueOrDefaultRef(), and PlainSourceValue::getValueRef().

◆ operator!=() [1/3]

bool operator!= ( const MapAssignment & a,
const MapAssignment & b )
inline

compares the Assignments

Parameters
aleft Assignments
bright Assignments
Returns
false the Assignments are equal
true the Assignments are not equal

Definition at line 199 of file map_assignment.h.

◆ operator!=() [2/3]

bool operator!= ( const MapSource & a,
const MapSource & b )
inline

compares MapSources in type and name

Parameters
aleft source
bright source
Returns
false they are equal in type and name
true they are not equal in type and name

Definition at line 128 of file map_source.h.

◆ operator!=() [3/3]

bool operator!= ( const MapTarget & a,
const MapTarget & b )
inline

compares the targets

Parameters
aleft target
bright target
Returns
false the targets are equal
true the targets are not equal

Definition at line 245 of file map_target.h.

◆ operator+()

Properties operator+ ( const Properties & properties_left,
const Properties & properties_right )
inline

Add operator for properties.

Parameters
properties_leftthe left properties
properties_rightthe right properties to add
Returns
Properties
Remarks
if right properties are containing a value with the same key as left it will take the right one into concern

Definition at line 341 of file mapper_interfaces.h.

◆ operator==() [1/4]

bool operator== ( const MapAssignment & a,
const MapAssignment & b )
inline

compares the Assignments

Parameters
aleft Assignments
bright Assignments
Returns
true the Assignments are equal
false the Assignments are not equal

Definition at line 184 of file map_assignment.h.

References MapAssignment::getConstant(), MapAssignment::getFrom(), MapAssignment::getFunction(), MapAssignment::getModulo(), MapAssignment::getSource(), MapAssignment::getTo(), and MapAssignment::getTransformation().

◆ operator==() [2/4]

bool operator== ( const MapSource & a,
const MapSource & b )
inline

compares MapSources in type and name

Parameters
aleft source
bright source
Returns
true they are equal in type and name
false they are not equal in type and name

Definition at line 115 of file map_source.h.

References MapSource::getName(), and MapSource::getType().

◆ operator==() [3/4]

bool operator== ( const MapTarget & a,
const MapTarget & b )

compares the targets

Parameters
aleft target
bright target
Returns
true the targets are equal
false the targets are not equal

◆ operator==() [4/4]

bool operator== ( const Property & left,
const Property & right )
inline

compare operator for Property

Parameters
leftthe left value
rightthe right value
Returns
true is equal in type and value
false is not equal in type or value

Definition at line 322 of file mapper_interfaces.h.

References Property::getType(), and Property::getValue().

◆ transformValidationProblemList()

std::vector< std::string > transformValidationProblemList ( const std::vector< Problem > & problems)

transforms the validation protocol of problems to a simple vector of strings.


Simple usage:

//...
using namespace ddl;
//... adding ... loading ... using
std::cout <<
Mapping Configuration model with validation and requirements management.
std::vector< Problem > getValidationProtocol() const
Gets a collection of all problems obtained while validating the MappingConfiguration.
std::string join(const std::vector< std::string > &strings, const std::string &delimiter)
Joins all strings from the vector into one string, separated by the specified delimiter string.
std::vector< std::string > transformValidationProblemList(const std::vector< Problem > &problems)
transforms the validation protocol of problems to a simple vector of strings.
Parameters
problemsthe problems to tranform.
Returns
std::vector<std::string>