RZV Flexible Software Package Documentation  Release v3.0.0

 
ZMOD4XXX Middleware Interface

Detailed Description

Interface for ZMOD4XXX Middleware functions.

Summary

The ZMOD4XXX interface provides ZMOD4XXX functionality.

Data Structures

struct  rm_zmod4xxx_callback_args_t
 
struct  rm_zmod4xxx_raw_data_t
 
struct  rm_zmod4xxx_iaq_1st_data_t
 
struct  rm_zmod4xxx_iaq_2nd_data_t
 
struct  rm_zmod4xxx_odor_data_t
 
struct  rm_zmod4xxx_sulfur_odor_data_t
 
struct  rm_zmod4xxx_oaq_1st_data_t
 
struct  rm_zmod4xxx_oaq_2nd_data_t
 
struct  rm_zmod4xxx_raq_data_t
 
struct  rm_zmod4xxx_rel_iaq_data_t
 
struct  rm_zmod4xxx_pbaq_data_t
 
struct  rm_zmod4xxx_no2_o3_data_t
 
struct  rm_zmod4xxx_cfg_t
 
struct  rm_zmod4xxx_api_t
 
struct  rm_zmod4xxx_instance_t
 

Typedefs

typedef void rm_zmod4xxx_ctrl_t
 

Enumerations

enum  rm_zmod4xxx_event_t
 
enum  rm_zmod4xxx_sulfur_odor_t
 

Data Structure Documentation

◆ rm_zmod4xxx_callback_args_t

struct rm_zmod4xxx_callback_args_t

ZMOD4XXX sensor API callback parameter definition

◆ rm_zmod4xxx_raw_data_t

struct rm_zmod4xxx_raw_data_t

ZMOD4XXX raw data structure

◆ rm_zmod4xxx_iaq_1st_data_t

struct rm_zmod4xxx_iaq_1st_data_t

ZMOD4XXX IAQ 1st gen data structure

Data Fields
float rmox MOx resistance.
float rcda CDA resistance.
float iaq IAQ index.
float tvoc TVOC concentration (mg/m^3).
float etoh EtOH concentration (ppm).
float eco2 eCO2 concentration (ppm).

◆ rm_zmod4xxx_iaq_2nd_data_t

struct rm_zmod4xxx_iaq_2nd_data_t

ZMOD4XXX IAQ 2nd gen data structure

Data Fields
float rmox[13] MOx resistance.
float log_rcda log10 of CDA resistance for IAQ 2nd Gen.
float log_nonlog_rcda[3] log10 of CDA resistance for IAQ 2nd Gen ULP.
float iaq IAQ index.
float tvoc TVOC concentration (mg/m^3).
float etoh EtOH concentration (ppm).
float eco2 eCO2 concentration (ppm).
uint8_t sample_id Sample ID. RRH46410 only.
float rel_iaq Relative IAQ. RRH46410 only.

◆ rm_zmod4xxx_odor_data_t

struct rm_zmod4xxx_odor_data_t

ZMOD4XXX Odor structure

Data Fields
bool control_signal Control signal input for odor lib.
float odor Concentration ratio for odor lib.

◆ rm_zmod4xxx_sulfur_odor_data_t

struct rm_zmod4xxx_sulfur_odor_data_t

ZMOD4XXX Sulfur-Odor structure

Data Fields
float rmox[9] MOx resistance.
float intensity odor intensity rating ranges from 0.0 to 5.0 for sulfur lib
rm_zmod4xxx_sulfur_odor_t odor sulfur_odor classification for lib

◆ rm_zmod4xxx_oaq_1st_data_t

struct rm_zmod4xxx_oaq_1st_data_t

ZMOD4XXX OAQ 1st gen data structure

Data Fields
float rmox[15] MOx resistance.
float aiq Air Quality.

◆ rm_zmod4xxx_oaq_2nd_data_t

struct rm_zmod4xxx_oaq_2nd_data_t

ZMOD4XXX OAQ 2nd gen data structure

