Z-Wave Protocol Controller Reference
zwapi_protocol_basis.c File Reference
#include <string.h>
#include "zwapi_protocol_basis.h"
#include "zwapi_func_ids.h"
#include "zwapi_internal.h"
#include "zwapi_session.h"
#include "zwapi_init.h"
#include "sl_log.h"
#include "zwapi_utils.h"
Include dependency graph for zwapi_protocol_basis.c:

Classes

struct  zwave_rf_region_cache
 Struct that helps us cache the RF Region and avoid querying the Z-Wave API all the time for something that does not change. More...
 

Macros

#define LOG_TAG   "zwapi_protocol_basis"
 

Typedefs

typedef struct zwave_rf_region_cache zwave_rf_region_cache_t
 Struct that helps us cache the RF Region and avoid querying the Z-Wave API all the time for something that does not change. More...
 

Functions

sl_status_t zwapi_soft_reset (void)
 Reset the Z-Wave module. More...
 
uint8_t zwapi_get_zw_protocol_status (void)
 Report the status of the Z-Wave protocol. More...
 
uint8_t zwapi_get_zw_library_type (void)
 Get the Z-Wave library type. More...
 
uint8_t zwapi_get_zw_library_version (uint8_t *pBuf)
 Get the Z-Wave library basis version. More...
 
sl_status_t zwapi_set_rf_receive_mode (uint8_t mode)
 Initialize the Z-Wave RF chip. More...
 
rf_power_level_t zwapi_set_rf_power_level (rf_power_level_t powerLevel)
 Set the power level to used in RF transmissions. More...
 
rf_power_level_t zwapi_get_rf_power_level (void)
 Get the current power level used in RF transmitting. More...
 
sl_status_t zwapi_set_tx_status_reporting (bool enable)
 Configure whether zwapi_send_data callbacks should contain tx_status report information. More...
 
sl_status_t zwapi_set_max_lr_tx_power_level (int16_t level)
 Set the current MAX Long Range TX power level. More...
 
sl_status_t zwapi_set_tx_power_level (tx_power_level_t txpowerlevel)
 Set the current TX power level. More...
 
int16_t zwapi_get_max_lr_tx_power_level (void)
 Get the current MAX Long Range TX power level in effect. More...
 
tx_power_level_t zwapi_get_tx_power_level (void)
 Get the current TX power level in effect. More...
 
bool zwapi_is_pti_supported ()
 Check if PTI supported. More...
 
bool zwapi_is_pti_enabled ()
 Get the current state of pti. More...
 
sl_status_t zwapi_set_radio_pti (bool state)
 Enable/disable the PTI on Z-Wave Radio. More...
 
sl_status_t zwapi_set_rf_region (zwave_rf_region_t rfregion)
 Set the current RF region. More...
 
zwave_rf_region_t zwapi_get_rf_region (void)
 Get the current RF region. More...
 
sl_status_t zwapi_get_maximum_payload_size (uint8_t *maximum_size)
 Get the maximum payload size allowed for sending frames in Z-Wave. More...
 
sl_status_t zwapi_get_lr_maximum_payload_size (uint8_t *maximum_size)
 Get the maximum payload size allowed for sending frames in Z-Wave Long Range. More...
 
sl_status_t zwapi_set_node_id_basetype (zwave_node_id_basetype_t basetype)
 Set Z-Wave node ID basetype, either 8 bits or 16 bits used to store a node ID. More...
 
zwave_node_id_basetype_t zwapi_get_node_id_basetype ()
 Get the current node ID basetype setting. More...
 
sl_status_t zwapi_send_node_information (zwave_node_id_t destNode, uint8_t txOptions, void(*completedFunc)(uint8_t))
 Create and transmit a "Node Information" frame. More...
 
sl_status_t zwapi_send_test_frame (zwave_node_id_t destination_node_id, rf_power_level_t power_level, void(*callback_function)(uint8_t tx_status))
 Send a test frame to specified NodeID. More...
 
sl_status_t zwapi_get_random_word (uint8_t *random_buffer, uint8_t number_of_random_bytes)
 Generate an array of random bytes using the random number generator (RNG) on the Z-Wave module. More...
 
sl_status_t zwapi_get_random_byte (uint8_t *user_byte)
 Generate a random byte using the random number generator (RNG) on the Z-Wave module. More...
 
sl_status_t zwapi_explore_request_inclusion ()
 Transmit a request for inclusion via an explore frame. More...
 
sl_status_t zwapi_explore_request_exclusion ()
 Transmit a request for exclusion via an explore frame. More...
 
sl_status_t zwapi_disable_watchdog ()
 Disable the Watchdog. More...
 
sl_status_t zwapi_enable_watchdog ()
 Enable the Watchdog. More...
 
sl_status_t zwapi_start_watchdog ()
 Enable Watchdog and start kicking it in the Z-Wave chip. More...
 
sl_status_t zwapi_get_background_rssi (uint8_t *rssi_values, uint8_t *values_length)
 Get the latest value of the background RSSI. More...
 
sl_status_t zwapi_set_application_node_information (uint8_t listening, node_type_t node_type, const uint8_t *nodeParm, uint8_t parmLength)
 Set ApplicationNodeInformation data to be used in subsequent calls to zwapi_send_node_information(). More...
 
sl_status_t zwapi_enable_auto_program_mode (void)
 Enable Auto Programming mode. More...
 
sl_status_t zwapi_get_full_node_list (zwave_nodemask_t node_list)
 Get the entire list of nodes in our network (both Z-Wave and Z-Wave Long Range) More...
 
sl_status_t zwapi_get_long_range_nodes (uint16_t *number_of_bytes, zwave_nodemask_t lr_node_list)
 Get Z-Wave Long Range node list in ZW_LR_NODEMASK_OFFSET offset of zwave_nodemask_t. More...
 
sl_status_t zwapi_get_long_range_channel (uint8_t *lr_channel)
 Get the Z-Wave Long Range radio channel in use. More...
 
sl_status_t zwapi_set_long_range_channel (uint8_t lr_channel)
 Set the Z-Wave Long Range radio channel in use. More...
 
bool zwapi_supports_long_range ()
 Return whether the Z-Wave module supports Long Range. More...
 
bool zwapi_supports_nls ()
 Return whether the Z-Wave module supports Network Layer Security. More...
 

Variables

static zwave_node_id_basetype_t node_id_basetype_setting = NODEID_8BITS
 
static zwave_rf_region_cache_t rf_region_cache = {.valid = false, .rf_region = ZWAVE_RF_REGION_UNDEFINED}
 

Macro Definition Documentation

◆ LOG_TAG

#define LOG_TAG   "zwapi_protocol_basis"

Typedef Documentation

◆ zwave_rf_region_cache_t

Struct that helps us cache the RF Region and avoid querying the Z-Wave API all the time for something that does not change.

Variable Documentation

◆ node_id_basetype_setting

zwave_node_id_basetype_t node_id_basetype_setting = NODEID_8BITS
static

◆ rf_region_cache

zwave_rf_region_cache_t rf_region_cache = {.valid = false, .rf_region = ZWAVE_RF_REGION_UNDEFINED}
static