|
Z-Wave Protocol Controller Reference
|
Z-Wave network management component. More...
Modules | |
| Z-Wave Network Management Fixture | |
| Z-Wave Network Management Fixture. | |
| Callbacks used by the Z-Wave Network management | |
| Z-Wave Network Management callback functions. | |
| Z-Wave Network Management helpers | |
| Internal helper functions used with Network Management. | |
| Return Route Assignment Queue | |
| Small queue component for assigning return routes. | |
Macros | |
| #define | ADD_REMOVE_TIMEOUT 60000 |
| #define | NOP_FOR_REMOVE_FAILED_TIMEOUT 65000 |
| #define | SMART_START_SELF_DESTRUCT_TIMEOUT 3000 |
| #define | SET_DEFAULT_TIMEOUT 15000 |
| #define | LEARN_MODE_TIMEOUT 30000 |
| #define | SEND_DATA_TIMEOUT 125000 |
| #define | ADD_NODE_STATUS_ADDING_END_NODE_TIMEOUT 60000 |
| #define | ADD_NODE_PROTOCOL_NEIGHBOR_DISCOVERY_TIMEOUT (76000 + ZW_MAX_NODES * (3517 + 732)) |
| #define | PRIORITY_ROUTE_SIZE 5 |
| 4 hops + speed More... | |
Functions | |
| zwave_network_management_state_t | zwave_network_management_get_state () |
| Get the current state of the network management module. More... | |
| sl_status_t | zwave_network_management_abort () |
| Abort current state and return to idle if its possible. More... | |
| sl_status_t | zwave_network_management_add_node () |
| Put the Z-Wave controller in add node mode. More... | |
| sl_status_t | zwave_network_management_add_node_with_dsk (const zwave_dsk_t dsk, zwave_keyset_t granted_keys, zwave_protocol_t preferred_inclusion) |
| Put the Z-Wave controller in SmartStart add node mode. More... | |
| void | zwave_network_management_enable_smart_start_add_mode (bool enabled) |
| Set the controller in SmartStart Add mode. More... | |
| void | zwave_network_management_enable_smart_start_learn_mode (bool enabled) |
| Configures if the Network Management module will enter SmartStart learn mode when it goes back to IDLE, we are alone in a network SmartStart Add mode is disabled. More... | |
| sl_status_t | zwave_network_management_keys_set (bool accept, bool csa, zwave_keyset_t granted_keys) |
| Inform an S2 bootstrapping controller which keys must be granted to the node being bootstrapped. More... | |
| sl_status_t | zwave_network_management_dsk_set (zwave_dsk_t dsk) |
| Indicate to the S2 bootstrapping controller whether the DSK is accepted and report the user input when needed. More... | |
| sl_status_t | zwave_network_management_remove_node () |
| Put the Z-Wave controller in remove node mode. More... | |
| sl_status_t | zwave_network_management_learn_mode (zwave_learn_mode_t mode) |
| Put the Z-Wave controller in learn mode. More... | |
| sl_status_t | zwave_network_management_set_default (void) |
| Reset the controller. More... | |
| sl_status_t | zwave_network_management_remove_failed (zwave_node_id_t nodeid) |
| Remove a failed node. More... | |
| zwave_home_id_t | zwave_network_management_get_home_id () |
| Get the cached HomeID. More... | |
| zwave_node_id_t | zwave_network_management_get_node_id () |
| Get the cached NodeID. More... | |
| uint16_t | zwave_network_management_get_network_size () |
| Returns the number of nodes in our network. More... | |
| void | zwave_network_management_get_network_node_list (zwave_nodemask_t node_list) |
| Get the cached Node List for the current network. More... | |
| zwave_keyset_t | zwave_network_management_get_granted_keys () |
| Return the currently granted keys. More... | |
| bool | zwave_network_management_is_zpc_sis () |
| Checks if we have the SIS role in the current network. More... | |
| bool | zwave_network_management_is_protocol_sending_frames_to_node (zwave_node_id_t node_id) |
| Checks if the protocol may be sending some frames to a particular NodeID. More... | |
| sl_status_t | zwave_network_management_request_node_neighbor_discovery (zwave_node_id_t node_id) |
| Request Node Neighbor Discovery. More... | |
| sl_status_t | zwave_network_management_start_proxy_inclusion (zwave_node_id_t node_id, zwave_node_info_t nif, uint8_t inclusion_step) |
| Request the NM to perform proxy inclusion. More... | |
| sl_status_t | zwave_network_management_assign_return_route (zwave_node_id_t node_id, zwave_node_id_t destination_node_id) |
| Assign static return routes to End Nodes. More... | |
| bool | zwave_network_management_is_busy () |
| Verify if we are carrying some network management operations. More... | |
| bool | we_have_return_routes_to_assign (zwave_node_id_t node_id) |
| Checks if we have return routes to assign for a given NodeID. More... | |
| sl_status_t | zwave_network_management_set_priority_route (zwave_node_id_t node_id, const uint8_t *const priority_route) |
| Assign a priority route to a node. More... | |
Z-Wave network management component.
This component handles all logic related to changing the Z-Wave network, adding and removing nodes. It also handles destroying the network and joining the controller to an existing network. All Z-Wave secure inclusion steps are also handled from within this module. Secure inclusion initiated by an inclusion controller(proxy inclusion) is also passes through this component.
| #define ADD_NODE_PROTOCOL_NEIGHBOR_DISCOVERY_TIMEOUT (76000 + ZW_MAX_NODES * (3517 + 732)) |
| #define ADD_NODE_STATUS_ADDING_END_NODE_TIMEOUT 60000 |
| #define ADD_REMOVE_TIMEOUT 60000 |
| #define LEARN_MODE_TIMEOUT 30000 |
| #define NOP_FOR_REMOVE_FAILED_TIMEOUT 65000 |
| #define PRIORITY_ROUTE_SIZE 5 |
4 hops + speed
| #define SEND_DATA_TIMEOUT 125000 |
Time that Send data (including e.g. sending NOP) will take as a maximum. Protocol that tries routing with FLiRS nodes takes very very long.
| #define SET_DEFAULT_TIMEOUT 15000 |
| #define SMART_START_SELF_DESTRUCT_TIMEOUT 3000 |
| bool we_have_return_routes_to_assign | ( | zwave_node_id_t | node_id | ) |
Checks if we have return routes to assign for a given NodeID.
| node_id | NodeID to look for in the return route queue |
| sl_status_t zwave_network_management_abort | ( | ) |
Abort current state and return to idle if its possible.
| sl_status_t zwave_network_management_add_node | ( | ) |
Put the Z-Wave controller in add node mode.
When this function is activated Z-Wave controller will be open for adding nodes nodes who sends a node information frame or a NWI inclusion request.
Note that the controller will go back to idle state if no inclusion request has been received within a a RECOMMENDED timeout value of 60 seconds. Add Mode will timeout automatically after ADD_REMOVE_TIMEOUT seconds if no node gets included.
The following callbacks may be triggered asynchronous by this operation
| sl_status_t zwave_network_management_add_node_with_dsk | ( | const zwave_dsk_t | dsk, |
| zwave_keyset_t | granted_keys, | ||
| zwave_protocol_t | preferred_inclusion | ||
| ) |
Put the Z-Wave controller in SmartStart add node mode.
This function should be called after receiving a SmartStart inclusion request to which we have a matching provision list entry.
The following callbacks may be triggered asynchronous by this operation:
| dsk | The full DSK of the node to add |
| granted_keys | The S2 keys to grant to the new node. |
| preferred_inclusion | The preferred protocol to use for inclusion. |
| sl_status_t zwave_network_management_assign_return_route | ( | zwave_node_id_t | node_id, |
| zwave_node_id_t | destination_node_id | ||
| ) |
Assign static return routes to End Nodes.
| node_id | NodeID for which return routes will be provided |
| destination_node_id | Destination NodeID of the return routes |
| sl_status_t zwave_network_management_dsk_set | ( | zwave_dsk_t | dsk | ) |
Indicate to the S2 bootstrapping controller whether the DSK is accepted and report the user input when needed.
| dsk | The full DSK of device to include. |
| void zwave_network_management_enable_smart_start_add_mode | ( | bool | enabled | ) |
Set the controller in SmartStart Add mode.
When SmartStart is enabled the controller will open the Z-Wave controller for SmartStart inclusions. If an other network management operation is activated the SmartStart inclusion mode will be temporary suspended until the operation is done.
When a SmartStart inclusion request is received the SmartStart mode is automatically disabled. SmartStart mode must be re-enabled manually if a smart start inclusion is not stated as a response to a SmartStart inclusion request.
| enabled |
|
| void zwave_network_management_enable_smart_start_learn_mode | ( | bool | enabled | ) |
Configures if the Network Management module will enter SmartStart learn mode when it goes back to IDLE, we are alone in a network SmartStart Add mode is disabled.
| enabled |
| zwave_keyset_t zwave_network_management_get_granted_keys | ( | ) |
Return the currently granted keys.
| zwave_home_id_t zwave_network_management_get_home_id | ( | ) |
Get the cached HomeID.
| void zwave_network_management_get_network_node_list | ( | zwave_nodemask_t | node_list | ) |
Get the cached Node List for the current network.
| [out] | node_list | Pointer where the node list will be copied. |
| uint16_t zwave_network_management_get_network_size | ( | ) |
Returns the number of nodes in our network.
| zwave_node_id_t zwave_network_management_get_node_id | ( | ) |
Get the cached NodeID.
| zwave_network_management_state_t zwave_network_management_get_state | ( | ) |
Get the current state of the network management module.
| bool zwave_network_management_is_busy | ( | ) |
Verify if we are carrying some network management operations.
| bool zwave_network_management_is_protocol_sending_frames_to_node | ( | zwave_node_id_t | node_id | ) |
Checks if the protocol may be sending some frames to a particular NodeID.
| node_id | The Z-Wave NodeID that we want to check for. |
| bool zwave_network_management_is_zpc_sis | ( | ) |
Checks if we have the SIS role in the current network.
| sl_status_t zwave_network_management_keys_set | ( | bool | accept, |
| bool | csa, | ||
| zwave_keyset_t | granted_keys | ||
| ) |
Inform an S2 bootstrapping controller which keys must be granted to the node being bootstrapped.
| accept | This field is used to indicate if the S2 bootstrapping process is accepted by the user and must continue |
| csa | This field is used to indicate if the S2 bootstrapping controller MUST allow CSA for Authentication. |
| granted_keys | This field is used to indicate which network keys were granted during bootstrapping. |
| sl_status_t zwave_network_management_learn_mode | ( | zwave_learn_mode_t | mode | ) |
Put the Z-Wave controller in learn mode.
When this function is activated Z-Wave controller will be open for joining a new network to be removed from its current network to form a new blank network. If the controller enters a network where this is not already a SIS it assigns itself the SIS role.
| mode | indicate the Learn Mode Intent (i.e., inclusion/exclusion, NWI, NWE and stop learn mode). |
| sl_status_t zwave_network_management_remove_failed | ( | zwave_node_id_t | nodeid | ) |
Remove a failed node.
This function can be used for remove a failing node from Z-Wave network. NOP will be sent to the node to make sure that the Z-Wave protocol marks it failing on the controller and the subsequent remove failed call for that node will succeed.
The following callbacks may be triggered asynchronous by this operation
| nodeid | Node id of failing node which will be removed |
| sl_status_t zwave_network_management_remove_node | ( | ) |
Put the Z-Wave controller in remove node mode.
When this function is activated Z-Wave controller will be open for removing nodes nodes who sends a node information frame or a NWI exclusion request.
The following callbacks may be triggered asynchronous by this operation
| sl_status_t zwave_network_management_request_node_neighbor_discovery | ( | zwave_node_id_t | node_id | ) |
Request Node Neighbor Discovery.
| node_id | the NodeID of the node for which the neighbor discovery is requested |
| sl_status_t zwave_network_management_set_default | ( | void | ) |
Reset the controller.
The controller will reset its home id to a random value and assign itself node id 1. The controller will always assign itself the SIS role.
The following callbacks may be triggered asynchronous by this operation
| sl_status_t zwave_network_management_set_priority_route | ( | zwave_node_id_t | node_id, |
| const uint8_t *const | priority_route | ||
| ) |
Assign a priority route to a node.
This function will set a priority route to a given node. The priority route is a list with the NodeID of the hops that the Z-Wave controller will use as a preferred route to the node. The last byte is the route speed. See Z-Wave Host API Specification, section 4.4.3.14 for more information.
| node_id | NodeID for which the priority route will be set |
| priority_route | Array of 4 NodeIDs for the priority route + 1 byte for the route speed. |
| sl_status_t zwave_network_management_start_proxy_inclusion | ( | zwave_node_id_t | node_id, |
| zwave_node_info_t | nif, | ||
| uint8_t | inclusion_step | ||
| ) |
Request the NM to perform proxy inclusion.
| node_id | the NodeID of the node |
| nif | |
| inclusion_step |