Data Fields
float rmox[8] MOx resistance.
float temperature Temperature (degC) used for ambient compensation.
float ozone_concentration The ozone concentration in part-per-billion.
uint16_t fast_aqi 1-minute average of the Air Quality Index according to the EPA standard based on ozone
uint16_t epa_aqi The Air Quality Index according to the EPA standard based on ozone.

◆ rm_zmod4xxx_raq_data_t

struct rm_zmod4xxx_raq_data_t

ZMOD4XXX RAQ structure

Data Fields
bool control_signal Control signal input for raq lib.
float raq Concentration ratio for raq lib.

◆ rm_zmod4xxx_rel_iaq_data_t

struct rm_zmod4xxx_rel_iaq_data_t

ZMOD4XXX Relative IAQ data structure

Data Fields
float rmox[13] MOx resistances.
float rhtr heater resistance.
float rel_iaq relative IAQ index.

◆ rm_zmod4xxx_pbaq_data_t

struct rm_zmod4xxx_pbaq_data_t

ZMOD4XXX PBAQ data structure

Data Fields
float rmox[13] MOx resistance.
float log_rcda log10 of CDA resistance.
float rhtr heater resistance.
float temperature ambient temperature (degC).
float tvoc TVOC concentration (mg/m^3).
float etoh EtOH concentration (ppm).
uint8_t sample_id Sample ID. RRH46410 only.

◆ rm_zmod4xxx_no2_o3_data_t

struct rm_zmod4xxx_no2_o3_data_t

ZMOD4XXX NO2 O3 data structure

Data Fields
float rmox[4] MOx resistance.
float temperature Temperature (degC) used for ambient compensation.
float ozone_concentration O3_conc_ppb stands for the ozone concentration in part-per-billion.
float no2_concentration NO2_conc_ppb stands for the NO2 concentration in part-per-billion.
uint16_t fast_aqi FAST_AQI stands for a 1-minute average of the Air Quality Index according to the EPA standard based on ozone.
uint16_t epa_aqi EPA_AQI stands for the Air Quality Index according to the EPA standard based on ozone.

◆ rm_zmod4xxx_cfg_t

struct rm_zmod4xxx_cfg_t

ZMOD4XXX configuration block

Data Fields

rm_comms_instance_t const * p_comms_instance
 Pointer to Communications Middleware instance.
 
void const * p_irq_instance
 Pointer to IRQ instance.
 
void const * 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_zmod4xxx_callback_args_t *p_args)
 I2C Communications callback.
 
void(* p_irq_callback )(rm_zmod4xxx_callback_args_t *p_args)
 IRQ callback.
 

◆ rm_zmod4xxx_api_t

struct rm_zmod4xxx_api_t

ZMOD4XXX APIs

Data Fields

fsp_err_t(* open )(rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_cfg_t const *const p_cfg)
 
fsp_err_t(* measurementStart )(rm_zmod4xxx_ctrl_t *const p_ctrl)
 
fsp_err_t(* measurementStop )(rm_zmod4xxx_ctrl_t *const p_ctrl)
 
fsp_err_t(* statusCheck )(rm_zmod4xxx_ctrl_t *const p_ctrl)
 
fsp_err_t(* read )(rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data)
 
fsp_err_t(* iaq1stGenDataCalculate )(rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_iaq_1st_data_t *const p_zmod4xxx_data)
 
fsp_err_t(* iaq2ndGenDataCalculate )(rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_iaq_2nd_data_t *const p_zmod4xxx_data)
 
fsp_err_t(* odorDataCalculate )(rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_odor_data_t *const p_zmod4xxx_data)
 
fsp_err_t(* sulfurOdorDataCalculate )(rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_sulfur_odor_data_t *const p_zmod4xxx_data)
 
fsp_err_t(* oaq1stGenDataCalculate )(rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_oaq_1st_data_t *const p_zmod4xxx_data)
 
