ADTF  3.18.2
Target

Target represents a mapped target signal in the runtime api. More...

Public Types

typedef std::vector< std::pair< std::string, TargetElement * > > Assignments
 Assignment container.
 
typedef std::vector< std::pair< uint64_t, TargetElement * > > TriggerCounters
 Trigger counter container.
 
typedef std::vector< std::pair< std::string, TargetElement * > > Constants
 Constant container.
 
typedef std::vector< uint8_t > MemoryBuffer
 Generic byte-buffer.
 

Public Member Functions

 Target (IMappingEnvironment &env)
 CTOR. More...
 
 ~Target ()
 DTOR.
 
a_util::result::Result create (const MapConfiguration &map_config, const MapTarget &map_target, const std::string &target_description, SourceMap &sources)
 Creation method to fill the object with data. More...
 
a_util::result::Result reset (const MapConfiguration &map_config)
 Reset target Buffers. More...
 
const std::string & getName () const
 Getter for the target name. More...
 
const std::string & getTypeName () const
 Getter for the target type. More...
 
const TargetElementListgetElementList () const
 Getter for the element list. More...
 
size_t getSize () const
 Method to get buffer size. More...
 
a_util::result::Result getCurrentBuffer (void *target_buffer, size_t target_buffer_size)
 Method to get a copy of the current target buffer. More...
 
a_util::result::Result getBufferRef (const void *&buffer, size_t &target_buffer_size)
 Method to get access to the current buffer without copying it. More...
 
a_util::result::Result updateAccessFunctionValues ()
 Method to update all dynamic values that are to be updates during buffer access (i.e. More...
 
a_util::result::Result updateTriggerFunctionValues ()
 Method to update all dynamic values that are to be updates during a trigger (i.e. More...
 
void aquireWriteLock () const
 Lock the buffer for a source update.
 
void releaseWriteLock () const
 Unlock the buffer after a source update.
 
void aquireReadLock () const
 Lock the buffer for a buffer read.
 
void releaseReadLock () const
 Unlock the buffer after a buffer read.
 

Detailed Description

Target represents a mapped target signal in the runtime api.

Definition at line 34 of file target.h.

Constructor & Destructor Documentation

◆ Target()

CTOR.

Parameters
[in]envThe environment

Member Function Documentation

◆ create()

a_util::result::Result create ( const MapConfiguration map_config,
const MapTarget map_target,
const std::string &  target_description,
SourceMap sources 
)

Creation method to fill the object with data.

Parameters
[in]map_config- The Configuration instance
[in]map_target- target representation from mapping configuration
[in]target_description- target description
[in,out]sourcesthe sources
Return values
a_util::result::SUCCESSEverything went fine
ERR_FAILEDError while filing the object

◆ getBufferRef()

a_util::result::Result getBufferRef ( const void *&  buffer,
size_t &  target_buffer_size 
)

Method to get access to the current buffer without copying it.

Parameters
[in]bufferDestination pointer
[out]target_buffer_sizeDestination parameter for the size of the buffer
Return values
a_util::result::SUCCESSEverything went fine

◆ getCurrentBuffer()

a_util::result::Result getCurrentBuffer ( void *  target_buffer,
size_t  target_buffer_size 
)

Method to get a copy of the current target buffer.

Parameters
[in]target_bufferPointer referencing the target buffer
[in]target_buffer_sizeThe size of the target buffer
Return values
a_util::result::SUCCESSEverything went fine
ERR_MEMORYTarget buffer size not large enough

◆ getElementList()

const TargetElementList& getElementList ( ) const

Getter for the element list.

Returns
the element list

◆ getName()

const std::string& getName ( ) const

Getter for the target name.

Returns
the target name

◆ getSize()

size_t getSize ( ) const

Method to get buffer size.

Return values
buffersize

◆ getTypeName()

const std::string& getTypeName ( ) const

Getter for the target type.

Returns
the target type

◆ reset()

a_util::result::Result reset ( const MapConfiguration map_config)

Reset target Buffers.

Parameters
[in]map_config- The Configuration instance
Returns
error code

◆ updateAccessFunctionValues()

a_util::result::Result updateAccessFunctionValues ( )

Method to update all dynamic values that are to be updates during buffer access (i.e.

simulation time)

◆ updateTriggerFunctionValues()

a_util::result::Result updateTriggerFunctionValues ( )

Method to update all dynamic values that are to be updates during a trigger (i.e.

trigger counters)