Zigbee Protocol Controller 1.6.0

Observer API for getting events from zigpc_gateway. More...

Classes

struct  zigpc_gateway_on_network_init
 Event data passed after successful Gateway network initialization. More...
 
struct  zigpc_gateway_on_node_add
 Event data passed after successful node addition to the Gateway network. More...
 
struct  zigpc_gateway_on_node_removed_t
 Event data passed when receiving node removal complete event. More...
 
struct  zigpc_gateway_on_node_discovered_t
 Event data passed when receiving count of endpoint discovery events to wait for a particular node on the network. More...
 
struct  zigpc_gateway_on_node_endpoint_discovered_t
 Event data passed when receiving cluster information for a probed endpoint in a node on the network. More...
 
struct  zigpc_gateway_on_attribute_reported_t
 
struct  zigpc_gateway_on_read_attribute_response_t
 Event data passed when receiving a ZCL global read attributes response from a device on the network. More...
 
struct  zigpc_gateway_on_command_received_t
 Event data passed when receiving a ZCL cluster command payload from a device on the network. More...
 
struct  zigpc_gateway_on_ota_started_t
 Event data passed when receiving an OTA update started message for a device. More...
 
struct  zigpc_gateway_on_ota_completed_t
 Event data passed when receiving an OTA update complete message for a device. More...
 
struct  zigpc_gateway_on_bind_unbind_reponse_t
 

Typedefs

typedef struct zigpc_gateway_on_network_init zigpc_gateway_on_network_init_t
 Event data passed after successful Gateway network initialization. More...
 
typedef struct zigpc_gateway_on_node_add zigpc_gateway_on_node_add_t
 Event data passed after successful node addition to the Gateway network. More...
 

Enumerations

enum  zigpc_gateway_notify_event {
  ZIGPC_GATEWAY_NOTIFY_NETWORK_INIT = 0 , ZIGPC_GATEWAY_NOTIFY_NODE_ADD_START , ZIGPC_GATEWAY_NOTIFY_NODE_ADD_COMPLETE , ZIGPC_GATEWAY_NOTIFY_NODE_REMOVED ,
  ZIGPC_GATEWAY_NOTIFY_NODE_DISCOVERED , ZIGPC_GATEWAY_NOTIFY_NODE_ENDPOINT_DISCOVERED , ZIGPC_GATEWAY_NOTIFY_REPORTED_ATTRIBUTE , ZIGPC_GATEWAY_NOTIFY_READ_ATTRIBUTE_RESPONSE ,
  ZIGPC_GATEWAY_NOTIFY_CONFIGURE_REPORTING_RESPONSE , ZIGPC_GATEWAY_NOTIFY_ZCL_COMMAND_RECEIVED , ZIGPC_GATEWAY_NOTIFY_OTA_UPDATE_STARTED , ZIGPC_GATEWAY_NOTIFY_OTA_UPDATE_COMPLETED ,
  ZIGPC_GATEWAY_NOTIFY_BIND_UNBIND_RESPONSE , ZIGPC_GATEWAY_NOTIFY_MAX
}
 The following are the types of events dispatched to observers of zigpc_gateway. More...
 

Functions

sl_status_t zigpc_gateway_register_observer (enum zigpc_gateway_notify_event event, zigpc_observer_callback_t callback)
 Register an observer to be informed of ZigbeeHost updates. If the observer is already registered, nothing will be done. More...
 
sl_status_t zigpc_gateway_unregister_observer (enum zigpc_gateway_notify_event event, zigpc_observer_callback_t callback)
 Unregister an observer from ZigbeeHost updates. If the observer is not found, nothing will be done. More...
 

Detailed Description

Observer API for getting events from zigpc_gateway.

In order to listen to events from ZigbeeHost, ZigPC Gateway allows components to register observer functions that receive an event type and associated data

Typedef Documentation

◆ zigpc_gateway_on_network_init_t

Event data passed after successful Gateway network initialization.

◆ zigpc_gateway_on_node_add_t

Event data passed after successful node addition to the Gateway network.

Enumeration Type Documentation

