Z-Wave Protocol Controller Reference
Z-Wave RX Internals

Private definitions for the Z-Wave RX Component. More...

Collaboration diagram for Z-Wave RX Internals:

Macros

#define ZWAVE_RX_VERIFY_OVERFLOW(current_index, array_length)
 

Functions

sl_status_t zwave_rx_init (const char *serial_port, int *serial_port_fd, int8_t normal_tx_power_dbm, int8_t measured_0dBm_power, int16_t max_lr_tx_power_dbm, zwave_controller_region_t region)
 Initialize the Z-Wave Rx component. More...
 
void zwave_rx_shutdown ()
 Shutdown the module. More...
 
void zwave_rx_on_zwave_api_started ()
 Inform other components that Z-Wave RX just receievd a Z-Wave API started notification. More...
 

Detailed Description

Private definitions for the Z-Wave RX Component.

These functions are used by the Z-Wave RX Fixture for init and teardown and by the Z-Wave RX Process for listening to incoming messages from the Z-Wave module.

Macro Definition Documentation

◆ ZWAVE_RX_VERIFY_OVERFLOW

#define ZWAVE_RX_VERIFY_OVERFLOW (   current_index,
  array_length 
)
Value:
if (current_index >= array_length) { \
return; \
}

Function Documentation

◆ zwave_rx_init()

sl_status_t zwave_rx_init ( const char *  serial_port,
int *  serial_port_fd,
int8_t  normal_tx_power_dbm,
int8_t  measured_0dBm_power,
int16_t  max_lr_tx_power_dbm,
zwave_controller_region_t  region 
)

Initialize the Z-Wave Rx component.

This will setup the Z-Wave rx component and initialize the underlying zwave api, by connecting to the Z-Wave controller serial dongle. A contiki process will be spawnded, which will register itself with the main loop select function.

The dongle will be initalized with RF region and maximun transmission power.

Parameters
serial_portName of the serial port which hosts the Z-Wave controller module
serial_port_fdPointer for the function to return the file descriptor used by the Z-Wave API module.
normal_tx_power_dbmThe power level used when transmitting frames at normal power. The power level is in deci dBm, for example 1 dBm output power will be 10 in normal_tx_power_dbm and -2 dBm will be -20 in normal_tx_power_dbm.
measured_0dBm_powerThe output power measured from the antenna when normal_tx_power_dbm is set to 0 dBm. The power level is in deci dBm, for example 1dBm output power will be 10 in measured_0dBm_power and -2 dBm will be -20 in measured_0dBm_power.
Note
On a protocols prior to 7.xx, measured_0dBm_power is ignored.
Parameters
max_lr_tx_power_dbmThe Z-Wave Max Long Range Transmit power level. The power level is in deci dBm, for example 1 dBm output power will be 10 in max_lr_tx_power_dbm and -2 dBm will be -20 in max_lr_tx_power_dbm.
regionThe region/frequency for the radio.
Note
On a protocols prior to 7.xx the rf region is ignored.
Returns
SL_STATUS_SUCCESS if the initializations was successful.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_rx_on_zwave_api_started()

void zwave_rx_on_zwave_api_started ( )

Inform other components that Z-Wave RX just receievd a Z-Wave API started notification.

Here is the caller graph for this function:

◆ zwave_rx_shutdown()

void zwave_rx_shutdown ( )

Shutdown the module.

This will shutdown the zwave_rx module, by closing the serial port and stop the contiki process.

Here is the call graph for this function:
Here is the caller graph for this function: