![]() |
RA Flexible Software Package Documentation
Release v6.5.1
|
|
Interface for AIR SENSOR Middleware functions.
The AIR SENSOR interface provides AIR SENSOR functionality.
Data Structures | |
| struct | rm_air_sensor_callback_args_t |
| struct | rm_air_sensor_raw_data_t |
| struct | rm_air_sensor_version_t |
| struct | rm_air_sensor_single_data_t |
| struct | rm_air_sensor_data_t |
| struct | rm_air_sensor_cfg_t |
| struct | rm_air_sensor_api_t |
| struct | rm_air_sensor_instance_t |
Typedefs | |
| typedef void | rm_air_sensor_ctrl_t |
Enumerations | |
| enum | rm_air_sensor_event_t |
| enum | rm_air_sensor_sign_t |
| struct rm_air_sensor_callback_args_t |
AIR SENSOR API callback parameter definition
| Data Fields | ||
|---|---|---|
| void * | p_context | |
| rm_air_sensor_event_t | event | Event that triggered the callback. |
| struct rm_air_sensor_raw_data_t |
| struct rm_air_sensor_version_t |
| struct rm_air_sensor_single_data_t |
AIR SENSOR sensor data block
| Data Fields | ||
|---|---|---|
| rm_air_sensor_sign_t | sign | Sign of sensor data. |
| uint32_t | integer_part | Integer part of sensor data. |
| uint32_t | decimal_part | Decimal part of sensor data. |
| struct rm_air_sensor_data_t |
AIR SENSOR data block
| Data Fields | ||
|---|---|---|
| uint32_t | status | |
| rm_air_sensor_single_data_t | nc_0p3 | Number concentration of particle size 0.3 um - 10 um [1/cm3]. |
| rm_air_sensor_single_data_t | nc_0p5 | Number concentration of particle size 0.5 um - 10 um [1/cm3]. |
| rm_air_sensor_single_data_t | nc_1 | Number concentration of particle size 1 um - 10 um [1/cm3]. |
| rm_air_sensor_single_data_t | nc_2p5 | Number concentration of particle size 2.5 um - 10 um [1/cm3]. |
| rm_air_sensor_single_data_t | nc_4 | Number concentration of particle size 4 um - 10 um [1/cm3]. |
| rm_air_sensor_single_data_t | pm1_1 | Mass concentration of particle size 0.3 um - 1 um with reference to KCl particle [um/cm3]. |
| rm_air_sensor_single_data_t | pm2p5_1 | Mass concentration of particle size 0.3 um - 2.5 um with reference to KCl particle [um/cm3]. |
| rm_air_sensor_single_data_t | pm10_1 | Mass concentration of particle size 0.3 um - 10 um with reference to KCl particle [um/cm3]. |
| rm_air_sensor_single_data_t | pm1_2 | Mass concentration of particle size 0.3 um - 1 um with reference to cigarette smoke [um/cm3]. |
| rm_air_sensor_single_data_t | pm2p5_2 | Mass concentration of particle size 0.3 um - 2.5 um with reference to cigarette smoke [um/cm3]. |
| rm_air_sensor_single_data_t | pm10_2 | Mass concentration of particle size 0.3 um - 10 um with reference to cigarette smoke [um/cm3]. |
| rm_air_sensor_single_data_t | temperature | Temperature [Celsius]. |
| rm_air_sensor_single_data_t | humidity | Humidity [RH]. |
| rm_air_sensor_single_data_t | tvoc | Total volatile organic compounds (TVOC) concentrations [mg/m3]. |
| rm_air_sensor_single_data_t | eco2 | Carbon dioxide (CO2) level [ppm]. Value is estimated/actual value depends on sensor module. |
| rm_air_sensor_single_data_t | iaq | Indoor Air Quality level according to UBA. |
| rm_air_sensor_single_data_t | rel_iaq | Relative IAQ. |
| struct rm_air_sensor_cfg_t |
AIR SENSOR configuration block
Data Fields | |
| rm_comms_instance_t const * | p_comms_instance |
| Pointer to Communications Middleware instance. | |
| void * | p_context |
| Pointer to the user-provided context. | |
| void const * | p_extend |
| Pointer to extended configuration by instance of interface. | |
| void(* | p_comms_callback )(rm_air_sensor_callback_args_t *p_args) |
| Communications callback. | |
| struct rm_air_sensor_api_t |
AIR SENSOR APIs
Data Fields | |
| fsp_err_t(* | open )(rm_air_sensor_ctrl_t *const p_ctrl, rm_air_sensor_cfg_t const *const p_cfg) |
| fsp_err_t(* | statusCheck )(rm_air_sensor_ctrl_t *const p_ctrl) |
| fsp_err_t(* | read )(rm_air_sensor_ctrl_t *const p_ctrl, rm_air_sensor_raw_data_t *const p_raw_data) |
| fsp_err_t(* | dataCalculate )(rm_air_sensor_ctrl_t *const p_ctrl, const rm_air_sensor_raw_data_t *const p_raw_data, rm_air_sensor_data_t *const p_sensor_data) |
| fsp_err_t(* | firmwareVersionGet )(rm_air_sensor_ctrl_t *const p_ctrl, rm_air_sensor_version_t *const p_version) |
| fsp_err_t(* | algorithmVersionGet )(rm_air_sensor_ctrl_t *const p_ctrl, rm_air_sensor_version_t *const p_version) |
| fsp_err_t(* | close )(rm_air_sensor_ctrl_t *const p_ctrl) |
| fsp_err_t(* rm_air_sensor_api_t::open) (rm_air_sensor_ctrl_t *const p_ctrl, rm_air_sensor_cfg_t const *const p_cfg) |
Open sensor.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | p_cfg | Pointer to configuration structure. |
| fsp_err_t(* rm_air_sensor_api_t::statusCheck) (rm_air_sensor_ctrl_t *const p_ctrl) |
Read status of the sensor
| [in] | p_ctrl | Pointer to control structure. |
| fsp_err_t(* rm_air_sensor_api_t::read) (rm_air_sensor_ctrl_t *const p_ctrl, rm_air_sensor_raw_data_t *const p_raw_data) |
Read ADC data.
| [in] | p_ctrl | Pointer to control structure. |
| [out] | p_raw_data | Pointer to raw data structure. |
| fsp_err_t(* rm_air_sensor_api_t::dataCalculate) (rm_air_sensor_ctrl_t *const p_ctrl, const rm_air_sensor_raw_data_t *const p_raw_data, rm_air_sensor_data_t *const p_sensor_data) |
Calculate values from measurement results.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | p_raw_data | Pointer to raw data. |
| [out] | p_sensor_data | Pointer to SENSOR data structure. |
| fsp_err_t(* rm_air_sensor_api_t::firmwareVersionGet) (rm_air_sensor_ctrl_t *const p_ctrl, rm_air_sensor_version_t *const p_version) |
Read firmware version.
| [in] | p_ctrl | Pointer to control structure. |
| [out] | p_version | Pointer to firmware version structure. |
| fsp_err_t(* rm_air_sensor_api_t::algorithmVersionGet) (rm_air_sensor_ctrl_t *const p_ctrl, rm_air_sensor_version_t *const p_version) |
Read algorithm version.
| [in] | p_ctrl | Pointer to control structure. |
| [out] | p_version | Pointer to algorithm version structure. |
| fsp_err_t(* rm_air_sensor_api_t::close) (rm_air_sensor_ctrl_t *const p_ctrl) |
Close the sensor
| [in] | p_ctrl | Pointer to control structure. |
| struct rm_air_sensor_instance_t |
AIR SENSOR instance
| Data Fields | ||
|---|---|---|
| rm_air_sensor_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
| rm_air_sensor_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
| rm_air_sensor_api_t const * | p_api | Pointer to the API structure for this instance. |
| typedef void rm_air_sensor_ctrl_t |
AIR SENSOR Control block. Allocate an instance specific control block to pass into the API calls.
Event in the callback function
| enum rm_air_sensor_sign_t |