ADTF  3.18.2
MappingEngine

The mapping engine to create the targets. More...

Public Member Functions

 MappingEngine (IMappingEnvironment &env)
 CTOR. More...
 
 ~MappingEngine ()
 DTOR.
 
a_util::result::Result setConfiguration (const MapConfiguration &config)
 Setter for the current mapping configuration. More...
 
a_util::result::Result Map (const std::string &target_name, handle_t &mapped_signal)
 Method to instanciate or expand the mapping structure for one particular target. More...
 
a_util::result::Result reset ()
 Method to reset target buffers. More...
 
a_util::result::Result start ()
 Method to start mapping. More...
 
a_util::result::Result stop ()
 Method to stop mapping. More...
 
a_util::result::Result unmap (handle_t mapped_signal)
 Method to remove a target from the existing mapping structure. More...
 
bool hasTriggers (handle_t mapped_signal) const
 Method to know if signal has triggers or not. More...
 
a_util::result::Result getCurrentData (handle_t mapped_signal, void *target_buffer, size_t target_buffer_size) const
 Method to send current data. More...
 
a_util::result::Result unmapAll ()
 Method to reinitialize the existing mapping structure. More...
 

Private Member Functions

a_util::result::Result initializeModel ()
 Method to give an initial value to all targets. More...
 

Private Attributes

IMappingEnvironment_env
 
bool _running
 
MapConfiguration _map_config
 
TargetMap _targets
 
SourceMap _sources
 
TriggerMap _triggers
 

Detailed Description

The mapping engine to create the targets.

Definition at line 41 of file mapping_engine.h.

Constructor & Destructor Documentation

◆ MappingEngine()

CTOR.

Parameters
[in]env- Mapping environment, used as interface

Member Function Documentation

◆ getCurrentData()

a_util::result::Result getCurrentData ( handle_t  mapped_signal,
void *  target_buffer,
size_t  target_buffer_size 
) const

Method to send current data.

Parameters
[in]mapped_signalThe target handle
[in]target_bufferThe pointer referencing the target buffer
[in]target_buffer_sizeThe size of the target buffer
Return values
a_util::result::SUCCESSEverything went fine
ERR_INVALID_ARGInvalid target handle or target buffer is NULL
ERR_MEMORYTarget buffer not large enough

◆ hasTriggers()

bool hasTriggers ( handle_t  mapped_signal) const

Method to know if signal has triggers or not.

Parameters
[in]mapped_signalThe target handle
Return values
trueSignal has triggers
falseSignal has no triggers

◆ initializeModel()

a_util::result::Result initializeModel ( )
private

Method to give an initial value to all targets.

Return values
a_util::result::SUCCESSEverything went fine
ERR_FAILEDError during initialization

◆ Map()

a_util::result::Result Map ( const std::string &  target_name,
handle_t mapped_signal 
)

Method to instanciate or expand the mapping structure for one particular target.

Parameters
[in]target_nameThe target name
[out]mapped_signal- Destination parameter for the signal handle
Return values
a_util::result::SUCCESSEverything went fine
ERR_INVALID_ARGError target already mapped or not found in mapping configuration
ERR_FAILEDError during creation of the mapping

◆ reset()

Method to reset target buffers.

Return values
a_util::result::SUCCESSEverything went fine
ERR_FAILEDError during runtime

◆ setConfiguration()

a_util::result::Result setConfiguration ( const MapConfiguration config)

Setter for the current mapping configuration.

Parameters
[in]config- The Configuration instance
Return values
a_util::result::SUCCESSEverything went fine

◆ start()

Method to start mapping.

Return values
a_util::result::SUCCESSEverything went fine
ERR_FAILEDError during runtime

◆ stop()

Method to stop mapping.

Return values
a_util::result::SUCCESSEverything went fine

◆ unmap()

a_util::result::Result unmap ( handle_t  mapped_signal)

Method to remove a target from the existing mapping structure.

Parameters
[in]mapped_signal- Target handle
Return values
a_util::result::SUCCESSEverything went fine
ERR_INVALID_ARGError target not found in mapping structure
ERR_FAILEDError during removal

◆ unmapAll()

a_util::result::Result unmapAll ( )

Method to reinitialize the existing mapping structure.

Return values
a_util::result::SUCCESSEverything went fine
ERR_FAILEDError during reinitialization