RA Flexible Software Package Documentation  Release v5.3.0

 
Data Shipper Interface

Detailed Description

Interface for RAI Data Shipper.

Summary

The rai data shipper interface provides multiple communication methods.

Data Structures

struct  rai_data_shipper_callback_args_t
 
struct  rai_data_shipper_write_params_t
 
struct  rai_data_shipper_cfg_t
 
struct  rai_data_shipper_api_t
 
struct  rai_data_shipper_instance_t
 

Typedefs

typedef void rai_data_shipper_ctrl_t
 

Data Structure Documentation

◆ rai_data_shipper_callback_args_t

struct rai_data_shipper_callback_args_t

Callback function parameter structure

Data Fields
rm_comms_event_t result Whether data is sent successfully or not.
void const * p_context Pointer to the user-provided context.
uint8_t instance Data collector instance ID.

◆ rai_data_shipper_write_params_t

struct rai_data_shipper_write_params_t

Data Shipper write funciton parameter structure

Data Fields
uint16_t events Events.
uint16_t diagnostic_data_len Diagnostic data length.
uint8_t * p_diagnostic_data Pointer to diagnostic data.
rai_data_collector_callback_args_t * p_sensor_data Pointer to sensor data info.

◆ rai_data_shipper_cfg_t

struct rai_data_shipper_cfg_t

RAI Data Shipper general configuration

Data Fields

uint8_t divider
 Send data on every (divider + 1) requests in case the interface bandwidth is not sufficient.
 
crc_instance_t const * p_crc
 Pointer to CRC instance.
 
rm_comms_instance_t const * p_comms
 Pointer to COMMS API instance.
 
void const * p_context
 Pointer to the user-provided context.
 
void(* p_callback )(rai_data_shipper_callback_args_t *p_args)
 Pointer to the callback function on data sent or error.
 

◆ rai_data_shipper_api_t

struct rai_data_shipper_api_t

RAI Data Shipper interface API.

Data Fields

fsp_err_t(* open )(rai_data_shipper_ctrl_t *const p_ctrl, rai_data_shipper_cfg_t const *const p_cfg)
 
fsp_err_t(* read )(rai_data_shipper_ctrl_t *const p_ctrl, void *const p_buf, uint32_t *const buf_len)
 
fsp_err_t(* write )(rai_data_shipper_ctrl_t *const p_ctrl, rai_data_shipper_write_params_t const *p_write_params)
 
fsp_err_t(* close )(rai_data_shipper_ctrl_t *const p_ctrl)
 

Field Documentation

◆ open

fsp_err_t(* rai_data_shipper_api_t::open) (rai_data_shipper_ctrl_t *const p_ctrl, rai_data_shipper_cfg_t const *const p_cfg)

Initialize Data Shipper module instance.

Note
To reopen after calling this function, call rai_data_shipper_api_t::close first.
Parameters
[in]p_ctrlPointer to control handle structure
[in]p_cfgPointer to configuration structure

◆ read

fsp_err_t(* rai_data_shipper_api_t::read) (rai_data_shipper_ctrl_t *const p_ctrl, void *const p_buf, uint32_t *const buf_len)

Read data.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_bufPointer to the location to store read data.
[in]buf_lenNumber of bytes to read.

◆ write

fsp_err_t(* rai_data_shipper_api_t::write) (rai_data_shipper_ctrl_t *const p_ctrl, rai_data_shipper_write_params_t const *p_write_params)

Write data.

Parameters
[in]p_ctrlPointer to control structure.
[in]write_paramsPointer to write parameters structure

◆ close

fsp_err_t(* rai_data_shipper_api_t::close) (rai_data_shipper_ctrl_t *const p_ctrl)

Close the specified Data Shipper module instance.

Parameters
[in]p_ctrlPointer to control handle structure

◆ rai_data_shipper_instance_t

struct rai_data_shipper_instance_t

This structure encompasses everything that is needed to use an instance of this interface.

Data Fields
rai_data_shipper_ctrl_t * p_ctrl Pointer to the control structure for this instance.
rai_data_shipper_cfg_t const * p_cfg Pointer to the configuration structure for this instance.
rai_data_shipper_api_t const * p_api Pointer to the API structure for this instance.

Typedef Documentation

◆ rai_data_shipper_ctrl_t

Data Shipper control block. Allocate an instance specific control block to pass into the Data Shipper API calls.