ADTF
3.18.2
|
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 TargetElementList & | getElementList () 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. | |
Target represents a mapped target signal in the runtime api.
Target | ( | IMappingEnvironment & | env | ) |
CTOR.
[in] | env | The environment |
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.
[in] | map_config | - The Configuration instance |
[in] | map_target | - target representation from mapping configuration |
[in] | target_description | - target description |
[in,out] | sources | the sources |
a_util::result::SUCCESS | Everything went fine |
ERR_FAILED | Error while filing the object |
a_util::result::Result getBufferRef | ( | const void *& | buffer, |
size_t & | target_buffer_size | ||
) |
Method to get access to the current buffer without copying it.
[in] | buffer | Destination pointer |
[out] | target_buffer_size | Destination parameter for the size of the buffer |
a_util::result::SUCCESS | Everything went fine |
a_util::result::Result getCurrentBuffer | ( | void * | target_buffer, |
size_t | target_buffer_size | ||
) |
Method to get a copy of the current target buffer.
[in] | target_buffer | Pointer referencing the target buffer |
[in] | target_buffer_size | The size of the target buffer |
a_util::result::SUCCESS | Everything went fine |
ERR_MEMORY | Target buffer size not large enough |
const TargetElementList& getElementList | ( | ) | const |
Getter for the element list.
const std::string& getName | ( | ) | const |
Getter for the target name.
size_t getSize | ( | ) | const |
Method to get buffer size.
buffer | size |
const std::string& getTypeName | ( | ) | const |
Getter for the target type.
a_util::result::Result reset | ( | const MapConfiguration & | map_config | ) |
Reset target Buffers.
[in] | map_config | - The Configuration instance |
a_util::result::Result updateAccessFunctionValues | ( | ) |
Method to update all dynamic values that are to be updates during buffer access (i.e.
simulation time)
a_util::result::Result updateTriggerFunctionValues | ( | ) |
Method to update all dynamic values that are to be updates during a trigger (i.e.
trigger counters)