Z-Wave Protocol Controller Reference
nm_state_machine.h File Reference
Include dependency graph for nm_state_machine.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  network_mgmt_state
 
struct  smartstart_event_data
 
struct  route_event_data
 

Macros

#define NODE_INFO_MAX_SIZE   64
 
#define NMS_FLAG_S2_ADD   1
 
#define NMS_FLAG_PROXY_INCLUSION   2
 
#define NMS_FLAG_LEARNMODE_NEW   4
 
#define NMS_FLAG_LEARNMODE_NWI   8
 
#define NMS_FLAG_LEARNMODE_NWE   0x10
 
#define NMS_FLAG_CONTROLLER_REPLICATION   0x20
 
#define NMS_FLAG_SMART_START_INCLUSION   0x40
 
#define NMS_FLAG_REPORT_DSK   0x80
 
#define NMS_FLAG_CSA_INCLUSION   0x100
 

Typedefs

typedef struct network_mgmt_state network_mgmt_state_t
 
typedef struct smartstart_event_data smartstart_event_data_t
 
typedef struct route_event_data route_event_data_t
 

Functions

void nm_fsm_post_event (nm_event_t ev, void *event_data)
 
void nm_state_machine_init ()
 Initialize the Z-Wave network management state machine. More...
 
void nm_state_machine_teardown ()
 Teardown the Z-Wave network management state machine Resets network_mgmt_state_t nms Sets the Network Management state to NM_IDLE Stops all ongoing Network management operations. More...
 

Variables

network_mgmt_state_t nms
 

Macro Definition Documentation

◆ NMS_FLAG_CONTROLLER_REPLICATION

#define NMS_FLAG_CONTROLLER_REPLICATION   0x20

Sub-state flag for the Network Management State machine.

After LEARN_MODE_DONE, NMS has determined that it is neither being included nor excluded, so it must be processing a controller replication (or controller shift).

◆ NMS_FLAG_CSA_INCLUSION

#define NMS_FLAG_CSA_INCLUSION   0x100

Sub-state flag for the Network Management State machine.

◆ NMS_FLAG_LEARNMODE_NEW

#define NMS_FLAG_LEARNMODE_NEW   4

Sub-state flag for the Network Management State machine.

The ZW_LEARN_MODE_RETURN_INTERVIEW_STATUS was set on the LEARN_MODE_SET command, i.e., LEARN_MODE_INTERVIEW_COMPLETED is requested.

See also
Learn Mode Set Command (Network Management Basic Node Command Class, version 2 and up)

◆ NMS_FLAG_LEARNMODE_NWE

#define NMS_FLAG_LEARNMODE_NWE   0x10

Sub-state flag for the Network Management State machine.

The LEARN_MODE_NWE was set on the LEARN_MODE_SET command.

See also
Learn Mode Set Command (Network Management Basic Node Command Class).

◆ NMS_FLAG_LEARNMODE_NWI

#define NMS_FLAG_LEARNMODE_NWI   8

Sub-state flag for the Network Management State machine.

The LEARN_MODE_NWI was set on the LEARN_MODE_SET command.

See also
Learn Mode Set Command (Network Management Basic Node Command Class).

◆ NMS_FLAG_PROXY_INCLUSION

#define NMS_FLAG_PROXY_INCLUSION   2

Sub-state flag for the Network Management State machine.

NMS is processing a proxy inclusion or proxy replace.

◆ NMS_FLAG_REPORT_DSK

#define NMS_FLAG_REPORT_DSK   0x80

Sub-state flag for the Network Management State machine.

Inclusion and S2 inclusion have succeeded, so NMS should include the DSK when sending NODE_ADD_STATUS.

◆ NMS_FLAG_S2_ADD

#define NMS_FLAG_S2_ADD   1

Sub-state flag for the Network Management State machine.

NMS is processing an S2 addition (Smart-Start or simple S2).

◆ NMS_FLAG_SMART_START_INCLUSION

#define NMS_FLAG_SMART_START_INCLUSION   0x40

Sub-state flag for the Network Management State machine.

NMS is processing a Smart-Start addition.

◆ NODE_INFO_MAX_SIZE

#define NODE_INFO_MAX_SIZE   64

Typedef Documentation

◆ network_mgmt_state_t

Control structure for the Network Management State machine (NMS).

◆ route_event_data_t

◆ smartstart_event_data_t

Function Documentation

◆ nm_fsm_post_event()

void nm_fsm_post_event ( nm_event_t  ev,
void *  event_data 
)

If it is a SmartStart inclusion, we just start S2 bootstrapping

S2 inclusion starts, we set the flag to S2_ADD to ensure it is S2 inclusion

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

◆ nm_state_machine_init()

void nm_state_machine_init ( )

Initialize the Z-Wave network management state machine.

Sets zwave_s2_network_callbacks_t Calls zwave_s2_set_network_callbacks and zwave_s0_set_network_callbacks Resets network_mgmt_state_t nms Sets the Network Management state to NM_IDLE Print the HomeID, NodeID and DSK to console and Print node list Stops all ongoing Network management operations

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

◆ nm_state_machine_teardown()

void nm_state_machine_teardown ( )

Teardown the Z-Wave network management state machine Resets network_mgmt_state_t nms Sets the Network Management state to NM_IDLE Stops all ongoing Network management operations.

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

Variable Documentation

◆ nms