fsp_err_t(* oaq2ndGenDataCalculate )(rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_oaq_2nd_data_t *const p_zmod4xxx_data)
 
fsp_err_t(* raqDataCalculate )(rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_raq_data_t *const p_zmod4xxx_data)
 
fsp_err_t(* relIaqDataCalculate )(rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_rel_iaq_data_t *const p_zmod4xxx_data)
 
fsp_err_t(* pbaqDataCalculate )(rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_pbaq_data_t *const p_zmod4xxx_data)
 
fsp_err_t(* no2O3DataCalculate )(rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_no2_o3_data_t *const p_zmod4xxx_data)
 
fsp_err_t(* temperatureAndHumiditySet )(rm_zmod4xxx_ctrl_t *const p_ctrl, float temperature, float humidity)
 
fsp_err_t(* deviceErrorCheck )(rm_zmod4xxx_ctrl_t *const p_ctrl)
 
fsp_err_t(* close )(rm_zmod4xxx_ctrl_t *const p_ctrl)
 

Field Documentation

◆ open

fsp_err_t(* rm_zmod4xxx_api_t::open) (rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_cfg_t const *const p_cfg)

Open sensor.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_cfgPointer to configuration structure.

◆ measurementStart

fsp_err_t(* rm_zmod4xxx_api_t::measurementStart) (rm_zmod4xxx_ctrl_t *const p_ctrl)

Start measurement

Parameters
[in]p_ctrlPointer to control structure.

◆ measurementStop

fsp_err_t(* rm_zmod4xxx_api_t::measurementStop) (rm_zmod4xxx_ctrl_t *const p_ctrl)

Stop measurement

Parameters
[in]p_ctrlPointer to control structure.

◆ statusCheck

fsp_err_t(* rm_zmod4xxx_api_t::statusCheck) (rm_zmod4xxx_ctrl_t *const p_ctrl)

Read status of the sensor

Parameters
[in]p_ctrlPointer to control structure.

◆ read

fsp_err_t(* rm_zmod4xxx_api_t::read) (rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data)

Read ADC data.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_raw_dataPointer to raw data structure.

◆ iaq1stGenDataCalculate

fsp_err_t(* rm_zmod4xxx_api_t::iaq1stGenDataCalculate) (rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_iaq_1st_data_t *const p_zmod4xxx_data)

Calculate IAQ 1st Gen. values from ADC data.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_raw_dataPointer to raw data.
[in]p_zmod4xxx_dataPointer to ZMOD4XXXX data structure.

◆ iaq2ndGenDataCalculate

fsp_err_t(* rm_zmod4xxx_api_t::iaq2ndGenDataCalculate) (rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_iaq_2nd_data_t *const p_zmod4xxx_data)

Calculate IAQ 2nd Gen. values from ADC data.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_raw_dataPointer to raw data.
[in]p_zmod4xxx_dataPointer to ZMOD4XXXX data structure.

◆ odorDataCalculate

fsp_err_t(* rm_zmod4xxx_api_t::odorDataCalculate) (rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_odor_data_t *const p_zmod4xxx_data)

Calculate Odor values from ADC data.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_raw_dataPointer to raw data.
[in]p_zmod4xxx_dataPointer to ZMOD4XXXX data structure.

◆ sulfurOdorDataCalculate

fsp_err_t(* rm_zmod4xxx_api_t::sulfurOdorDataCalculate) (rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_sulfur_odor_data_t *const p_zmod4xxx_data)

Calculate Sulfur Odor values from ADC data.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_raw_dataPointer to raw data.
[in]p_zmod4xxx_dataPointer to ZMOD4XXXX data structure.

◆ oaq1stGenDataCalculate

fsp_err_t(* rm_zmod4xxx_api_t::oaq1stGenDataCalculate) (rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_oaq_1st_data_t *const p_zmod4xxx_data)

Calculate OAQ 1st Gen. values from ADC data.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_raw_dataPointer to raw data.
[in]p_zmod4xxx_dataPointer to ZMOD4XXXX data structure.

