Z-Wave Protocol Controller Reference
Controller API

Functions in the Z-Wave controller API. More...

Collaboration diagram for Controller API:

Classes

struct  _ZW_MULTI_DEST_
 
struct  LEARN_INFO
 Learn mode state information passed by the call back function. More...
 
struct  zwapi_node_info_header
 

Macros

#define ADD_NODE_MODE_MASK   0x0F
 zwapi_add_node_to_network() mode mask More...
 
#define ZW_LEARN_MODE_RETURN_INTERVIEW_STATUS   0x01
 zwapi_set_learn_mode() return interview status bit More...
 
#define ZW_SUC_FUNC_NODEID_SERVER   0x01
 SUC capabilities used in zwapi_set_suc_node_id() More...
 
#define GET_NLS_NODES_OFFSET_GRANULARITY_IN_BYTES   128
 Each increase in offset in nodeID is reflected in this value multiplied by 8. More...
 

Typedefs

typedef struct _ZW_MULTI_DEST_ ZW_MULTI_DEST
 
typedef struct LEARN_INFO LEARN_INFO
 Learn mode state information passed by the call back function. More...
 
typedef struct zwapi_node_info_header zwapi_node_info_header_t
 

Functions

sl_status_t zwapi_replication_receive_complete (void)
 Send command completed to primary controller. More...
 
sl_status_t zwapi_send_controller_replication (zwave_node_id_t destNodeID, const uint8_t *pData, uint8_t dataLength, uint8_t txOptions, void(*completedFunc)(uint8_t))
 Send the payload and expect the receiver to respond with a command complete message. More...
 
sl_status_t zwapi_get_protocol_info (zwave_node_id_t node_id, zwapi_node_info_header_t *node_info_header)
 Copy the Node's current protocol information from the non-volatile memory. More...
 
sl_status_t zwapi_assign_return_route (zwave_node_id_t bSrcNodeID, zwave_node_id_t bDstNodeID, void(*completedFunc)(uint8_t bStatus))
 Assign static return routes within a Routing End Node. More...
 
sl_status_t zwapi_delete_return_route (zwave_node_id_t nodeID, void(*completedFunc)(uint8_t bStatus))
 Delete static return routes within a Routing End Node. More...
 
sl_status_t zwapi_set_default (void(*completedFunc)(void))
 Remove all Nodes and timers from the EEPROM memory. More...
 
bool zwapi_is_node_failed (zwave_node_id_t nodeID)
 Check if a node is in the failed nodes table. More...
 
uint8_t zwapi_remove_failed_node (zwave_node_id_t NodeID, void(*completedFunc)(uint8_t))
 Remove a node from the failed node list, if it already exist. More...
 
uint8_t zwapi_replace_failed_node (zwave_node_id_t bNodeID, bool bNormalPower, void(*completedFunc)(uint8_t))
 Replace a node from the failed node list. More...
 
sl_status_t zwapi_set_suc_node_id (zwave_node_id_t nodeID, uint8_t SUCState, uint8_t bTxOption, uint8_t bCapabilities, void(*completedFunc)(uint8_t txStatus))
 Enable/disable the Static Update Controller functionality in a specified static controller. More...
 
zwave_node_id_t zwapi_get_suc_node_id (void)
 Get the currently registered SUC node ID. More...
 
sl_status_t zwapi_request_network_update (void(*completedFunc)(uint8_t txStatus))
 Request network topology updates from the SUC/SIS node. More...
 
sl_status_t zwapi_assign_suc_return_route (zwave_node_id_t bSrcNodeID, void(*completedFunc)(uint8_t bStatus))
 Assign static return routes within a Routing End Node. More...
 
sl_status_t zwapi_delete_suc_return_route (zwave_node_id_t bNodeID, void(*completedFunc)(uint8_t bStatus))
 Delete the (Static Update Controller -SUC-) static return routes within a Routing End Node. More...
 
sl_status_t zwapi_request_neighbor_update (zwave_node_id_t bNodeID, void(*completedFunc)(uint8_t))
 Start neighbor discovery for bNodeID. More...
 
bool zwapi_is_node_primary_ctrl (void)
 Query whether the controller is a primary controller or a secondary controller in the network. More...
 
sl_status_t zwapi_create_new_primary_ctrl (uint8_t bMode, void(*completedFunc)(LEARN_INFO *))
 Create a new primary controller. More...
 
uint8_t zwapi_get_controller_capabilities (void)
 Get capabilities of a controller. More...
 
sl_status_t zwapi_request_node_info (zwave_node_id_t node_id)
 Request node information from a node. More...
 
sl_status_t zwapi_set_learn_mode (uint8_t mode, void(*completedFunc)(LEARN_INFO *))
 Enable/disable Z-Wave Learn Mode. More...
 
sl_status_t zwapi_add_node_to_network (uint8_t bMode, void(*completedFunc)(LEARN_INFO *))
 Add any type of node to the network. More...
 
sl_status_t zwapi_remove_node_from_network (uint8_t bMode, void(*completedFunc)(LEARN_INFO *))
 Remove any type of node from the network. More...
 
sl_status_t zwapi_transfer_primary_ctrl_role (uint8_t bMode, void(*completedFunc)(LEARN_INFO *))
 Transfer the role as primary controller to another controller. More...
 
sl_status_t zwapi_set_max_source_route (uint8_t maxRouteTries)
 Set the maximum number of source routing attempts before the explorer frame mechanism kicks in. More...
 
uint8_t zwapi_get_priority_route (zwave_node_id_t bNodeID, uint8_t *pPriorityRoute)
 Get the Last Working Route (LWR) for a destination node if any exist. More...
 
sl_status_t zwapi_set_priority_route (zwave_node_id_t bNodeID, uint8_t *pPriorityRoute)
 Set the Last Working Route (LWR) for a destination node. More...
 
sl_status_t zwapi_set_virtual_node_to_learn_mode (zwave_node_id_t node, uint8_t mode, void(*learnFunc)(uint8_t bStatus, zwave_node_id_t orgID, zwave_node_id_t newID))
 Enable/disable learn mode for a virtual node. More...
 
sl_status_t zwapi_get_virtual_nodes (zwave_nodemask_t nodeMask)
 Request nodemask containing virtual nodes in controller bridge. More...
 
sl_status_t zwapi_get_old_routing_info (zwave_node_id_t bNodeID, uint8_t *buf, uint8_t bRemoveBad, uint8_t bRemoveNonReps)
 Read out neighbor information. More...
 
sl_status_t zwapi_enable_suc (uint8_t state, uint8_t capabilities)
 Enable the SUC functionality in a controller. More...
 
sl_status_t zwapi_add_smartstart_node_to_network (uint8_t bMode, const uint8_t *dsk, void(*completedFunc)(LEARN_INFO *))
 Add any type of node to the network and accept prekit inclusion. More...
 
sl_status_t zwapi_set_virtual_node_application_node_information (zwave_node_id_t dstNode, uint8_t listening, const node_type_t *node_type, uint8_t *nodeParm, uint8_t parmLength)
 Sets the Application Node Information data for all virtual nodes owned by the Z-Wave API Module. More...
 
sl_status_t zwapi_transfer_protocol_cc (const zwave_node_id_t srcNode, const uint8_t decryptionKey, uint8_t payloadLength, const uint8_t *const payload)
 Transfer a decrypted Protocol Command Class to the controller module. More...
 
sl_status_t zwapi_enable_node_nls (const zwave_node_id_t nodeId)
 Set the NLS State of the node in the controller NVM. More...
 
sl_status_t zwapi_get_node_nls (const zwave_node_id_t nodeId, uint8_t *nls_state, uint8_t *nls_support)
 Get the NLS State of the node in the controller NVM. More...
 
sl_status_t zwapi_get_nls_nodes (uint16_t *list_length, zwave_nodemask_t node_list)
 Get the NLS State of the nodes of a network in the controller NVM. More...
 
sl_status_t zwapi_request_protocol_cc_encryption_callback (uint8_t tx_status, const zwapi_tx_report_t *tx_report, uint8_t session_id)
 Sends TX status, TX report and session ID of the ongoing protocol command class encryption session to the Z-Wave API module. More...
 