◆ zigpc_gateway_notify_event

The following are the types of events dispatched to observers of zigpc_gateway.

Enumerator
ZIGPC_GATEWAY_NOTIFY_NETWORK_INIT 

Used when informing that the Gateway network has initialized. Users should wait for this event before performing operations on the Zigbee network. If this callback is not invoked within an appropriate delay, it is safe to assume that network initialization has failed. See zigpc_gateway_on_network_init for associated data.

ZIGPC_GATEWAY_NOTIFY_NODE_ADD_START 

Used when informing that a node has been added to the Gateway network. See zigpc_gateway_on_node_add for associated data.

ZIGPC_GATEWAY_NOTIFY_NODE_ADD_COMPLETE 
ZIGPC_GATEWAY_NOTIFY_NODE_REMOVED 

Used when informing that a node on the Gateway network has been removed. See zigpc_gateway_on_node_removed_t for associated data.

ZIGPC_GATEWAY_NOTIFY_NODE_DISCOVERED 

Used when informing that a node on the Gateway network has been interviewed for the number of endpoints supported. See zigpc_gateway_on_node_discovered_t for associated data.

NOTE: This event should be received before the endpoint discovery event for a particular device.

ZIGPC_GATEWAY_NOTIFY_NODE_ENDPOINT_DISCOVERED 

Used when informing that a node on the Gateway network has been interviewed for cluster information for a particular endpoint. See zigpc_gateway_on_node_endpoint_discovered_t for associated data.

NOTE: Multiple events of this type should be sent based on the number of endpoints supported by the node on the network. This event should only be received after a node discovery event is received.

ZIGPC_GATEWAY_NOTIFY_REPORTED_ATTRIBUTE 

Used when an a device endpoint has sent a cluster attribute report. See zigpc_gateway_on_attribute_reported_t for associated data.

ZIGPC_GATEWAY_NOTIFY_READ_ATTRIBUTE_RESPONSE 

Used when informing that a node on the Gateway network has sent a ZCL global read attribute response containing the latest attribute information for a ZCL cluster. See zigpc_gateway_on_read_attribute_response_t for associated data.

ZIGPC_GATEWAY_NOTIFY_CONFIGURE_REPORTING_RESPONSE 

Used when handling a configure reporting response. The protocol controller sends out a configure reporting message to clusters for expected attributes. The destination node responds with a 'configure reporting response' ZCL message.

ZIGPC_GATEWAY_NOTIFY_ZCL_COMMAND_RECEIVED 

Used when a node on the Gateway has received a ZCL command frame from a node on the network. see zigpc_gateway_on_command_received_t for associated data.

ZIGPC_GATEWAY_NOTIFY_OTA_UPDATE_STARTED 

Used when a device has started an OTA update process. see zigpc_gateway_on_ota_started_t for associated data.

ZIGPC_GATEWAY_NOTIFY_OTA_UPDATE_COMPLETED 

Used when a device has complete an OTA update. see zigpc_gateway_on_ota_completed_t for associated data.

ZIGPC_GATEWAY_NOTIFY_BIND_UNBIND_RESPONSE 
ZIGPC_GATEWAY_NOTIFY_MAX 

Function Documentation

◆ zigpc_gateway_register_observer()

sl_status_t zigpc_gateway_register_observer ( enum zigpc_gateway_notify_event  event,
zigpc_observer_callback_t  callback 
)

Register an observer to be informed of ZigbeeHost updates. If the observer is already registered, nothing will be done.

Parameters
eventZigPC Gateway notify event type
callbackCallback to register with event
Returns
sl_status_t SL_STATUS_OK on success

◆ zigpc_gateway_unregister_observer()

sl_status_t zigpc_gateway_unregister_observer ( enum zigpc_gateway_notify_event  event,
zigpc_observer_callback_t  callback 
)

Unregister an observer from ZigbeeHost updates. If the observer is not found, nothing will be done.

Parameters
eventZigPC Gateway notify event type
callbackCallback to un-register with event
Returns
sl_status_t SL_STATUS_OK on removal