◆ oaq2ndGenDataCalculate

fsp_err_t(* rm_zmod4xxx_api_t::oaq2ndGenDataCalculate) (rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_oaq_2nd_data_t *const p_zmod4xxx_data)

Calculate OAQ 2nd Gen. values from ADC data.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_raw_dataPointer to raw data.
[in]p_zmod4xxx_dataPointer to ZMOD4XXXX data structure.

◆ raqDataCalculate

fsp_err_t(* rm_zmod4xxx_api_t::raqDataCalculate) (rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_raq_data_t *const p_zmod4xxx_data)

Calculate RAQ values from ADC data.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_raw_dataPointer to raw data.
[in]p_zmod4xxx_dataPointer to ZMOD4XXXX data structure.

◆ relIaqDataCalculate

fsp_err_t(* rm_zmod4xxx_api_t::relIaqDataCalculate) (rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_rel_iaq_data_t *const p_zmod4xxx_data)

Calculate Relative IAQ values from ADC data.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_raw_dataPointer to raw data.
[in]p_zmod4xxx_dataPointer to ZMOD4XXXX data structure.

◆ pbaqDataCalculate

fsp_err_t(* rm_zmod4xxx_api_t::pbaqDataCalculate) (rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_pbaq_data_t *const p_zmod4xxx_data)

Calculate PBAQ values from ADC data.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_raw_dataPointer to raw data.
[in]p_zmod4xxx_dataPointer to ZMOD4XXXX data structure.

◆ no2O3DataCalculate

fsp_err_t(* rm_zmod4xxx_api_t::no2O3DataCalculate) (rm_zmod4xxx_ctrl_t *const p_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_no2_o3_data_t *const p_zmod4xxx_data)

Calculate NO2 O3 values from ADC data.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_raw_dataPointer to raw data.
[in]p_zmod4xxx_dataPointer to ZMOD4XXXX data structure.

◆ temperatureAndHumiditySet

fsp_err_t(* rm_zmod4xxx_api_t::temperatureAndHumiditySet) (rm_zmod4xxx_ctrl_t *const p_ctrl, float temperature, float humidity)

Set temperature and humidity.

Parameters
[in]p_ctrlPointer to control structure.
[in]temperatureTemperature (deg C).
[in]humidityHumidity (percent).

◆ deviceErrorCheck

fsp_err_t(* rm_zmod4xxx_api_t::deviceErrorCheck) (rm_zmod4xxx_ctrl_t *const p_ctrl)

Check device error event.

Parameters
[in]p_ctrlPointer to control structure.

◆ close

fsp_err_t(* rm_zmod4xxx_api_t::close) (rm_zmod4xxx_ctrl_t *const p_ctrl)

Close the sensor

Parameters
[in]p_ctrlPointer to control structure.

◆ rm_zmod4xxx_instance_t

struct rm_zmod4xxx_instance_t

ZMOD4XXX instance

Data Fields
rm_zmod4xxx_ctrl_t * p_ctrl

Pointer to the control structure for this instance

rm_zmod4xxx_cfg_t const * p_cfg

Pointer to the configuration structure for this instance

rm_zmod4xxx_api_t const * p_api

Pointer to the API structure for this instance

Typedef Documentation

◆ rm_zmod4xxx_ctrl_t

typedef void rm_zmod4xxx_ctrl_t

ZMOD4xxx Control block. Allocate an instance specific control block to pass into the API calls.

Enumeration Type Documentation

◆ rm_zmod4xxx_event_t

Event in the callback function

Enumerator
RM_ZMOD4XXX_EVENT_DEV_ERR_POWER_ON_RESET 

Unexpected reset.

RM_ZMOD4XXX_EVENT_DEV_ERR_ACCESS_CONFLICT 

Getting invalid results while results readout.

RM_ZMOD4XXX_EVENT_DEV_ERR_DAMAGE 

Sensor may be damaged.

◆ rm_zmod4xxx_sulfur_odor_t

Sulfur-Odor status