zwapi_add_node_to_network() mode values

#define ADD_NODE_ANY   1
 
#define ADD_NODE_CONTROLLER   2
 
#define ADD_NODE_END_NODE   3
 
#define ADD_NODE_EXISTING   4
 
#define ADD_NODE_STOP   5
 
#define ADD_NODE_STOP_FAILED   6
 
#define ADD_NODE_ANY_S2   7
 
#define ADD_NODE_HOME_ID   8
 
#define ADD_NODE_SMART_START   9
 

zwapi_add_node_to_network() option values

#define ADD_NODE_OPTION_NORMAL_POWER   0x80
 
#define ADD_NODE_OPTION_NETWORK_WIDE   0x40
 
#define ADD_NODE_OPTION_LONG_RANGE   0x20
 

zwapi_add_node_to_network() callback status values

#define ADD_NODE_STATUS_LEARN_READY   1
 
#define ADD_NODE_STATUS_NODE_FOUND   2
 
#define ADD_NODE_STATUS_ADDING_END_NODE   3
 
#define ADD_NODE_STATUS_ADDING_CONTROLLER   4
 
#define ADD_NODE_STATUS_PROTOCOL_DONE   5
 
#define ADD_NODE_STATUS_DONE   6
 
#define ADD_NODE_STATUS_FAILED   7
 
#define ADD_NODE_STATUS_SECURITY_FAILED   9
 
#define ADD_NODE_STATUS_INTERVIEW_DONE   10
 
#define ADD_NODE_STATUS_NOT_PRIMARY   0x23
 

zwapi_remove_node_from_network() mode values

#define REMOVE_NODE_ANY   ADD_NODE_ANY
 
#define REMOVE_NODE_CONTROLLER   ADD_NODE_CONTROLLER
 
#define REMOVE_NODE_END_NODE   ADD_NODE_END_NODE
 
#define REMOVE_NODE_STOP   ADD_NODE_STOP
 

zwapi_remove_node_from_network() mode mask

#define REMOVE_NODE_MODE_MASK   ADD_NODE_MODE_MASK
 

zwapi_remove_node_from_network() option values

#define REMOVE_NODE_OPTION_NORMAL_POWER   ADD_NODE_OPTION_NORMAL_POWER
 
#define REMOVE_NODE_OPTION_NETWORK_WIDE   ADD_NODE_OPTION_NETWORK_WIDE
 

zwapi_remove_node_from_network() callback status values

#define REMOVE_NODE_STATUS_LEARN_READY   ADD_NODE_STATUS_LEARN_READY
 
#define REMOVE_NODE_STATUS_NODE_FOUND   ADD_NODE_STATUS_NODE_FOUND
 
#define REMOVE_NODE_STATUS_REMOVING_END_NODE   ADD_NODE_STATUS_ADDING_END_NODE
 
#define REMOVE_NODE_STATUS_REMOVING_CONTROLLER   ADD_NODE_STATUS_ADDING_CONTROLLER
 
#define REMOVE_NODE_STATUS_DONE   ADD_NODE_STATUS_DONE
 
#define REMOVE_NODE_STATUS_FAILED   ADD_NODE_STATUS_FAILED
 

zwapi_create_new_primary_ctrl() mode values

#define CREATE_PRIMARY_START   ADD_NODE_CONTROLLER
 
#define CREATE_PRIMARY_STOP   ADD_NODE_STOP
 
#define CREATE_PRIMARY_STOP_FAILED   ADD_NODE_STOP_FAILED
 

zwapi_transfer_primary_ctrl_role() mode values

#define CONTROLLER_CHANGE_START   ADD_NODE_CONTROLLER
 
#define CONTROLLER_CHANGE_STOP   ADD_NODE_STOP
 
#define CONTROLLER_CHANGE_STOP_FAILED   ADD_NODE_STOP_FAILED
 

zwapi_set_learn_mode() mode values

#define LEARN_MODE_DISABLE   0x00
 
#define LEARN_MODE_DIRECT_RANGE   0x01
 
#define LEARN_MODE_NWI   0x81
 
#define LEARN_MODE_NWE   0x83
 
#define LEARN_MODE_SMART_START   0x84
 

zwapi_set_learn_mode() callback status values

#define LEARN_MODE_STARTED   ADD_NODE_STATUS_LEARN_READY
 
#define LEARN_MODE_DONE   ADD_NODE_STATUS_DONE
 
#define LEARN_MODE_FAILED   ADD_NODE_STATUS_FAILED
 
#define LEARN_MODE_INTERVIEW_COMPLETED   0x0A
 

zwapi_request_neighbor_update() callback status values

#define REQUEST_NEIGHBOR_UPDATE_STARTED   0x21
 
#define REQUEST_NEIGHBOR_UPDATE_DONE   0x22
 
#define REQUEST_NEIGHBOR_UPDATE_FAILED   0x23
 

application_controller_update_function() callback status values

#define UPDATE_STATE_SUC_ID   0x10
 
#define UPDATE_STATE_DELETE_DONE   0x20
 
#define UPDATE_STATE_NEW_ID_ASSIGNED   0x40
 
#define UPDATE_STATE_ROUTING_PENDING   0x80
 
#define UPDATE_STATE_NODE_INFO_REQ_FAILED   0x81
 
#define UPDATE_STATE_NODE_INFO_REQ_DONE   0x82
 
#define UPDATE_STATE_NOP_POWER_RECEIVED   0x83
 
#define UPDATE_STATE_NODE_INFO_RECEIVED   0x84
 
#define UPDATE_STATE_NODE_INFO_FOREIGN_HOMEID_RECEIVED   0x85
 
#define UPDATE_STATE_INCLUDED_NODE_INFO_RECEIVED   0x86
 
#define UPDATE_STATE_NODE_INFO_SMARTSTART_HOMEID_RECEIVED_LR   0x87
 

zwapi_remove_failed_node() and zwapi_replace_failed_node() return value and bit flags

The removing/replacing failed node process started

#define ZW_FAILED_NODE_REMOVE_STARTED   0x00
 
#define ZW_NOT_PRIMARY_CONTROLLER   0x02
 
#define ZW_NO_CALLBACK_FUNCTION   0x04
 The removing process was aborted because no call back function is used. More...
 
#define ZW_FAILED_NODE_NOT_FOUND   0x08
 The removing process aborted because the node was node found. More...
 
#define ZW_FAILED_NODE_REMOVE_PROCESS_BUSY   0x10
 The removing process is busy. More...
 
#define ZW_FAILED_NODE_REMOVE_FAIL   0x20
 The removing process could not be started. More...
 

zwapi_remove_failed_node() and zwapi_replace_failed_node() callback status values

The node is working properly (removed from the failed nodes list)

#define ZW_NODE_OK   0
 
#define ZW_FAILED_NODE_REMOVED   1
 The failed node was removed from the failed nodes list. More...
 
#define ZW_FAILED_NODE_NOT_REMOVED   2
 The failed node was not removed from the failing nodes list. More...
 

zwapi_replace_failed_node() callback status definitions

The failed node are ready to be replaced and controller is ready to add new node with nodeID of the failed node

#define ZW_FAILED_NODE_REPLACE   3
 
#define ZW_FAILED_NODE_REPLACE_DONE   4
 The failed node has been replaced. More...
 
#define ZW_FAILED_NODE_REPLACE_FAILED   5
 The failed node has not been replaced. More...
 

zwapi_request_network_update() callback values

#define ZW_SUC_UPDATE_DONE   0x00
 
#define ZW_SUC_UPDATE_ABORT   0x01
 
#define ZW_SUC_UPDATE_WAIT   0x02
 
#define ZW_SUC_UPDATE_DISABLED   0x03
 
#define ZW_SUC_UPDATE_OVERFLOW   0x04
 
#define ZW_SUC_SET_SUCCEEDED   0x05
 
#define ZW_SUC_SET_FAILED   0x06
 

zwapi_get_controller_capabilities() bit flag values

#define CONTROLLER_IS_SECONDARY   0x01
 
#define CONTROLLER_ON_OTHER_NETWORK   0x02
 
