External control client¶
Renode exposes an API server that can be used to control the emulation programatically using the External control client library. Latest building instructions and example descriptions can be found in the README file in Renode’s repository.
Macros¶
NO_ERROR¶
#define NO_ERROR NULL
All the functions return a pointer to the renode_error_t structure in case of an error. Its memory has to be freed in case it’s handled. NULL returned indicates success.
MAX_CAN_FRAME_SIZE¶
#define MAX_CAN_FRAME_SIZE 64
Maximum size of the CAN Frame in bytes, that the client can handle.
Enumerations¶
renode_error_code_t¶
enum renode_error_code_t
Value |
Description |
|---|---|
|
Invalid error code |
|
Fatal error |
|
Command failed |
|
Invalid command |
|
Function called with invalid argument |
|
The Renode connection is busy and cannot be closed |
Possible error codes.
renode_time_unit_t¶
enum renode_time_unit_t
Value |
Description |
|---|---|
|
Nanoseconds |
|
Microseconds |
|
Milliseconds |
|
Seconds |
The supported time units.
renode_access_width_t¶
enum renode_access_width_t
Value |
Description |
|---|---|
|
Byte access |
|
Word (2B) access |
|
Double word (4B) access |
|
Quad word (8B) access |
|
Multibyte access (number of bytes defined by |
|
Any access width for the purpose of callback filtering |
The supported access width options.
renode_access_type_t¶
enum renode_access_type_t
Value |
Description |
|---|---|
|
Read on the bus |
|
Write on the bus |
|
Any access type for the purpose of callback filtering |
The supported accesses to the Renode system bus.
Typedefs¶
renode_t¶
typedef struct renode renode_t
The API handle for the Renode connection.
Renode handles are pointers to structs that are implemented internally, which must be prepared by calling renode_get_X functions (renode_connect() or renode_connect_in_process() for renode_t) so that they can be later used in their related functions.
The internal structs are not a part of the API.
The memory that the handles point to is dynamically allocated, and should be freed when the handles are no longer needed. That can be achieved by calling free(*handle) with the exception of the Renode connection API handle, which should be closed by calling renode_disconnect().
renode_machine_t¶
typedef struct renode_machine renode_machine_t
The API handle for the Renode machine.
Renode handles are pointers to structs that are implemented internally, which must be prepared by calling renode_get_X functions (renode_connect() or renode_connect_in_process() for renode_t) so that they can be later used in their related functions.
The internal structs are not a part of the API.
The memory that the handles point to is dynamically allocated, and should be freed when the handles are no longer needed. That can be achieved by calling free(*handle) with the exception of the Renode connection API handle, which should be closed by calling renode_disconnect().
renode_adc_t¶
typedef struct renode_adc renode_adc_t
The API handle for a Renode ADC peripheral.
Renode handles are pointers to structs that are implemented internally, which must be prepared by calling renode_get_X functions (renode_connect() or renode_connect_in_process() for renode_t) so that they can be later used in their related functions.
The internal structs are not a part of the API.
The memory that the handles point to is dynamically allocated, and should be freed when the handles are no longer needed. That can be achieved by calling free(*handle) with the exception of the Renode connection API handle, which should be closed by calling renode_disconnect().
renode_gpio_t¶
typedef struct renode_gpio renode_gpio_t
The API handle for a Renode GPIO controller.
Renode handles are pointers to structs that are implemented internally, which must be prepared by calling renode_get_X functions (renode_connect() or renode_connect_in_process() for renode_t) so that they can be later used in their related functions.
The internal structs are not a part of the API.
The memory that the handles point to is dynamically allocated, and should be freed when the handles are no longer needed. That can be achieved by calling free(*handle) with the exception of the Renode connection API handle, which should be closed by calling renode_disconnect().
renode_can_t¶
typedef struct renode_can renode_can_t
The API handle for a Renode CAN bus.
Renode handles are pointers to structs that are implemented internally, which must be prepared by calling renode_get_X functions (renode_connect() or renode_connect_in_process() for renode_t) so that they can be later used in their related functions.
The internal structs are not a part of the API.
The memory that the handles point to is dynamically allocated, and should be freed when the handles are no longer needed. That can be achieved by calling free(*handle) with the exception of the Renode connection API handle, which should be closed by calling renode_disconnect().
renode_bus_context_t¶
typedef struct renode_bus_context renode_bus_context_t
The API handle for a Renode bus manager.
Renode handles are pointers to structs that are implemented internally, which must be prepared by calling renode_get_X functions (renode_connect() or renode_connect_in_process() for renode_t) so that they can be later used in their related functions.
The internal structs are not a part of the API.
The memory that the handles point to is dynamically allocated, and should be freed when the handles are no longer needed. That can be achieved by calling free(*handle) with the exception of the Renode connection API handle, which should be closed by calling renode_disconnect().
renode_fatal_error_callback_t¶
typedef void(* renode_fatal_error_callback_t) (void *ud, renode_error_t *error)
A type of the Renode fatal error callback.
renode_spi_t¶
typedef struct renode_spi renode_spi_t
The API handle for a Renode SPI peripheral.
Renode handles are pointers to structs that are implemented internally, which must be prepared by calling renode_get_X functions (renode_connect() or renode_connect_in_process() for renode_t) so that they can be later used in their related functions.
The internal structs are not a part of the API.
The memory that the handles point to is dynamically allocated, and should be freed when the handles are no longer needed. That can be achieved by calling free(*handle) with the exception of the Renode connection API handle, which should be closed by calling renode_disconnect().
renode_bus_peripheral_t¶
typedef struct renode_bus_peripheral renode_bus_peripheral_t
The API handle for a Renode External Bus peripheral.
Renode handles are pointers to structs that are implemented internally, which must be prepared by calling renode_get_X functions (renode_connect() or renode_connect_in_process() for renode_t) so that they can be later used in their related functions.
The internal structs are not a part of the API.
The memory that the handles point to is dynamically allocated, and should be freed when the handles are no longer needed. That can be achieved by calling free(*handle) with the exception of the Renode connection API handle, which should be closed by calling renode_disconnect().
renode_time_t¶
typedef uint64_t renode_time_t
Renode’s virtual time.
The virtual time is represented by an unsigned integer in an unspecified time unit. It is safe to perform comparison (<, >, <=, >=, !=, ==), addition (+, +=) and subtraction (-, -=) operations between two instances of renode_time_t.
Use renode_create_time(), renode_time_to_time_unit() or renode_time_to_seconds() to create or convert the virtual time.
renode_time_elapsed_callback_t¶
typedef void(* renode_time_elapsed_callback_t) (void *ud, renode_time_t *timestamp)
The type of the Renode time-elapsed callback.
renode_custom_command_callback_t¶
typedef renode_custom_command_response_data_t*(* renode_custom_command_callback_t) (void *ud, renode_custom_command_event_data_t *event_data)
renode_can_event_callback_t¶
typedef void(* renode_can_event_callback_t) (void *user_data, renode_can_event_data_t *event_data)
renode_sysbus_event_callback_t¶
typedef void(* renode_sysbus_event_callback_t) (void *user_data, renode_sysbus_event_data_t *event_data)
renode_spi_transmit_callback_t¶
typedef uint8_t(* renode_spi_transmit_callback_t) (void *user_data, uint8_t mosi)
The SPI transmit callback is invoked for every byte the master sends to the slave (MOSI). It returns the byte that the slave transmits on the bus in exchange (MISO).
Returns¶
the MISO byte to return to the master
Parameters¶
user_data- the pointer passed at registrationmosi- the byte received from the master
renode_spi_finish_callback_t¶
typedef void(* renode_spi_finish_callback_t) (void *user_data)
The SPI finish-transmission callback is invoked when the master ends the transfer (CS deasserted).
Parameters¶
user_data- the pointer passed at registration
Functions¶
renode_connect¶
renode_error_t * renode_connect(const char * port, renode_t ** renode)
The function initializing the Renode connection.
It is defined only when the library is built with the socket transport, RENODE_API_TRANSPORT=socket, which is the default.
The connection should be closed using renode_disconnect() before the client app exits.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
port- the TCP portrenode- the Renode connection handle pointer
renode_connect_in_process¶
renode_error_t * renode_connect_in_process(const char * name, renode_t ** renode)
The function initializing a connection to the Renode instance that runs in this process through librenode.
It is defined only when the library is built with RENODE_API_TRANSPORT=in_process, which links librenode. Requests to Renode run on the calling thread. Callbacks run on the Renode thread that raises them, and calls that a callback makes run on that thread too.
The connection should be closed using renode_disconnect() before the client app exits.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
name- the name of the connection among the externals of the emulation, which the Monitor and log messages show. It must not be taken by another external.renode- the Renode connection handle pointer
renode_disconnect¶
renode_error_t * renode_disconnect(renode_t ** renode)
The function closing the Renode connection and freeing the internal handle memory.
After using this function, the internal handle memory is freed, so calling free(*renode) afterwards is invalid.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
renode- the Renode connection handle pointer
renode_disconnect_ex¶
renode_error_t * renode_disconnect_ex(renode_t ** renode, bool blocking)
The extended variant of the function to close the Renode connection and free the internal handle memory.
After using this function, the internal handle memory is freed, so calling free(*renode) afterwards is invalid.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
renode- the Renode connection handle pointerblocking- if false, the function may return an error with the codeERR_CONNECTION_BUSYto indicate that the connection cannot be closed at this moment due to the command handlers currently running. If true, this function will block in case ofERR_CONNECTION_BUSYbeing returned.
renode_get_machine¶
renode_error_t * renode_get_machine(renode_t * renode, const char * name, renode_machine_t ** machine)
The function preparing the machine handle.
The handle’s internal memory is dynamically allocated, so *machine should be freed when it’s no longer used.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
renode- the Renode connection handlename- the name of the machine to fetchmachine- the Renode machine handle
renode_free_error¶
void renode_free_error(renode_error_t * error)
The function deallocating an error structure’s memory.
The function should be run every time any of the functions return a valid error structure pointer. By default, those functions return NULL.
Parameters¶
error- the error structure
renode_set_fatal_error_callback¶
void renode_set_fatal_error_callback(renode_t * renode, void * user_data, renode_fatal_error_callback_t callback)
The function setting a callback to be called when the library encounters an unrecoverable error.
The callback can be used to perform any application-specific cleanup routines before the application terminates.
Parameters¶
renode- the Renode connection handleuser_data- the pointer to the data passed to the callback when invokedcallback- the callback to be invoked when an unrecoverable error occurs
renode_create_time¶
renode_error_t * renode_create_time(uint64_t value, renode_time_unit_t unit, renode_time_t * time)
The function creating Renode’s virtual time value.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
value- the time, expressed in the given unitunit- the unit in which the given time is expressedtime- the Renode time instance
renode_time_to_time_unit¶
uint64_t renode_time_to_time_unit(renode_time_t time, renode_time_unit_t unit)
The function converting Renode’s virtual time to an integer time value expressed in a specified unit.
The function floors the result of the conversion.
Returns¶
A time value in a given unit.
Parameters¶
time- the Renode time instanceunit- the unit in which the given time is expressed (see renode_time_unit_t); the caller is responsible for ensuring that the passed unit is valid
renode_time_to_seconds¶
double renode_time_to_seconds(renode_time_t time)
The function converting Renode’s timestamp into seconds.
Returns¶
A floating-point timestamp equivalent in seconds.
The result is precise down to one nanosecond. Decimal places smaller than 10E-9 are conversion arifacts. The result keeps the nanosecond-precison up to around 93 days of virtual time - for higher values, precision gradually degradates.
Parameters¶
time- the Renode time instance
renode_run_for¶
renode_error_t * renode_run_for(renode_t * renode, renode_time_t time)
The function specifying that the emulation should run for a given amount of time.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
renode- the Renode connection handletime- the duration of virtual time that the emulation should execute for
renode_get_current_time¶
renode_error_t * renode_get_current_time(renode_t * renode, renode_time_t * current_time)
The function fetching the current virtual time of the emulation.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
renode- the Renode connection handlecurrent_time- the current virtual time of the emulation
renode_register_time_elapsed_callback¶
renode_error_t * renode_register_time_elapsed_callback(renode_t * renode, void * user_data, renode_time_elapsed_callback_t callback)
The function registering a callback that will be called after a quantum of time elapses in Renode.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
renode- the Renode connection handleuser_data- the pointer to the data passed to the callback when invokedcallback- the callback to be invoked when a quantum of time elapses in Renode
renode_get_adc¶
renode_error_t * renode_get_adc(renode_machine_t * machine, const char * name, renode_adc_t ** adc)
The function preparing the ADC handle.
The handle’s internal memory is dynamically allocated, so *adc should be freed when it’s no longer used.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
machine- the machine handlename- the ADC peripheral’s nameadc- the handle associated with the requested ADC peripheral
renode_get_adc_channel_count¶
renode_error_t * renode_get_adc_channel_count(renode_adc_t * adc, int32_t * count)
The function fetching the number of channels of the ADC.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
adc- the ADC handlecount- the number of the ADC channels
renode_get_adc_channel_value¶
renode_error_t * renode_get_adc_channel_value(renode_adc_t * adc, int32_t channel, uint32_t * value)
The function fetching an ADC channel’s value.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
adc- the ADC handlechannel- the ADC channel indexvalue- the current ADC channel value
renode_set_adc_channel_value¶
renode_error_t * renode_set_adc_channel_value(renode_adc_t * adc, int32_t channel, uint32_t value)
The function setting an ADC channel’s value.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
adc- the ADC handlechannel- the ADC channel indexvalue- the requested ADC channel value
renode_get_gpio¶
renode_error_t * renode_get_gpio(renode_machine_t * machine, const char * name, renode_gpio_t ** gpio)
The function preparing the GPIO controller handle.
The handle’s internal memory is dynamically allocated, so *gpio should be freed when it’s no longer used.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
machine- the machine handlename- the name of the GPIO controllergpio- the handle associated with the requested GPIO controller
renode_get_gpio_state¶
renode_error_t * renode_get_gpio_state(renode_gpio_t * gpio, int32_t id, bool * state)
The function fetching the GPIO state.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
gpio- the GPIO controller handleid- the GPIO’s index in the given GPIO controllerstate- the current GPIO state
renode_set_gpio_state¶
renode_error_t * renode_set_gpio_state(renode_gpio_t * gpio, int32_t id, bool state)
The function setting the GPIO state.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
gpio- the GPIO controller handleid- the GPIO’s index in the given GPIO controllerstate- the requested GPIO state
renode_register_gpio_state_change_callback¶
renode_error_t * renode_register_gpio_state_change_callback(renode_gpio_t * gpio, int32_t id, void * user_data, void(*)(void *, renode_gpio_event_data_t *) callback)
The function registering the callback when the GPIO state changes.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
gpio- the GPIO controller handleid- the GPIO’s index in the given GPIO controlleruser_data- the pointer to the data passed to the callback when invokedcallback- the callback to be invoked when the GPIO state with the given index changes
renode_register_custom_command_callback¶
renode_error_t * renode_register_custom_command_callback(renode_t * renode, void * user_data, renode_custom_command_callback_t callback)
The function registering callback on custom command. The callback function returns a pointer to the renode_custom_command_callback_t struct which it allocates. This pointer is freed in the invoke_callback function.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
renode- the Renode handleuser_data- the pointer to the data passed to the callback when invokedcallback- the callback to be invoked when a custom command is issued
renode_get_can¶
renode_error_t * renode_get_can(renode_machine_t * machine, const char * name, renode_can_t ** can)
The function preparing the CAN handle.
The handle’s internal memory is dynamically allocated, so *can should be freed when no longer used.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
machine- the machine handlename- the CAN Bus peripheral namecan- the handle associated with the requested CAN instance
renode_register_can_callback¶
renode_error_t * renode_register_can_callback(renode_can_t * can, void * user_data, renode_can_event_callback_t callback)
The function registering the callback when a CAN message is received.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
can- the CAN instance handleuser_data- the pointer to the data passed to the callback when invokedcallback- the callback to be invoked when a message is received
renode_send_can_message¶
renode_error_t * renode_send_can_message(renode_can_t * can, void * packet, int packet_length, uint32_t packet_id)
The function sending a CAN message.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
can- the CAN instance handlepacket- the pointer to the CAN packet payloadpacket_length- the length of the packet to be sentpacket_id- the packet ID
renode_get_bus_context¶
renode_error_t * renode_get_bus_context(renode_machine_t * machine, const char * name, renode_bus_context_t ** ctx)
The function preparing the bus handle with the emulation element context.
The context is used to imitate bus access made by specific bus managers like CPU, DMA, etc. ”sysbus” can be passed as name if bus accesses should be made with global context.
Please note that access made using a handle with the emulation element context still needs to use absolute addresses so they are equivalent to Renode’s sysbus Read<width> <address> context=<name> rather than <name> Read<width> <address>, which treats addresses as relative to <name> peripheral’s registration base address.
The handle’s internal memory is dynamically allocated, so *ctx should be freed when no longer used.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
machine- the machine handlename- the emulation element’s name in which the context bus accesses should be madectx- the handle for performing the bus access with the context of the specified emulation element
renode_get_bus_context_name¶
renode_error_t * renode_get_bus_context_name(renode_bus_context_t * ctx, char ** name)
The function fetching the name of the bus context.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
ctx- the bus contextname- fully qualified name of the bus context in the format “<machine name>.<context name>”, must be freed
renode_get_sysbus¶
renode_error_t * renode_get_sysbus(renode_machine_t * machine, renode_bus_context_t ** sysbus)
The function preparing the bus handle with global context.
This is a convenience wrapper, equivalent to renode_get_bus_context() with name=”sysbus”.
The handle’s internal memory is dynamically allocated, so *sysbus should be freed when no longer used.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
machine- the machine handlesysbus- the handle for performing bus access with global context
renode_get_byte_count¶
renode_error_t * renode_get_byte_count(renode_access_width_t width, uint32_t count, uint32_t * byte_count)
The function calculating the byte count from the given access width and transfer count.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
width- the width of the transfercount- the count of the transfersbyte_count- the count of accessed bytes
renode_sysbus_read¶
renode_error_t * renode_sysbus_read(renode_bus_context_t * ctx, uint64_t address, renode_access_width_t width, void * buffer, uint32_t count)
The function reading data from the system bus.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
ctx- the bus handleaddress- the absolute address of the readwidth- the width of the readbuffer- the buffer for the read datacount- the number of requested reads (total data size will bewidth * count)
renode_sysbus_write¶
renode_error_t * renode_sysbus_write(renode_bus_context_t * ctx, uint64_t address, renode_access_width_t width, const void * buffer, uint32_t count)
The function writing data to the system bus.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
ctx- the bus handleaddress- the absolute address of the accesswidth- the access widthbuffer- the buffer with the data to write to the buscount- the number of requested writes (total data size iswidth * count)
renode_get_bus_peripheral¶
renode_error_t * renode_get_bus_peripheral(renode_machine_t * machine, const char * name, renode_bus_peripheral_t ** bus_peripheral)
The function preparing the Bus peripheral handle.
The peripheral must be a Bus.ExternalControlBusPeripheral.
The internals of the handle are dynamically allocated, so *bus_peripheral should be freed when no longer used.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
machine- the machine handlename- the Bus peripheral’s namebus_peripheral- the handle associated with the requested External Bus peripheral
renode_register_sysbus_access_callback¶
renode_error_t * renode_register_sysbus_access_callback(renode_bus_peripheral_t * bus_peripheral, renode_access_type_t access_type, renode_access_width_t width, void * user_data, renode_sysbus_event_callback_t callback)
The function registering a callback when Renode’s system bus is accessed.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
All callbacks should set renode_sysbus_event_data_t::access_succeeded to true. By default, it is false. If renode_sysbus_event_data_t::access_type is SYSBUS_CB_READ, then the callback should set renode_sysbus_event_data_t::data to true. By default, it is all zeros, and can be omitted if the access doesn’t succeed.
Parameters¶
bus_peripheral- the platform peripheral handleaccess_type- the access types for which the callback will be invokedwidth- the widths for which the callback will be invokeduser_data- the pointer to the data passed to the callback when invokedcallback- the callback to be invoked when Renode’s system bus is accessed for the given access types and widths.
renode_get_spi¶
renode_error_t * renode_get_spi(renode_machine_t * machine, const char * name, renode_spi_t ** spi)
The function preparing the SPI peripheral handle.
The peripheral must be a SPI.ExternalControlSPIPeripheral
The handle’s internal memory is dynamically allocated, so *spi should be freed when no longer used.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
machine-the machine handlename- the SPI peripheral namespi- the handle associated with the requested SPI peripheral
renode_spi_register_callbacks¶
renode_error_t * renode_spi_register_callbacks(renode_spi_t * spi, void * user_data, renode_spi_transmit_callback_t on_transmit, renode_spi_finish_callback_t on_finish)
The function registering live callbacks for an ExternalControlSPIPeripheral slave.
After registration, the callbacks fire, while the emulation advances (i.e. during renode_run_for()). on_transmit supplies the MISO byte for each master beat, and on_finish is notified at the end of a transfer.
Returns¶
A pointer to the error structure if an error occurred, otherwise NULL.
Parameters¶
spi- the SPI handleuser_data- the pointer passed to both callbacks when invokedon_transmit- the callback returning the MISO byte for each received MOSI byteon_finish- the callback invoked when the transfer finishes (may be NULL)
Structures¶
renode_error_t¶
#include <renode_api.h>
struct renode_error_t
The structure describing the status of a finished operation.
Public Attributes¶
Type |
Name |
Description |
|---|---|---|
Error code |
||
|
Error flags, currently only used internally |
|
|
Error message |
|
|
Error data, currently unused |
code¶
renode_error_code_t code
Error code
flags¶
int flags
Error flags, currently only used internally
message¶
char * message
Error message
data¶
void * data
Error data, currently unused
renode_can_event_data_t¶
#include <renode_api.h>
struct renode_can_event_data_t
The CAN bus event data.
Public Attributes¶
Type |
Name |
Description |
|---|---|---|
The timestamp of when the packet was sent |
||
|
The length of the CAN frame in bytes |
|
|
The ID of the CAN frame |
|
|
The payload of the CAN frame |
time¶
renode_time_t time
The timestamp of when the packet was sent
packet_length¶
int32_t packet_length
The length of the CAN frame in bytes
packet_id¶
uint32_t packet_id
The ID of the CAN frame
packet¶
uint8_t packet[]
The payload of the CAN frame
renode_gpio_event_data_t¶
#include <renode_api.h>
struct renode_gpio_event_data_t
The GPIO state-change event data.
Public Attributes¶
Type |
Name |
Description |
|---|---|---|
The virtual time at which the event occurred |
||
|
The new GPIO state |
time¶
renode_time_t time
The virtual time at which the event occurred
state¶
bool state
The new GPIO state
renode_sysbus_event_data_t¶
#include <renode_api.h>
struct renode_sysbus_event_data_t
The structure storing information about an access event to Renode’s system bus.
Public Attributes¶
Type |
Name |
Description |
|---|---|---|
The timestamp of when the event occurred |
||
The read or write transaction |
||
|
The access address |
|
The access width of a transfer |
||
|
The count of transfers of the width specified by renode_sysbus_event_data_t::width |
|
|
The count of bytes in renode_sysbus_event_data_t::data |
|
|
The flag indicating that the access was successful |
|
|
The bytes that are written or will be read, allocated and freed by the library |
timestamp¶
renode_time_t timestamp
The timestamp of when the event occurred
access_type¶
renode_access_type_t access_type
The read or write transaction
address¶
uint64_t address
The access address
width¶
renode_access_width_t width
The access width of a transfer
transfer_count¶
uint32_t transfer_count
The count of transfers of the width specified by renode_sysbus_event_data_t::width
byte_count¶
uint32_t byte_count
The count of bytes in renode_sysbus_event_data_t::data
access_succeeded¶
bool access_succeeded
The flag indicating that the access was successful
data¶
uint8_t data[]
The bytes that are written or will be read, allocated and freed by the library
renode_custom_command_event_data_t¶
#include <renode_api.h>
struct renode_custom_command_event_data_t
The custom command event data.
Public Attributes¶
Type |
Name |
Description |
|---|---|---|
The virtual time at which the event occurred |
||
|
The command string |
time¶
renode_time_t time
The virtual time at which the event occurred
command¶
char command[]
The command string
renode_custom_command_response_data_t¶
#include <renode_api.h>
struct renode_custom_command_response_data_t
The custom command user data
Public Attributes¶
Type |
Name |
Description |
|---|---|---|
|
The command valid flag |
|
|
The pointer to response string |
command_valid¶
bool command_valid
The command valid flag
response_string¶
char response_string[]
The pointer to response string