![]() |
RA Flexible Software Package Documentation
Release v6.5.1
|
|
Interface for RAI Data Collector.
The rai data collector interface provides functionality to collect data from differnet channels using snapshot mode, data feed mode or mixed mode.
Data Structures | |
| struct | rai_data_collector_error_callback_args_t |
| struct | rai_data_collector_frame_buffer_t |
| struct | rai_data_collector_callback_args_t |
| struct | rai_data_collector_snapshot_cfg_t |
| struct | rai_data_collector_data_feed_cfg_t |
| struct | rai_data_collector_cfg_t |
| struct | rai_data_collector_api_t |
| struct | rai_data_collector_instance_t |
Typedefs | |
| typedef void | rai_data_collector_ctrl_t |
Enumerations | |
| enum | rai_data_collector_data_type_t |
| enum | rai_data_collector_error_event_t |
| struct rai_data_collector_error_callback_args_t |
Error callback function parameter
| Data Fields | ||
|---|---|---|
| uint8_t | instance_id | Instance ID. |
| rai_data_collector_error_event_t | event | Error event. |
| struct rai_data_collector_frame_buffer_t |
Frame buffer structure
| Data Fields | ||
|---|---|---|
| void * | p_buf | Pointer to data buffer. |
| rai_data_collector_data_type_t | data_type | Data samples in the buffer. |
| struct rai_data_collector_callback_args_t |
Data ready callback function parameter
| Data Fields | ||
|---|---|---|
| uint8_t | frames | Number of frame buffers. |
| uint8_t | instance_id | Instance id. |
| uint32_t | frame_buf_len | Frame buffers shall have the same amount of data sample. |
|
rai_data_collector_frame_buffer_t const * |
p_frame_buf | Array of frame buffers. |
| void * | p_context | Pointer to the user-provided context. |
| struct rai_data_collector_snapshot_cfg_t |
Snapshot mode configuration
| Data Fields | ||
|---|---|---|
| uint8_t | channels | Total snapshot mode channels. |
| uint16_t | transfer_len | DTC transfer length. |
| timer_instance_t const * | p_timer | Pointer to timer instance. |
| transfer_instance_t const * | p_transfer | Pointer to DTC instance. |
| struct rai_data_collector_data_feed_cfg_t |
| struct rai_data_collector_cfg_t |
RAI Data Collector general configuration
Data Fields | |
| uint32_t | channels: 8 |
| Total number of channels. | |
| uint32_t | instance_id: 8 |
| Instance id. | |
| uint32_t | virt_channels: 8 |
| Virtual channels. | |
| uint32_t | reserved: 8 |
| Reserved. | |
| uint32_t | channel_ready_mask |
| Bitmask of configured channels. | |
| uint32_t | required_frame_len |
| Length of each frame buffer. | |
| rai_data_collector_snapshot_cfg_t const * | p_snapshot_cfg |
| Pointer to snapshot mode configuration structure. | |
| rai_data_collector_data_feed_cfg_t const * | p_data_feed_cfg |
| Pointer to data feed mode configuration structure. | |
| void * | p_extend |
| Pointer to extended configuration structure. | |
| void(* | p_callback )(rai_data_collector_callback_args_t const *p_args) |
| Pointer to the callback function when data is collected. | |
| void(* | p_error_callback )(rai_data_collector_error_callback_args_t const *p_args) |
| Pointer to the callback function when there is an error. | |
| void * | p_context |
| Pointer to the user-provided context. | |
| struct rai_data_collector_api_t |
RAI Data Collector interface API.
Data Fields | |
| fsp_err_t(* | open )(rai_data_collector_ctrl_t *const p_ctrl, rai_data_collector_cfg_t const *const p_cfg) |
| fsp_err_t(* | snapshotChannelRegister )(rai_data_collector_ctrl_t *const p_ctrl, uint8_t channel, void const *p_src) |
| fsp_err_t(* | bufferRelease )(rai_data_collector_ctrl_t *const p_ctrl) |
| fsp_err_t(* | bufferReset )(rai_data_collector_ctrl_t *const p_ctrl) |
| fsp_err_t(* | snapshotStart )(rai_data_collector_ctrl_t *const p_ctrl) |
| fsp_err_t(* | snapshotStop )(rai_data_collector_ctrl_t *const p_ctrl) |
| fsp_err_t(* | channelBufferGet )(rai_data_collector_ctrl_t *const p_ctrl, uint8_t channel, void **pp_buf) |
| fsp_err_t(* | channelWrite )(rai_data_collector_ctrl_t *const p_ctrl, uint8_t channel, const void *p_buf, uint32_t len) |
| fsp_err_t(* | close )(rai_data_collector_ctrl_t *const p_ctrl) |
| fsp_err_t(* rai_data_collector_api_t::open) (rai_data_collector_ctrl_t *const p_ctrl, rai_data_collector_cfg_t const *const p_cfg) |
Initialize Data Collector module instance.
| [in] | p_ctrl | Pointer to control handle structure |
| [in] | p_cfg | Pointer to configuration structure |
| fsp_err_t(* rai_data_collector_api_t::snapshotChannelRegister) (rai_data_collector_ctrl_t *const p_ctrl, uint8_t channel, void const *p_src) |
Config transfer source address for snapshot mode channel
| [in] | p_ctrl | Pointer to control handle structure |
| [in] | p_src | Pointer to transfer source address |
| fsp_err_t(* rai_data_collector_api_t::bufferRelease) (rai_data_collector_ctrl_t *const p_ctrl) |
Release frame buffers by upper modules
| [in] | p_ctrl | Pointer to control handle structure |
| [in] | channel | Which snapshot mode channel |
| [in] | p_src | Chanenl source buffer address |
| fsp_err_t(* rai_data_collector_api_t::bufferReset) (rai_data_collector_ctrl_t *const p_ctrl) |
Reset internal buffers
| [in] | p_ctrl | Pointer to control handle structure |
| fsp_err_t(* rai_data_collector_api_t::snapshotStart) (rai_data_collector_ctrl_t *const p_ctrl) |
Starts snapshot mode.
| [in] | p_ctrl | Pointer to control handle structure |
| fsp_err_t(* rai_data_collector_api_t::snapshotStop) (rai_data_collector_ctrl_t *const p_ctrl) |
Stops snapshot mode.
| [in] | p_ctrl | Pointer to control handle structure |
| fsp_err_t(* rai_data_collector_api_t::channelBufferGet) (rai_data_collector_ctrl_t *const p_ctrl, uint8_t channel, void **pp_buf) |
Get the PING or PONG buffer address for data transfer. For data feed mode only.
| [in] | p_ctrl | Pointer to control handle structure |
| [in] | channel | Which data feed mode channel |
| [out] | pp_buf | Returned buffer address |
| fsp_err_t(* rai_data_collector_api_t::channelWrite) (rai_data_collector_ctrl_t *const p_ctrl, uint8_t channel, const void *p_buf, uint32_t len) |
Write data to frame buffer using CPU copy. For data feed mode only.
| [in] | p_ctrl | Pointer to control handle structure |
| [in] | channel | Which data feed mode channel |
| [in] | p_buf | Data buffer |
| [in] | len | Length of data buffer in data samples |
| fsp_err_t(* rai_data_collector_api_t::close) (rai_data_collector_ctrl_t *const p_ctrl) |
Close the specified Data Collector module instance.
| [in] | p_ctrl | Pointer to control handle structure |
| struct rai_data_collector_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
| Data Fields | ||
|---|---|---|
| rai_data_collector_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
| rai_data_collector_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
| rai_data_collector_api_t const * | p_api | Pointer to the API structure for this instance. |
| typedef void rai_data_collector_ctrl_t |
Data Collector control block. Allocate an instance specific control block to pass into the Data Collector API calls.
Data types
Data Collector module error events