#define CONTROLLER_NODEID_SERVER_PRESENT   0x04
 
#define CONTROLLER_IS_REAL_PRIMARY   0x08
 
#define CONTROLLER_IS_SUC   0x10
 
#define NO_NODES_INCLUDED   0x20
 

Z-Wave RF speed definitions

#define ZW_RF_SPEED_NONE   0x0000
 
#define ZW_RF_SPEED_9600   0x0001
 
#define ZW_RF_SPEED_40K   0x0002
 
#define ZW_RF_SPEED_100K   0x0003
 
#define ZW_RF_SPEED_MASK   0x0007
 

zwapi_get_old_routing_info() options

#define GET_ROUTING_INFO_REMOVE_BAD   0x80
 
#define GET_ROUTING_INFO_REMOVE_NON_REPS   0x40
 
#define ZW_GET_ROUTING_INFO_ANY   ZW_RF_SPEED_NONE
 
#define ZW_GET_ROUTING_INFO_9600   ZW_RF_SPEED_9600
 
#define ZW_GET_ROUTING_INFO_40K   ZW_RF_SPEED_40K
 
#define ZW_GET_ROUTING_INFO_100K   ZW_RF_SPEED_100K
 
#define ZW_GET_ROUTING_INFO_SPEED_MASK   ZW_RF_SPEED_MASK
 

zwapi_get_priority_route() and zwapi_set_priority_route() route structure definitions

#define ROUTECACHE_LINE_CONF_SIZE   1
 
#define ROUTECACHE_LINE_SIZE   (MAX_REPEATERS + ROUTECACHE_LINE_CONF_SIZE)
 

PriorityRoute index definitions

#define ROUTECACHE_LINE_REPEATER_0_INDEX   0
 
#define ROUTECACHE_LINE_REPEATER_1_INDEX   1
 
#define ROUTECACHE_LINE_REPEATER_2_INDEX   2
 
#define ROUTECACHE_LINE_REPEATER_3_INDEX   3
 
#define ROUTECACHE_LINE_CONF_INDEX   4
 

zwapi_get_priority_route() and zwapi_set_priority_route() speed definitions

#define ZW_PRIORITY_ROUTE_SPEED_9600   ZW_RF_SPEED_9600
 
#define ZW_PRIORITY_ROUTE_SPEED_40K   ZW_RF_SPEED_40K
 
#define ZW_PRIORITY_ROUTE_SPEED_100K   ZW_RF_SPEED_100K
 

zwapi_get_priority_route() function return values

Route returned is a Application defined Priority Route - APP_PR

#define ZW_PRIORITY_ROUTE_APP_PR   0x10
 
#define ZW_PRIORITY_ROUTE_ZW_LWR   0x01
 Route returned is a Last Working Route - ZW_LWR. More...
 
#define ZW_PRIORITY_ROUTE_ZW_NLWR   0x02
 Route returned is a Next to Last Working Route - ZW_NLWR. More...
 

virtual End Nodes inclusion/exclusion defines

Are returned as callback parameter when callback, setup with zwapi_set_virtual_node_to_learn_mode(), is called during inclusion/exclusion process

#define ASSIGN_COMPLETE   0x00
 
#define ASSIGN_NODEID_DONE   0x01
 Node ID have been assigned. More...
 
#define ASSIGN_RANGE_INFO_UPDATE   0x02
 Node is doing Neighbor discovery. More...
 

zwapi_set_virtual_node_to_learn_mode() mode values

Disable End Node Learn Mode (disable possibility to add/remove Virtual End Nodes) Allowed when bridge is a primary controller, an inclusion controller or a secondary controller

#define VIRTUAL_END_NODE_LEARN_MODE_DISABLE   0x00
 
#define VIRTUAL_END_NODE_LEARN_MODE_ENABLE   0x01
 
#define VIRTUAL_END_NODE_LEARN_MODE_ADD   0x02
 
#define VIRTUAL_END_NODE_LEARN_MODE_REMOVE   0x03
 

Bit mask for multiDestsOffset_NodeMaskLen byte in the ZW_MULTI_DEST structure

Mask masking the number of bytes in multiDestNodeMask array. Valid value range [0 - 29]

#define MULTI_DEST_MASK_LEN_MASK   0x1F
 
#define MULTI_DEST_MASK_OFFSET_MASK   0xE0
 

Detailed Description

Functions in the Z-Wave controller API.

Functions in this module are generally used by Z-Wave controllers.

Macro Definition Documentation

◆ ADD_NODE_ANY

#define ADD_NODE_ANY   1

◆ ADD_NODE_ANY_S2

#define ADD_NODE_ANY_S2   7

◆ ADD_NODE_CONTROLLER

#define ADD_NODE_CONTROLLER   2

◆ ADD_NODE_END_NODE

#define ADD_NODE_END_NODE   3

◆ ADD_NODE_EXISTING

#define ADD_NODE_EXISTING   4

◆ ADD_NODE_HOME_ID

#define ADD_NODE_HOME_ID   8

◆ ADD_NODE_MODE_MASK

#define ADD_NODE_MODE_MASK   0x0F

◆ ADD_NODE_OPTION_LONG_RANGE

#define ADD_NODE_OPTION_LONG_RANGE   0x20

◆ ADD_NODE_OPTION_NETWORK_WIDE

#define ADD_NODE_OPTION_NETWORK_WIDE   0x40

◆ ADD_NODE_OPTION_NORMAL_POWER

#define ADD_NODE_OPTION_NORMAL_POWER   0x80

◆ ADD_NODE_SMART_START

#define ADD_NODE_SMART_START   9

◆ ADD_NODE_STATUS_ADDING_CONTROLLER

#define ADD_NODE_STATUS_ADDING_CONTROLLER   4

◆ ADD_NODE_STATUS_ADDING_END_NODE

#define ADD_NODE_STATUS_ADDING_END_NODE   3

◆ ADD_NODE_STATUS_DONE

#define ADD_NODE_STATUS_DONE   6

◆ ADD_NODE_STATUS_FAILED

#define ADD_NODE_STATUS_FAILED   7

◆ ADD_NODE_STATUS_INTERVIEW_DONE

#define ADD_NODE_STATUS_INTERVIEW_DONE   10

◆ ADD_NODE_STATUS_LEARN_READY

#define ADD_NODE_STATUS_LEARN_READY   1

◆ ADD_NODE_STATUS_NODE_FOUND

#define ADD_NODE_STATUS_NODE_FOUND   2

◆ ADD_NODE_STATUS_NOT_PRIMARY

#define ADD_NODE_STATUS_NOT_PRIMARY   0x23

◆ ADD_NODE_STATUS_PROTOCOL_DONE

#define ADD_NODE_STATUS_PROTOCOL_DONE   5

◆ ADD_NODE_STATUS_SECURITY_FAILED

#define ADD_NODE_STATUS_SECURITY_FAILED   9

◆ ADD_NODE_STOP

#define ADD_NODE_STOP   5

◆ ADD_NODE_STOP_FAILED

#define ADD_NODE_STOP_FAILED   6

◆ ASSIGN_COMPLETE

#define ASSIGN_COMPLETE   0x00

◆ ASSIGN_NODEID_DONE

#define ASSIGN_NODEID_DONE   0x01

Node ID have been assigned.

◆ ASSIGN_RANGE_INFO_UPDATE

#define ASSIGN_RANGE_INFO_UPDATE   0x02

Node is doing Neighbor discovery.

◆ CONTROLLER_CHANGE_START

#define CONTROLLER_CHANGE_START   ADD_NODE_CONTROLLER

◆ CONTROLLER_CHANGE_STOP

#define CONTROLLER_CHANGE_STOP   ADD_NODE_STOP

◆ CONTROLLER_CHANGE_STOP_FAILED

#define CONTROLLER_CHANGE_STOP_FAILED   ADD_NODE_STOP_FAILED

◆ CONTROLLER_IS_REAL_PRIMARY

#define CONTROLLER_IS_REAL_PRIMARY   0x08

◆ CONTROLLER_IS_SECONDARY

#define CONTROLLER_IS_SECONDARY   0x01

