ADTF  3.18.2
MapAssignment

MapAssignment. More...

Public Member Functions

 MapAssignment ()
 CTOR.
 
 MapAssignment (std::string to)
 CTOR. More...
 
bool isValid () const
 Returns the validity for the current description.
 
const std::string & getFrom () const
 Returns the source element name of the assignment (or an empty string) More...
 
const std::string & getSource () const
 Returns the source name of the assignment (or an empty string)
 
a_util::result::Result connect (const std::string &source_element_path)
 Connects the target element or signal with a source. More...
 
const std::string & getConstant () const
 Returns the constant of the assignment (or an empty string)
 
a_util::result::Result setConstant (const std::string &constant)
 Setter for the constant of the assignment. More...
 
const std::string & getFunction () const
 Returns the constant of the assignment (or an empty string)
 
a_util::result::Result setSimulationTimeFunction ()
 Setter for the SimulationTime assignment. More...
 
a_util::result::Result setTriggerCounterFunction (const std::string &modulo)
 Setter for the TriggerCounter assignment. More...
 
a_util::result::Result setReceivedFunction (const std::string &source)
 Setter for the Received assignment. More...
 
const std::string & getModulo () const
 Returns the constant of the assignment (or an empty string)
 
const std::string & getTo () const
 Returns the name of the target element that is assigned.
 
const std::string & getTransformation () const
 Returns the associated transformation of this assignment (or an empty string)
 
a_util::result::Result setTransformation (const std::string &transformation_name)
 Associates the transformation to this assignment. More...
 
a_util::result::Result removeTransformation ()
 Remove the transformation from this assignment. More...
 

Private Member Functions

a_util::result::Result loadFromDOM (const a_util::xml::DOMElement &assignment, MapErrorList &errors)
 Initializes the assignment from a assignment-dom element. More...
 
a_util::result::Result writeToDOM (a_util::xml::DOMElement &dom_element) const
 Export assignment to a XML dom element. More...
 

Detailed Description

MapAssignment.

Definition at line 33 of file map_assignment.h.

Constructor & Destructor Documentation

◆ MapAssignment()

MapAssignment ( std::string  to)

CTOR.

Parameters
[in]toName of assigned signal or element

Member Function Documentation

◆ connect()

a_util::result::Result connect ( const std::string &  source_element_path)

Connects the target element or signal with a source.

Parameters
[in]source_element_pathThe complete path to the source element it is constructed with [SignalName].[ElementName]
Return values
ERR_INVALID_ARGSource is empty
a_util::result::SUCCESSEverything went fine

◆ getFrom()

const std::string& getFrom ( ) const

Returns the source element name of the assignment (or an empty string)

Returns
the from name

Referenced by ddl::mapping::operator==().

◆ loadFromDOM()

a_util::result::Result loadFromDOM ( const a_util::xml::DOMElement assignment,
MapErrorList errors 
)
private

Initializes the assignment from a assignment-dom element.

Parameters
[in]assignmentThe dom element from which to import
[out]errorsThe error list for debug
Return values
ERR_INVALID_ARGMissing name or type
a_util::result::SUCCESSEverything went fine

◆ removeTransformation()

a_util::result::Result removeTransformation ( )

Remove the transformation from this assignment.

Return values
a_util::result::SUCCESSEverything went fine

◆ setConstant()

a_util::result::Result setConstant ( const std::string &  constant)

Setter for the constant of the assignment.

Parameters
[in]constantThe constant to assign
Return values
ERR_INVALID_ARGConstant is empty
a_util::result::SUCCESSEverything went fine

◆ setReceivedFunction()

a_util::result::Result setReceivedFunction ( const std::string &  source)

Setter for the Received assignment.

Parameters
[in]sourceThe name of the source to consider
Return values
ERR_INVALID_ARGSource is empty
a_util::result::SUCCESSEverything went fine

◆ setSimulationTimeFunction()

a_util::result::Result setSimulationTimeFunction ( )

Setter for the SimulationTime assignment.

Return values
a_util::result::SUCCESSEverything went fine

◆ setTransformation()

a_util::result::Result setTransformation ( const std::string &  transformation_name)

Associates the transformation to this assignment.

Parameters
[in]transformation_nameThe name of the transformation to add
Return values
ERR_INVALID_ARGSource or from is empty (no signal connected)
a_util::result::SUCCESSEverything went fine

◆ setTriggerCounterFunction()

a_util::result::Result setTriggerCounterFunction ( const std::string &  modulo)

Setter for the TriggerCounter assignment.

Parameters
[in]moduloThe modulo for the function it represents the maximal value that can be assigned before going back to 0 if left empty, the limit will be the maximal value of Float64
Return values
a_util::result::SUCCESSEverything went fine

◆ writeToDOM()

a_util::result::Result writeToDOM ( a_util::xml::DOMElement dom_element) const
private

Export assignment to a XML dom element.

Parameters
[in]dom_elementThe dom element from which to import
Return values
a_util::result::SUCCESSEverything went fine