![]() |
RA Flexible Software Package Documentation
Release v5.7.0
|
|
Functions | |
fsp_err_t | RM_RAI_DATA_SHIPPER_Open (rai_data_shipper_ctrl_t *const p_api_ctrl, rai_data_shipper_cfg_t const *const p_cfg) |
fsp_err_t | RM_RAI_DATA_SHIPPER_Read (rai_data_shipper_ctrl_t *const p_api_ctrl, void *const p_buf, uint32_t *const buf_len) |
fsp_err_t | RM_RAI_DATA_SHIPPER_Write (rai_data_shipper_ctrl_t *const p_api_ctrl, rai_data_shipper_write_params_t const *p_write_params) |
fsp_err_t | RM_RAI_DATA_SHIPPER_Close (rai_data_shipper_ctrl_t *const p_api_ctrl) |
Middleware to implement the Data Shipper for Reality AI applications. This module implements the Data Shipper Interface.
RAI Data Shipper is mainly for sending data collected by RAI Data Collector to PC so that they can be used for Reality AI model training. It utilizes the Communicatons Middleware Interface and all communications are fully asynchronous. The data being transported may be any combination of the following:
Sensor data is provided by Data Collector via data ready callback. System events and debug data are filled up by application. A callback is used to notify application that communication is finished. RM_COMMS_EVENT_ERROR
will be returned if there is any error during data transmission. Please note sensor data buffer must be released back to data collector when data is no longer used by application. If data shipper is the only data consumer, then RM_RAI_DATA_COLLECTOR_BufferRelease
must be called on write error, or in the data shipper callback.
Configuration | Options | Default | Description |
---|---|---|---|
Parameter Checking |
| Default (BSP) | If selected code for parameter checking is included in the build. |
Max Number Of DC Instances | Value must be a positive integer between 1 and 8 | 8 | Max number of DC instances to be sent. |
Configuration | Options | Default | Description |
---|---|---|---|
Name | Name must be a valid C symbol | g_rai_data_shipper0 | Module name |
Frame Rate Divider | Value must be non-negative | 0 | Skip write requests |
Callback | Name must be a valid C symbol | rai_data_shipper0_callback | A user callback function on data sent or error. |
This module has no required clock configurations.
This module does not use I/O pins.
This is a basic example of minimal use of the Data Shipper implementation in an application.
Data Structures | |
struct | rai_data_shipper_instance_ctrl_t |
struct rai_data_shipper_instance_ctrl_t |
RAI_DATA_SHIPPER instance control block. Initialization occurs when RM_RAI_DATA_SHIPPER_Open() is called.
fsp_err_t RM_RAI_DATA_SHIPPER_Open | ( | rai_data_shipper_ctrl_t *const | p_api_ctrl, |
rai_data_shipper_cfg_t const *const | p_cfg | ||
) |
Opens and configures the Data Shipper module.
Implements rai_data_shipper_api_t::open().
FSP_SUCCESS | Data Shipper successfully configured. |
FSP_ERR_ALREADY_OPEN | Module already open. |
FSP_ERR_ASSERTION | One or more pointers point to NULL or callback is NULL. |
fsp_err_t RM_RAI_DATA_SHIPPER_Read | ( | rai_data_shipper_ctrl_t *const | p_api_ctrl, |
void *const | p_buf, | ||
uint32_t *const | buf_len | ||
) |
Read data.
Implements rai_data_shipper_api_t::read().
FSP_ERR_UNSUPPORTED | Data Shipper module read not supported |
fsp_err_t RM_RAI_DATA_SHIPPER_Write | ( | rai_data_shipper_ctrl_t *const | p_api_ctrl, |
rai_data_shipper_write_params_t const * | p_write_params | ||
) |
Write data. Note this function may be called in ISR.
Implements rai_data_shipper_api_t::write().
FSP_SUCCESS | Tx buf list created and transmission starts, or write request skipped. |
FSP_ERR_ASSERTION | An input parameter was invalid. |
FSP_ERR_NOT_OPEN | Module not open. |
fsp_err_t RM_RAI_DATA_SHIPPER_Close | ( | rai_data_shipper_ctrl_t *const | p_api_ctrl | ) |
Closes Data Shipper module instance.
Implements rai_data_shipper_api_t::close().
FSP_SUCCESS | Data Shipper module closed. |
FSP_ERR_ASSERTION | An input parameter was invalid. |
FSP_ERR_NOT_OPEN | Module not open. |