◆ CONTROLLER_IS_SUC

#define CONTROLLER_IS_SUC   0x10

◆ CONTROLLER_NODEID_SERVER_PRESENT

#define CONTROLLER_NODEID_SERVER_PRESENT   0x04

◆ CONTROLLER_ON_OTHER_NETWORK

#define CONTROLLER_ON_OTHER_NETWORK   0x02

◆ CREATE_PRIMARY_START

#define CREATE_PRIMARY_START   ADD_NODE_CONTROLLER

◆ CREATE_PRIMARY_STOP

#define CREATE_PRIMARY_STOP   ADD_NODE_STOP

◆ CREATE_PRIMARY_STOP_FAILED

#define CREATE_PRIMARY_STOP_FAILED   ADD_NODE_STOP_FAILED

◆ GET_NLS_NODES_OFFSET_GRANULARITY_IN_BYTES

#define GET_NLS_NODES_OFFSET_GRANULARITY_IN_BYTES   128

Each increase in offset in nodeID is reflected in this value multiplied by 8.

◆ GET_ROUTING_INFO_REMOVE_BAD

#define GET_ROUTING_INFO_REMOVE_BAD   0x80

◆ GET_ROUTING_INFO_REMOVE_NON_REPS

#define GET_ROUTING_INFO_REMOVE_NON_REPS   0x40

◆ LEARN_MODE_DIRECT_RANGE

#define LEARN_MODE_DIRECT_RANGE   0x01

◆ LEARN_MODE_DISABLE

#define LEARN_MODE_DISABLE   0x00

◆ LEARN_MODE_DONE

#define LEARN_MODE_DONE   ADD_NODE_STATUS_DONE

◆ LEARN_MODE_FAILED

#define LEARN_MODE_FAILED   ADD_NODE_STATUS_FAILED

◆ LEARN_MODE_INTERVIEW_COMPLETED

#define LEARN_MODE_INTERVIEW_COMPLETED   0x0A

◆ LEARN_MODE_NWE

#define LEARN_MODE_NWE   0x83

◆ LEARN_MODE_NWI

#define LEARN_MODE_NWI   0x81

◆ LEARN_MODE_SMART_START

#define LEARN_MODE_SMART_START   0x84

◆ LEARN_MODE_STARTED

#define LEARN_MODE_STARTED   ADD_NODE_STATUS_LEARN_READY

◆ MULTI_DEST_MASK_LEN_MASK

#define MULTI_DEST_MASK_LEN_MASK   0x1F

◆ MULTI_DEST_MASK_OFFSET_MASK

#define MULTI_DEST_MASK_OFFSET_MASK   0xE0

Mask masking the nodeID-1 represented by the first bit in the first byte in the multiDestNodeMask. Valid value range [0, 32, 64, 96...]

◆ NO_NODES_INCLUDED

#define NO_NODES_INCLUDED   0x20

◆ REMOVE_NODE_ANY

#define REMOVE_NODE_ANY   ADD_NODE_ANY

◆ REMOVE_NODE_CONTROLLER

#define REMOVE_NODE_CONTROLLER   ADD_NODE_CONTROLLER

◆ REMOVE_NODE_END_NODE

#define REMOVE_NODE_END_NODE   ADD_NODE_END_NODE

◆ REMOVE_NODE_MODE_MASK

#define REMOVE_NODE_MODE_MASK   ADD_NODE_MODE_MASK

◆ REMOVE_NODE_OPTION_NETWORK_WIDE

#define REMOVE_NODE_OPTION_NETWORK_WIDE   ADD_NODE_OPTION_NETWORK_WIDE

◆ REMOVE_NODE_OPTION_NORMAL_POWER

#define REMOVE_NODE_OPTION_NORMAL_POWER   ADD_NODE_OPTION_NORMAL_POWER

◆ REMOVE_NODE_STATUS_DONE

#define REMOVE_NODE_STATUS_DONE   ADD_NODE_STATUS_DONE

◆ REMOVE_NODE_STATUS_FAILED

#define REMOVE_NODE_STATUS_FAILED   ADD_NODE_STATUS_FAILED

◆ REMOVE_NODE_STATUS_LEARN_READY

#define REMOVE_NODE_STATUS_LEARN_READY   ADD_NODE_STATUS_LEARN_READY

◆ REMOVE_NODE_STATUS_NODE_FOUND

#define REMOVE_NODE_STATUS_NODE_FOUND   ADD_NODE_STATUS_NODE_FOUND

◆ REMOVE_NODE_STATUS_REMOVING_CONTROLLER

#define REMOVE_NODE_STATUS_REMOVING_CONTROLLER   ADD_NODE_STATUS_ADDING_CONTROLLER

◆ REMOVE_NODE_STATUS_REMOVING_END_NODE

#define REMOVE_NODE_STATUS_REMOVING_END_NODE   ADD_NODE_STATUS_ADDING_END_NODE

◆ REMOVE_NODE_STOP

#define REMOVE_NODE_STOP   ADD_NODE_STOP

◆ REQUEST_NEIGHBOR_UPDATE_DONE

#define REQUEST_NEIGHBOR_UPDATE_DONE   0x22

◆ REQUEST_NEIGHBOR_UPDATE_FAILED

#define REQUEST_NEIGHBOR_UPDATE_FAILED   0x23

◆ REQUEST_NEIGHBOR_UPDATE_STARTED

#define REQUEST_NEIGHBOR_UPDATE_STARTED   0x21

◆ ROUTECACHE_LINE_CONF_INDEX

#define ROUTECACHE_LINE_CONF_INDEX   4

◆ ROUTECACHE_LINE_CONF_SIZE

#define ROUTECACHE_LINE_CONF_SIZE   1

◆ ROUTECACHE_LINE_REPEATER_0_INDEX

#define ROUTECACHE_LINE_REPEATER_0_INDEX   0

◆ ROUTECACHE_LINE_REPEATER_1_INDEX

#define ROUTECACHE_LINE_REPEATER_1_INDEX   1

◆ ROUTECACHE_LINE_REPEATER_2_INDEX

#define ROUTECACHE_LINE_REPEATER_2_INDEX   2

◆ ROUTECACHE_LINE_REPEATER_3_INDEX

#define ROUTECACHE_LINE_REPEATER_3_INDEX   3

◆ ROUTECACHE_LINE_SIZE

#define ROUTECACHE_LINE_SIZE   (MAX_REPEATERS + ROUTECACHE_LINE_CONF_SIZE)

◆ UPDATE_STATE_DELETE_DONE

#define UPDATE_STATE_DELETE_DONE   0x20

◆ UPDATE_STATE_INCLUDED_NODE_INFO_RECEIVED

#define UPDATE_STATE_INCLUDED_NODE_INFO_RECEIVED   0x86

◆ UPDATE_STATE_NEW_ID_ASSIGNED

#define UPDATE_STATE_NEW_ID_ASSIGNED   0x40

◆ UPDATE_STATE_NODE_INFO_FOREIGN_HOMEID_RECEIVED

#define UPDATE_STATE_NODE_INFO_FOREIGN_HOMEID_RECEIVED   0x85

◆ UPDATE_STATE_NODE_INFO_RECEIVED

#define UPDATE_STATE_NODE_INFO_RECEIVED   0x84

◆ UPDATE_STATE_NODE_INFO_REQ_DONE

#define UPDATE_STATE_NODE_INFO_REQ_DONE   0x82

◆ UPDATE_STATE_NODE_INFO_REQ_FAILED

#define UPDATE_STATE_NODE_INFO_REQ_FAILED   0x81

◆ UPDATE_STATE_NODE_INFO_SMARTSTART_HOMEID_RECEIVED_LR

#define UPDATE_STATE_NODE_INFO_SMARTSTART_HOMEID_RECEIVED_LR   0x87

◆ UPDATE_STATE_NOP_POWER_RECEIVED

#define UPDATE_STATE_NOP_POWER_RECEIVED   0x83

◆ UPDATE_STATE_ROUTING_PENDING

#define UPDATE_STATE_ROUTING_PENDING   0x80

◆ UPDATE_STATE_SUC_ID

