|
scc 2025.09
SystemC components library
|
A class for TLM network payloads with support for extensions and memory management. More...
#include <tlm_network_gp.h>


Classes | |
| struct | gp_mm |
Public Member Functions | |
| tlm_network_payload () | |
| Default constructor. | |
| tlm_network_payload (tlm_base_mm_interface *mm) | |
| Constructor with memory management interface. | |
| tlm_network_payload (const tlm_network_payload< CMDENUM > &x)=delete | |
| virtual | ~tlm_network_payload ()=default |
| void | deep_copy_from (const tlm_network_payload &other) |
| Non-virtual deep-copying of the object. | |
| CMDENUM | get_command () const |
| Gets the command from the payload. | |
| void | set_command (const CMDENUM command) |
| Sets the command in the payload. | |
| std::vector< uint8_t > const & | get_data () const |
| Gets the data from the payload. | |
| std::vector< uint8_t > & | get_data () |
| Gets the data from the payload. | |
| void | set_data (std::vector< uint8_t > const &value) |
| Sets the data in the payload. | |
| bool | is_response_ok () const |
| Checks if the response status is OK. | |
| bool | is_response_error () const |
| Checks if the response status is an error. | |
| tlm_response_status | get_response_status () const |
| Gets the response status from the payload. | |
| void | set_response_status (const tlm_response_status response_status) |
| Sets the response status in the payload. | |
| std::string | get_response_string () const |
| Gets the response status as a string. | |
| Public Member Functions inherited from tlm::nw::tlm_network_payload_base | |
| tlm_network_payload_base () | |
| Default constructor. | |
| tlm_network_payload_base (tlm_base_mm_interface *mm) | |
| Constructor with memory management interface. | |
| virtual | ~tlm_network_payload_base () |
| void | reset () |
| Constructor with memory management interface. | |
| void | acquire () |
| Acquires a reference to the payload. | |
| void | release () |
| Releases a reference to the payload. | |
| int | get_ref_count () const |
| Gets the reference count of the payload. | |
| void | set_mm (tlm_base_mm_interface *mm) |
| bool | has_mm () const |
| void | copy_extensions_from (const tlm_network_payload_base &other) |
| void | update_extensions_from (const tlm_network_payload_base &other) |
| void | free_all_extensions () |
| template<typename T> | |
| T * | set_extension (T *ext) |
| tlm_extension_base * | set_extension (unsigned int index, tlm_extension_base *ext) |
| template<typename T> | |
| T * | set_auto_extension (T *ext) |
| tlm_extension_base * | set_auto_extension (unsigned int index, tlm_extension_base *ext) |
| template<typename T> | |
| void | get_extension (T *&ext) const |
| template<typename T> | |
| T * | get_extension () const |
| tlm_extension_base * | get_extension (unsigned int index) const |
| template<typename T> | |
| void | clear_extension (const T *ext) |
| template<typename T> | |
| void | clear_extension () |
| template<typename T> | |
| void | release_extension (T *ext) |
| template<typename T> | |
| void | release_extension () |
| size_t | get_extension_count () |
| void | resize_extensions () |
Static Public Member Functions | |
| static tlm_network_payload< CMDENUM > * | create () |
| Creates a new instance of the tlm_network_payload using a thread-local memory manager. | |
Protected Member Functions | |
| tlm_network_payload< CMDENUM > & | operator= (const tlm_network_payload< CMDENUM > &x) |
Protected Attributes | |
| CMDENUM | m_command |
| std::vector< uint8_t > | m_data |
| tlm_response_status | m_response_status |
A class for TLM network payloads with support for extensions and memory management.
The tlm_network_payload class provides a foundation for creating custom TLM network payloads. It includes methods for managing extensions, memory management, and response status.
| CMDENUM | The type of command enumeration used by the payload. |
Definition at line 199 of file tlm_network_gp.h.
|
inline |
Default constructor.
Initializes the tlm_network_payload object with default values.
Definition at line 357 of file tlm_network_gp.h.
|
inlineexplicit |
Constructor with memory management interface.
Initializes the tlm_network_payload object with a specified memory management interface.
| mm | The memory management interface. |
Definition at line 363 of file tlm_network_gp.h.
|
virtualdefault |
virtual destructor.
|
inlinestatic |
Creates a new instance of the tlm_network_payload using a thread-local memory manager.
Returns a new instance of the tlm_network_payload, using a thread-local memory manager to allocate the object.
Definition at line 339 of file tlm_network_gp.h.
| void tlm::nw::tlm_network_payload< CMDENUM >::deep_copy_from | ( | const tlm_network_payload< CMDENUM > & | other | ) |
Non-virtual deep-copying of the object.
Performs a deep copy of the object, including copying the command, response status, data, and extensions.
| other | The object to copy from. |
Definition at line 378 of file tlm_network_gp.h.
|
inline |
Gets the command from the payload.
Returns the command stored in the payload.
Definition at line 236 of file tlm_network_gp.h.
|
inline |
Gets the data from the payload.
Returns a reference to the data stored in the payload.
Definition at line 260 of file tlm_network_gp.h.
|
inline |
Gets the data from the payload.
Returns a reference to the data stored in the payload.
Definition at line 252 of file tlm_network_gp.h.
|
inline |
Gets the response status from the payload.
Returns the response status stored in the payload.
Definition at line 292 of file tlm_network_gp.h.
| std::string tlm::nw::tlm_network_payload< CMDENUM >::get_response_string | ( | ) | const |
Gets the response status as a string.
Returns the response status stored in the payload as a string.
Definition at line 385 of file tlm_network_gp.h.
|
inline |
Checks if the response status is an error.
Returns true if the response status is an error, indicating an unsuccessful transaction.
Definition at line 284 of file tlm_network_gp.h.
|
inline |
Checks if the response status is OK.
Returns true if the response status is OK, indicating a successful transaction.
Definition at line 276 of file tlm_network_gp.h.
|
inlineprotected |
Definition at line 345 of file tlm_network_gp.h.
|
inline |
Sets the command in the payload.
Updates the command stored in the payload.
| command | The new command. |
Definition at line 244 of file tlm_network_gp.h.
|
inline |
Sets the data in the payload.
Updates the data stored in the payload.
| value | The new data. |
Definition at line 268 of file tlm_network_gp.h.
|
inline |
Sets the response status in the payload.
Updates the response status stored in the payload.
| response_status | The new response status. |
Definition at line 300 of file tlm_network_gp.h.
|
protected |
Definition at line 351 of file tlm_network_gp.h.
|
protected |
Definition at line 352 of file tlm_network_gp.h.
|
protected |
Definition at line 353 of file tlm_network_gp.h.