#define UPDATE_STATE_SUC_ID   0x10

◆ VIRTUAL_END_NODE_LEARN_MODE_ADD

#define VIRTUAL_END_NODE_LEARN_MODE_ADD   0x02

Add new Virtual End Node if possible. Allowed when bridge is a primary or an inclusion controller

◆ VIRTUAL_END_NODE_LEARN_MODE_DISABLE

#define VIRTUAL_END_NODE_LEARN_MODE_DISABLE   0x00

◆ VIRTUAL_END_NODE_LEARN_MODE_ENABLE

#define VIRTUAL_END_NODE_LEARN_MODE_ENABLE   0x01

Enable End Node Learn Mode - Enable possibility for including/excluding a Virtual End Node by an external primary/inclusion controller. Allowed when bridge is an inclusion controller or a secondary controller

◆ VIRTUAL_END_NODE_LEARN_MODE_REMOVE

#define VIRTUAL_END_NODE_LEARN_MODE_REMOVE   0x03

Remove existing Virtual End Node. Allowed when bridge is a primary or an inclusion controller

◆ ZW_FAILED_NODE_NOT_FOUND

#define ZW_FAILED_NODE_NOT_FOUND   0x08

The removing process aborted because the node was node found.

◆ ZW_FAILED_NODE_NOT_REMOVED

#define ZW_FAILED_NODE_NOT_REMOVED   2

The failed node was not removed from the failing nodes list.

◆ ZW_FAILED_NODE_REMOVE_FAIL

#define ZW_FAILED_NODE_REMOVE_FAIL   0x20

The removing process could not be started.

◆ ZW_FAILED_NODE_REMOVE_PROCESS_BUSY

#define ZW_FAILED_NODE_REMOVE_PROCESS_BUSY   0x10

The removing process is busy.

◆ ZW_FAILED_NODE_REMOVE_STARTED

#define ZW_FAILED_NODE_REMOVE_STARTED   0x00

◆ ZW_FAILED_NODE_REMOVED

#define ZW_FAILED_NODE_REMOVED   1

The failed node was removed from the failed nodes list.

◆ ZW_FAILED_NODE_REPLACE

#define ZW_FAILED_NODE_REPLACE   3

◆ ZW_FAILED_NODE_REPLACE_DONE

#define ZW_FAILED_NODE_REPLACE_DONE   4

The failed node has been replaced.

◆ ZW_FAILED_NODE_REPLACE_FAILED

#define ZW_FAILED_NODE_REPLACE_FAILED   5

The failed node has not been replaced.

◆ ZW_GET_ROUTING_INFO_100K

#define ZW_GET_ROUTING_INFO_100K   ZW_RF_SPEED_100K

◆ ZW_GET_ROUTING_INFO_40K

#define ZW_GET_ROUTING_INFO_40K   ZW_RF_SPEED_40K

◆ ZW_GET_ROUTING_INFO_9600

#define ZW_GET_ROUTING_INFO_9600   ZW_RF_SPEED_9600

◆ ZW_GET_ROUTING_INFO_ANY

#define ZW_GET_ROUTING_INFO_ANY   ZW_RF_SPEED_NONE

◆ ZW_GET_ROUTING_INFO_SPEED_MASK

#define ZW_GET_ROUTING_INFO_SPEED_MASK   ZW_RF_SPEED_MASK

◆ ZW_LEARN_MODE_RETURN_INTERVIEW_STATUS

#define ZW_LEARN_MODE_RETURN_INTERVIEW_STATUS   0x01

zwapi_set_learn_mode() return interview status bit

◆ ZW_NO_CALLBACK_FUNCTION

#define ZW_NO_CALLBACK_FUNCTION   0x04

The removing process was aborted because no call back function is used.

◆ ZW_NODE_OK

#define ZW_NODE_OK   0

◆ ZW_NOT_PRIMARY_CONTROLLER

#define ZW_NOT_PRIMARY_CONTROLLER   0x02

The removing process was aborted because the controller is not the primary one

◆ ZW_PRIORITY_ROUTE_APP_PR

#define ZW_PRIORITY_ROUTE_APP_PR   0x10

◆ ZW_PRIORITY_ROUTE_SPEED_100K

#define ZW_PRIORITY_ROUTE_SPEED_100K   ZW_RF_SPEED_100K

◆ ZW_PRIORITY_ROUTE_SPEED_40K

#define ZW_PRIORITY_ROUTE_SPEED_40K   ZW_RF_SPEED_40K

◆ ZW_PRIORITY_ROUTE_SPEED_9600

#define ZW_PRIORITY_ROUTE_SPEED_9600   ZW_RF_SPEED_9600

◆ ZW_PRIORITY_ROUTE_ZW_LWR

#define ZW_PRIORITY_ROUTE_ZW_LWR   0x01

Route returned is a Last Working Route - ZW_LWR.

◆ ZW_PRIORITY_ROUTE_ZW_NLWR

#define ZW_PRIORITY_ROUTE_ZW_NLWR   0x02

Route returned is a Next to Last Working Route - ZW_NLWR.

◆ ZW_RF_SPEED_100K

#define ZW_RF_SPEED_100K   0x0003

◆ ZW_RF_SPEED_40K

#define ZW_RF_SPEED_40K   0x0002

◆ ZW_RF_SPEED_9600

#define ZW_RF_SPEED_9600   0x0001

◆ ZW_RF_SPEED_MASK

#define ZW_RF_SPEED_MASK   0x0007

◆ ZW_RF_SPEED_NONE

#define ZW_RF_SPEED_NONE   0x0000

◆ ZW_SUC_FUNC_NODEID_SERVER

#define ZW_SUC_FUNC_NODEID_SERVER   0x01

SUC capabilities used in zwapi_set_suc_node_id()

◆ ZW_SUC_SET_FAILED

#define ZW_SUC_SET_FAILED   0x06

◆ ZW_SUC_SET_SUCCEEDED

#define ZW_SUC_SET_SUCCEEDED   0x05

◆ ZW_SUC_UPDATE_ABORT

#define ZW_SUC_UPDATE_ABORT   0x01

◆ ZW_SUC_UPDATE_DISABLED

#define ZW_SUC_UPDATE_DISABLED   0x03

◆ ZW_SUC_UPDATE_DONE

#define ZW_SUC_UPDATE_DONE   0x00

◆ ZW_SUC_UPDATE_OVERFLOW

#define ZW_SUC_UPDATE_OVERFLOW   0x04

◆ ZW_SUC_UPDATE_WAIT

#define ZW_SUC_UPDATE_WAIT   0x02

Typedef Documentation

◆ LEARN_INFO

typedef struct LEARN_INFO LEARN_INFO

Learn mode state information passed by the call back function.

◆ ZW_MULTI_DEST

◆ zwapi_node_info_header_t

Node info stored within the non-volatile memory. These are the first (protocol part) payload bytes from the Node Information frame

Function Documentation

◆ zwapi_add_node_to_network()

sl_status_t zwapi_add_node_to_network ( uint8_t  bMode,
void(*)(LEARN_INFO *)  completedFunc 
)

Add any type of node to the network.

Parameters
bModenetwork inclusion mode, one of:
completedFunccallback function which is called with the add node results.
Returns
SL_STATUS_OK or SL_STATUS_FAIL.

aka ZW_AddNodeToNetwork

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

◆ zwapi_add_smartstart_node_to_network()

sl_status_t zwapi_add_smartstart_node_to_network ( uint8_t  bMode,
const uint8_t *  dsk,
void(*)(LEARN_INFO *)  completedFunc 
)

Add any type of node to the network and accept prekit inclusion.

Parameters
bModeinclusion mode. Must always be ADD_NODE_HOME_ID, potentially coupled with these flags:
dskpointer to the 16-byte DSK.
completedFuncCallback function.
Returns
SL_STATUS_OK or SL_STATUS_FAIL.
Note
This should be called after receiving a application_controller_update_function with a whitelisted DSK.

aka ZW_AddNodeToNetworkSmartStart

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

◆ zwapi_assign_return_route()

sl_status_t zwapi_assign_return_route ( zwave_node_id_t  bSrcNodeID,
zwave_node_id_t  bDstNodeID,
void(*)(uint8_t bStatus)  completedFunc 
)

Assign static return routes within a Routing End Node.

Parameters
bSrcNodeIDis the Routing End Node ID
bDstNodeIDis the Route destination Node ID
completedFuncis the Callback function called when done
Returns
returns true if assign return route was initiated, or false if a return route assign/delete is already active

Calculate the shortest transport routes from the Routing End Node to the route destination node and transmit the return routes to the Routing End Node.

aka ZW_AssignReturnRoute

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

◆ zwapi_assign_suc_return_route()

sl_status_t zwapi_assign_suc_return_route ( zwave_node_id_t  bSrcNodeID,
void(*)(uint8_t bStatus)  completedFunc 
)

Assign static return routes within a Routing End Node.

Parameters
bSrcNodeIDis the Routing End Node NodeID
completedFuncis the Completion handler (the parameter bStatus is the Transmit complete status)
Returns
SL_STATUS_OK if assign SUC return route was initiated.
SL_STATUS_FAIL if a return route assign/delete is already active.

Calculate the shortest transport routes to a Routing End Node from the Static Update Controller (SUC) Node and transmit the return routes to the Routing End Node.

aka ZW_AssignSUCReturnRoute

◆ zwapi_create_new_primary_ctrl()

sl_status_t zwapi_create_new_primary_ctrl ( uint8_t  bMode,
void(*)(LEARN_INFO *)  completedFunc 
)

Create a new primary controller.

Parameters
bModeone of:
completedFuncCallback function.
Returns
SL_STATUS_OK or SL_STATUS_FAIL.

aka ZW_CreateNewPrimaryCtrl

Here is the call graph for this function:

◆ zwapi_delete_return_route()

sl_status_t zwapi_delete_return_route ( zwave_node_id_t  nodeID,
void(*)(uint8_t bStatus)  completedFunc 
)

Delete static return routes within a Routing End Node.

Parameters
nodeIDis the node id of the Routing End Node
completedFuncis the Completion handler. Its parameter bStatus is the the Transmit complete status.
Returns
returns true if delete return routes was initiated, or false if not

Transmits "NULL" routes to the Routing End Node.

aka ZW_DeleteReturnRoute

◆ zwapi_delete_suc_return_route()

sl_status_t zwapi_delete_suc_return_route ( zwave_node_id_t  bNodeID,
void(*)(uint8_t bStatus)  completedFunc 
)

Delete the (Static Update Controller -SUC-) static return routes within a Routing End Node.

Parameters
bNodeIDis the Routing End Node NodeID
completedFuncis the Completion handler (the parameter bStatus is the Transmit complete status)
Returns
SL_STATUS_OK if delete SUC return route was initiated
SL_STATUS_FAIL if a return route assign/delete is already active.

Transmit "NULL" routes to the Routing End Node.

aka ZW_DeleteSUCReturnRoute

◆ zwapi_enable_node_nls()

sl_status_t zwapi_enable_node_nls ( const zwave_node_id_t  nodeId)

Set the NLS State of the node in the controller NVM.

Parameters
nodeIdthe node ID
Note
the NLS State can only be set to 1
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwapi_enable_suc()

sl_status_t zwapi_enable_suc ( uint8_t  state,
uint8_t  capabilities 
)

Enable the SUC functionality in a controller.

Parameters
stateif true SUC is enabled, if false SUC is disabled.
capabilitiesis the capability of the SUC:
  • If ZW_SUC_FUNC_BASIC_SUC Only enable the basic SUC functionality
  • If ZW_SUC_FUNC_NODEID_SERVER : Enable the node ID server functionality to become a SIS.
Returns
SL_STATUS_OK if the SUC functionality was enabled/disabled.
SL_STATUS_FAIL potentially attempting to disable a running SUC, not allowed.

aka ZW_EnableSUC

Here is the call graph for this function:

◆ zwapi_get_controller_capabilities()

uint8_t zwapi_get_controller_capabilities ( void  )

Get capabilities of a controller.

Returns
returns a bitmask where following bits are defined: = CONTROLLER_IS_SECONDARY : If bit is set then the controller is a secondary controller
= CONTROLLER_ON_OTHER_NETWORK : If this bit is set then this controller is not using its build-in home ID
= CONTROLLER_IS_SUC : If this bit is set then this controller is a SUC
= CONTROLLER_NODEID_SERVER_PRESENT : If this bit is set then there is a SUC ID server (SIS) in the network and this controller can therefore include/exclude nodes in the network (inclusion controller).
= CONTROLLER_IS_REAL_PRIMARY : = CONTROLLER_IS_SUC : = NO_NODES_INCLUDED :

aka ZW_GetControllerCapabilities

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

◆ zwapi_get_nls_nodes()

sl_status_t zwapi_get_nls_nodes ( uint16_t *  list_length,
zwave_nodemask_t  node_list 
)

Get the NLS State of the nodes of a network in the controller NVM.

Parameters
list_lengthLength of the node list in bytes
node_listList of nodes with NLS state
Returns
SL_STATUS_OK or SL_STATUS_FAIL
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwapi_get_node_nls()

sl_status_t zwapi_get_node_nls ( const zwave_node_id_t  nodeId,
uint8_t *  nls_state,
uint8_t *  nls_support 
)

Get the NLS State of the node in the controller NVM.

Parameters
nodeIdthe node ID
nls_stateNLS state pointer to be filled
nls_supportNLS support pointer to be filled
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwapi_get_old_routing_info()

sl_status_t zwapi_get_old_routing_info ( zwave_node_id_t  bNodeID,
uint8_t *  buf,
uint8_t  bRemoveBad,
uint8_t  bRemoveNonReps 
)

Read out neighbor information.

Parameters
bNodeIDis the Node ID of a node whom routing info is needed
bufpointer to where routing info is stored
bRemoveBadis true the bad repeaters are removed
bRemoveNonRepsis the upper nibble is bit flag options, lower nibble is speed. Combine exactly one speed with any number of options.

Bit flags options for upper nibble:

  • ZW_GET_ROUTING_INFO_REMOVE_BAD - Remove bad link from routing info
  • ZW_GET_ROUTING_INFO_REMOVE_NON_REPS - Remove non-repeaters from the routing info

Speed values for lower nibble:

  • ZW_GET_ROUTING_INFO_ANY - Return all nodes regardless of speed
  • ZW_GET_ROUTING_INFO_9600 - Return nodes supporting 9.6k
  • ZW_GET_ROUTING_INFO_40K - Return nodes supporting 40k
  • ZW_GET_ROUTING_INFO_100K - Return nodes supporting 100k

aka ZW_GetRoutingInfo_old

Here is the call graph for this function:

◆ zwapi_get_priority_route()

uint8_t zwapi_get_priority_route ( zwave_node_id_t  bNodeID,
uint8_t *  pPriorityRoute 
)

Get the Last Working Route (LWR) for a destination node if any exist.

Parameters
bNodeIDNode ID (1...232) from whom the LWR is wanted.
pPriorityRoutepointer to a 5-byte array where the wanted LWR will be written. See below for details.
Returns
true if a LWR exists for bNodeID and the found route is copied to the 5-byte array pointed out by pPriorityRoute.
false if No LWR found for bNodeID.

CLEANUP COMMENT BEGIN

Return values could also be these ones (check the API guide):

  • Returns NON ZERO if a Priority Route is found. Priority route is either an Application injected Route or a LWR.
    • ZW_PRIORITY_ROUTE_APP_PR = Route is an App defined Priority Route
    • ZW_PRIORITY_ROUTE_ZW_LWR = Route is a Last Working Route
    • ZW_PRIORITY_ROUTE_ZW_NLWR = Route is a Next to Last Working Route
  • Returns zero if no Priority Route is found.

CLEANUP COMMENT END

The LWR is the last successful route used between sender and destination node. The LWR is stored in NVM on the Z-Wave module.

The (ROUTECACHE_LINE_SIZE) 5-byte array contains the 4 repeaters (index 0-3) and 1 routespeed byte (index 4) used in the LWR.

The first repeater byte (starting from index 0) equaling zero indicates no more repeaters in route. If the repeater at index 0 is zero then the LWR is direct. The routespeed byte (index 4) can be either ZW_PRIORITY_ROUTE_SPEED_9600, ZW_PRIORITY_ROUTE_SPEED_40K or ZW_PRIORITY_ROUTE_SPEED_100K

pPriorityRoute Examples:

  • 0, 0, 0, 0, ZW_PRIORITY_ROUTE_SPEED_100K → Direct 100K
  • 2, 3, 0, 0, ZW_PRIORITY_ROUTE_SPEED_40K → 40K route through repeaters 2 and 3

Tx: {REQ | 0x92 | bNodeID}

Rx: {RES | 0x92 | bNodeID | retVal | repeater0 | repeater1 | repeater2 | repeater3 | routespeed}

aka ZW_GetPriorityRoute aka ZW_GetLastWorkingRoute

Here is the call graph for this function:

◆ zwapi_get_protocol_info()

sl_status_t zwapi_get_protocol_info ( zwave_node_id_t  node_id,
zwapi_node_info_header_t node_info_header 
)

Copy the Node's current protocol information from the non-volatile memory.

Parameters
node_idit the Node ID
node_info_headeris the Node info buffer

aka ZW_GetNodeProtocolInfo

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

◆ zwapi_get_suc_node_id()

zwave_node_id_t zwapi_get_suc_node_id ( void  )

Get the currently registered SUC node ID.

Returns
returns the SUC node ID, and ZERO if no SUC available

aka ZW_GetSUCNodeID

Here is the call graph for this function:

◆ zwapi_get_virtual_nodes()

sl_status_t zwapi_get_virtual_nodes ( zwave_nodemask_t  nodeMask)

Request nodemask containing virtual nodes in controller bridge.

Parameters
nodeMaskpoints to nodemask array where the current virtual node nodemask is to be copied.
Returns
SL_STATUS_OK or SL_STATUS_FAIL

aka ZW_GetVirtualNodes

Here is the call graph for this function:

◆ zwapi_is_node_failed()

bool zwapi_is_node_failed ( zwave_node_id_t  nodeID)

Check if a node is in the failed nodes table.

Parameters
nodeIDis the node to be checked if it is failed or not
Returns
returns true if node in failed node table, else false

aka ZW_isFailedNode

Here is the call graph for this function:

◆ zwapi_is_node_primary_ctrl()

bool zwapi_is_node_primary_ctrl ( void  )

Query whether the controller is a primary controller or a secondary controller in the network.

Returns
true when the controller is a primary controller in the network
false when the controller is a secondary controller in the network.

aka ZW_IsPrimaryCtrl

Here is the call graph for this function:

◆ zwapi_remove_failed_node()

uint8_t zwapi_remove_failed_node ( zwave_node_id_t  NodeID,
void(*)(uint8_t)  completedFunc 
)

Remove a node from the failed node list, if it already exist.

Parameters
NodeIDfailed node ID that will be removed from the network.
completedFunccallback function to be called when the remove process has ended.
Returns
ZW_FAILED_NODE_REMOVE_STARTED if the removing process started successfully
One or more of the following bit flags If the removing process can not be started:
Note
A call back function should be provided otherwise the function will return without removing the node.

The completedFunc parameter values are:

aka ZW_RemoveFailedNode

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

◆ zwapi_remove_node_from_network()

sl_status_t zwapi_remove_node_from_network ( uint8_t  bMode,
void(*)(LEARN_INFO *)  completedFunc 
)

Remove any type of node from the network.

Parameters
bModenetwork exclusion mode, one of:
completedFunccallback function which is called with the remove node results.
Returns
SL_STATUS_OK or SL_STATUS_FAIL.

aka ZW_RemoveNodeFromNetwork

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

◆ zwapi_replace_failed_node()

uint8_t zwapi_replace_failed_node ( zwave_node_id_t  bNodeID,
bool  bNormalPower,
void(*)(uint8_t)  completedFunc 
)

Replace a node from the failed node list.

Parameters
bNodeIDis the nodeID on the failed node to replace
bNormalPowershould be set to true if the replacement is included with normal power.
completedFunccallback function to be called when the remove process has ended.
Note
A call back function should be provided otherwise the function will return without replacing the node.
Returns
ZW_FAILED_NODE_REMOVE_STARTED The replacing process started and now the new node must emit its node information frame to start the assign process.
One or more of the following flags if the replace process can not be started:

The completedFunc parameter values are:

aka ZW_ReplaceFailedNode

◆ zwapi_replication_receive_complete()

sl_status_t zwapi_replication_receive_complete ( void  )

Send command completed to primary controller.

Note
Called in replication mode when a command from the sender has been processed.

aka ZW_ReplicationReceiveComplete

Here is the call graph for this function:

◆ zwapi_request_neighbor_update()

sl_status_t zwapi_request_neighbor_update ( zwave_node_id_t  bNodeID,
void(*)(uint8_t)  completedFunc 
)

Start neighbor discovery for bNodeID.

Parameters
bNodeIDis the ID of node the controller wants to get neighbors for.
completedFuncis the Callback function
Returns
SL_STATUS_OK (neighbor discovery started) or SL_STATUS_FAIL

aka ZW_RequestNodeNeighborUpdate

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

◆ zwapi_request_network_update()

sl_status_t zwapi_request_network_update ( void(*)(uint8_t txStatus)  completedFunc)

Request network topology updates from the SUC/SIS node.

Parameters
completedFuncTransmit complete call back. The parameter txStatus values:
  • ZW_SUC_UPDATE_DONE The update process succeeded.
  • ZW_SUC_UPDATE_ABORT The update process aborted because of an error.
  • ZW_SUC_UPDATE_WAIT The SUC node is busy.
  • ZW_SUC_UPDATE_DISABLED The SUC functionality is disabled.
  • ZW_SUC_UPDATE_OVERFLOW The controller requested an update after more than 64 changes have occurred in the network. The update information is then out of date in respect to that controller. In this situation the controller have to make a replication before trying to request any new network updates.
Returns
SL_STATUS_OK if the updating process is started
SL_STATUS_FAIL if the requesting controller is the SUC node or the SUC node is unknown.

The update is done on protocol level and any changes are notified to the application by calling the application_controller_update_function).

Secondary controllers can only use this call when a SUC is present in the network. All controllers can use this call in case a SUC ID Server (SIS) is available.

Routing End Node can only use this call, when a SUC is present in the network. In case the Routing End Node has called ZW_RequestNewRouteDestinations prior to zwapi_request_network_update(), then Return Routes for the destinations specified by the application in ZW_RequestNewRouteDestinations will be updated along with the SUC Return Route.

Note
The SUC can only handle one network update at a time, so care should be taken not to have all the controllers in the network ask for updates at the same time.
Warning
This API call will generate a lot of network activity that will use bandwidth and stress the SUC in the network. Therefore, network updates should be requested as seldom as possible and never more often that once every hour from a controller.

Timeout: 65 s. Exception recovery: Resume normal operation, no recovery needed.

Tx: {REQ | 0x53 | funcID}

Rx: {RES | 0x53 | retVal}

Rx: {REQ | 0x53 | funcID | txStatus}

aka ZW_RequestNetWorkUpdate

◆ zwapi_request_node_info()

sl_status_t zwapi_request_node_info ( zwave_node_id_t  node_id)

Request node information from a node.

Parameters
node_idnode ID of the node to request node info from. application_controller_update_function will be called with UPDATE_STATE_NODE_INFO_RECEIVED as status together with the received nodeinformation.
Returns
SL_STATUS_OK or SL_STATUS_FAIL.

aka ZW_RequestNodeInfo

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

◆ zwapi_request_protocol_cc_encryption_callback()

sl_status_t zwapi_request_protocol_cc_encryption_callback ( uint8_t  tx_status,
const zwapi_tx_report_t tx_report,
uint8_t  session_id 
)

Sends TX status, TX report and session ID of the ongoing protocol command class encryption session to the Z-Wave API module.

Parameters
tx_statusTransmission status of the ongoing session
tx_reportTransmission report of the ongoing session
session_idID of the ongoing session
Returns
SL_STATUS_OK or SL_STATUS_FAIL.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwapi_send_controller_replication()

sl_status_t zwapi_send_controller_replication ( zwave_node_id_t  destNodeID,
const uint8_t *  pData,
uint8_t  dataLength,
uint8_t  txOptions,
void(*)(uint8_t)  completedFunc 
)

Send the payload and expect the receiver to respond with a command complete message.

Parameters
destNodeIDdestination node ID ( only single cast allowed)
pDatadata buffer pointer
dataLengthdata buffer length
txOptionstransmit option flags
completedFunctransmit completed call back function
Returns
sl_status_t
Note
Used when the controller is replication mode

aka ZW_ReplicationSend

◆ zwapi_set_default()

sl_status_t zwapi_set_default ( void(*)(void)  completedFunc)

Remove all Nodes and timers from the EEPROM memory.

Parameters
completedFuncis the Command completed call back function

aka ZW_SetDefault

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

◆ zwapi_set_learn_mode()

sl_status_t zwapi_set_learn_mode ( uint8_t  mode,
void(*)(LEARN_INFO *)  completedFunc 
)

Enable/disable Z-Wave Learn Mode.

Parameters
modeLearn Mode intent.
completedFunccallback function which is called with the learn mode results.

Learn Mode Intent values can be:

  • 0x00: Stop learn mode (LEARN_MODE_DISABLE)
  • 0x01: Start direct range inclusion/exclusion (LEARN_MODE_DIRECT_RANGE)
  • 0x02: Start learn mode expecting NWI (LEARN_MODE_NWI)
  • 0x03: Start learn mode expecting NWE (LEARN_MODE_NWE)
Returns
SL_STATUS_OK if the requested operation was accepted and has started
SL_STATUS_FAIL if the requested operation has not been started

aka ZW_SetLearnMode

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

◆ zwapi_set_max_source_route()

sl_status_t zwapi_set_max_source_route ( uint8_t  maxRouteTries)

Set the maximum number of source routing attempts before the explorer frame mechanism kicks in.

Parameters
maxRouteTriesis the maximum number of route retries. Default value with respect to maximum number of source routing attempts is five. Remember to enable the explorer frame mechanism by setting the transmit option flag TRANSMIT_OPTION_EXPLORE in the send data calls.

A ZDK 4.5 controller uses the routing algorithm from 5.02 to address nodes from ZDK's not supporting explorer frame.

The routing algorithm from 5.02 ignores the transmit option TRANSMIT_OPTION_EXPLORE flag and maximum number of source routing attempts value (maxRouteTries)

aka ZW_SetRoutingMAX

Here is the call graph for this function:

◆ zwapi_set_priority_route()

sl_status_t zwapi_set_priority_route ( zwave_node_id_t  bNodeID,
uint8_t *  pPriorityRoute 
)

Set the Last Working Route (LWR) for a destination node.

Parameters
bNodeIDNode ID (1...232) for whom the LWR is to be set.
pPriorityRoutepointer to a 5-byte array containing the new LWR to be set. See below for details
Returns
true if the LWR for bNodeID was successfully set.
false if the specified bNodeID was not valid and no LWR was set.

The LWR is the last successful route used between sender and destination node. The LWR is stored in NVM on the Z-Wave module.

The (ROUTECACHE_LINE_SIZE) 5-byte array contains the 4 repeaters (index 0-3) and 1 routespeed byte (index 4) used in the LWR.

The first repeater byte (starting from index 0) equaling zero indicates no more repeaters in route. If the repeater at index 0 is zero then the LWR is direct. The routespeed byte (index 4) can be either ZW_PRIORITY_ROUTE_SPEED_9600, ZW_PRIORITY_ROUTE_SPEED_40K or ZW_PRIORITY_ROUTE_SPEED_100K

pPriorityRoute Examples:

  • 0, 0, 0, 0, ZW_PRIORITY_ROUTE_SPEED_100K → Direct 100K Priority route
  • 2, 3, 0, 0, ZW_PRIORITY_ROUTE_SPEED_40K → 40K Priority route through repeaters 2 and 3
  • 2, 3, 4, 0, ZW_PRIORITY_ROUTE_SPEED_9600 → 9600 Priority route through repeaters 2, 3 and 4

Tx: {REQ | 0x93 | bNodeID | repeater0 | repeater1 | repeater2 | repeater3 | routespeed}

Rx: {RES | 0x93 | bNodeID | retVal}

aka ZW_SetPriorityRoute aka ZW_SetLastWorkingRoute

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

◆ zwapi_set_suc_node_id()

sl_status_t zwapi_set_suc_node_id ( zwave_node_id_t  nodeID,
uint8_t  SUCState,
uint8_t  bTxOption,
uint8_t  bCapabilities,
void(*)(uint8_t txStatus)  completedFunc 
)

Enable/disable the Static Update Controller functionality in a specified static controller.

Parameters
nodeIDthe node ID of the static controller to be a SUC
SUCStateshall be set true to enable SUC, and false to disable SUC
bTxOptionshall be set to true if to use low power transmission, and false for normal TX power.
bCapabilitiescapabilities of the new SUC.
completedFunccall back function
Returns
SL_STATUS_OK if success.
SL_STATUS_FAIL if failed (e.g. if the target is not a static controller)

aka ZW_SetSUCNodeID

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

◆ zwapi_set_virtual_node_application_node_information()

sl_status_t zwapi_set_virtual_node_application_node_information ( zwave_node_id_t  dstNode,
uint8_t  listening,
const node_type_t node_type,
uint8_t *  nodeParm,
uint8_t  parmLength 
)

Sets the Application Node Information data for all virtual nodes owned by the Z-Wave API Module.

Parameters
dstNodeis the virtual NodeID (This value is IGNORED).
listeningis true if this node is always on air
node_typeis the Device Type (the .basic member is ignored here)
nodeParmis the device parameter buffer
parmLengthis the number of device parameter bytes

This takes effect for all virtual nodes, regardless of dstNode value.

aka SerialAPI_ApplicationSlaveNodeInformation

Here is the call graph for this function:

◆ zwapi_set_virtual_node_to_learn_mode()

sl_status_t zwapi_set_virtual_node_to_learn_mode ( zwave_node_id_t  node,
uint8_t  mode,
void(*)(uint8_t bStatus, zwave_node_id_t orgID, zwave_node_id_t newID)  learnFunc 
)

Enable/disable learn mode for a virtual node.

Parameters
nodeNodeID of the virtual node to set to Learn Mode. Use 0 (zero) if new node is to be learned
modelearn mode. One of:
learnFunccallback function for the Node learn mode process
Returns
SL_STATUS_OK if successful.
SL_STATUS_FAIL if node is invalid or controller is primary.

When learn mode is enabled, received "Assign ID's Command" are handled:

  • If the current stored ID's are zero, the received ID's will be stored.
  • If the received ID's are zero the stored ID's will be set to zero.

The learnFunc is called when the received assign command has been handled. The newID parameter is the learned Node ID.

aka ZW_SetSlaveLearnMode

◆ zwapi_transfer_primary_ctrl_role()

sl_status_t zwapi_transfer_primary_ctrl_role ( uint8_t  bMode,
void(*)(LEARN_INFO *)  completedFunc 
)

Transfer the role as primary controller to another controller.

Parameters
bModeone of:
completedFunccallback function which is called with the role transfer results.
Returns
SL_STATUS_OK or SL_STATUS_FAIL.

aka ZW_ControllerChange

Here is the call graph for this function:

◆ zwapi_transfer_protocol_cc()

sl_status_t zwapi_transfer_protocol_cc ( const zwave_node_id_t  srcNode,
const uint8_t  decryptionKey,
uint8_t  payloadLength,
const uint8_t *const  payload 
)

Transfer a decrypted Protocol Command Class to the controller module.

Parameters
srcNodesource NodeID of the frame
decryptionKeyID of the S2 key used for decryption
payloadLengthdecrypted payload length
payloaddecrypted payload
Here is the call graph for this function:
Here is the caller graph for this function: