Zigbee Protocol Controller 1.6.0
zigpc_ctrl Namespace Reference

Functions

sl_status_t on_device_announce (const zigbee_eui64_t eui64)
 Event handler when a device has joined the network and has not been interviewed. This function will start the device interview process. More...
 
sl_status_t on_device_leave (const zigbee_eui64_t eui64)
 Event handler when a device has left the network. process. More...
 
sl_status_t on_device_interview_failed (const zigbee_eui64_t eui64)
 Event handled when a device fails to interview on the network. This function will update the node state topic. More...
 
sl_status_t on_device_interviewed (const zigbee_eui64_t eui64, bool configure_endpoint)
 Event handled when a device is included on the network. This function will setup endpoint based configurations, configure OTA support, and invoke UCL supported command list to be published. More...
 
sl_status_t perform_endpoint_configuration (const zigbee_eui64_t eui64, zigbee_endpoint_id_t ep_id)
 Configure endpoint under a device. This function will setup bindings and configure attribute reporting for each cluster under the endpoint. More...
 
sl_status_t update_device_capabilities (const zigbee_eui64_t eui64, const std::vector< zigbee_endpoint_id_t > &endpoint_list)
 Update device capabilities. This function will update the active endpoints published to MQTT. More...
 
sl_status_t update_endpoint_capabilities (const zigbee_eui64_t eui64, zigbee_endpoint_id_t ep_id)
 Update endpoint capabilities for a device. This function will update the cluster capabilities and configure any OTA capabilities. More...
 
void zigpc_discovery_update_callback (zigbee_eui64_uint_t eui64, zigpc_discovery_status discovery_status)
 Callback handler for ZigPC device discovery updates. More...
 
void on_startup (void)
 Event handler called when ZigPC is initializing. This handler will update all device states to "Online functional" before publishing known device capabilities. More...
 
void on_shutdown (void)
 Event handler for when ZigPC is shutting down. This handler will update all device states to "Offline" before removing all non-node-state based topics for all nodes serviced from the broker. More...
 

Variables

constexpr char LOG_TAG [] = "zigpc_ctrl"
 

Function Documentation

◆ on_device_announce()

sl_status_t zigpc_ctrl::on_device_announce ( const zigbee_eui64_t  eui64)

Event handler when a device has joined the network and has not been interviewed. This function will start the device interview process.

Parameters
eui64Device identifier.
Returns
sl_status_t SL_STATUS_OK on successfully completing operations, error otherwise.

◆ on_device_interview_failed()

sl_status_t zigpc_ctrl::on_device_interview_failed ( const zigbee_eui64_t  eui64)

Event handled when a device fails to interview on the network. This function will update the node state topic.

Parameters
eui64Device identifier.
Returns
sl_status_t SL_STATUS_OK on successfully completing operations, error otherwise.

◆ on_device_interviewed()

sl_status_t zigpc_ctrl::on_device_interviewed ( const zigbee_eui64_t  eui64,
bool  configure_endpoint 
)

Event handled when a device is included on the network. This function will setup endpoint based configurations, configure OTA support, and invoke UCL supported command list to be published.

NOTE: This function always calls update_endpoint_capabilities per endpoint supported.

Parameters
eui64Device identifier.
configure_endpointFlag to indicate if endpoint needs configuration.
Returns
sl_status_t SL_STATUS_OK on successfully completing operations, error otherwise.

◆ on_device_leave()

sl_status_t zigpc_ctrl::on_device_leave ( const zigbee_eui64_t  eui64)

Event handler when a device has left the network. process.

Parameters
eui64Device identifier.
Returns
sl_status_t SL_STATUS_OK on successfully completing post-remove operations, error otherwise.

◆ on_shutdown()

void zigpc_ctrl::on_shutdown ( void  )

Event handler for when ZigPC is shutting down. This handler will update all device states to "Offline" before removing all non-node-state based topics for all nodes serviced from the broker.

◆ on_startup()

void zigpc_ctrl::on_startup ( void  )

Event handler called when ZigPC is initializing. This handler will update all device states to "Online functional" before publishing known device capabilities.

◆ perform_endpoint_configuration()

sl_status_t zigpc_ctrl::perform_endpoint_configuration ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  ep_id 
)

Configure endpoint under a device. This function will setup bindings and configure attribute reporting for each cluster under the endpoint.

Parameters
eui64Device identifier.
ep_idEndpoint identifier.
Returns
sl_status_t SL_STATUS_OK on successfully configuring the endpoint, error otherwise.

◆ update_device_capabilities()

sl_status_t zigpc_ctrl::update_device_capabilities ( const zigbee_eui64_t  eui64,
const std::vector< zigbee_endpoint_id_t > &  endpoint_list 
)

Update device capabilities. This function will update the active endpoints published to MQTT.

NOTE: This function is always called by on_device_interviewed.

Parameters
eui64Device identifier.
endpoint_listEndpoint list.
Returns
sl_status_t SL_STATUS_OK on successfully updating capabilities, error otherwise.

◆ update_endpoint_capabilities()

sl_status_t zigpc_ctrl::update_endpoint_capabilities ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  ep_id 
)

Update endpoint capabilities for a device. This function will update the cluster capabilities and configure any OTA capabilities.

NOTE: This function is always called by on_device_interviewed.

Parameters
eui64Device identifier.
ep_idEndpoint identifier.
Returns
sl_status_t SL_STATUS_OK on successfully updating capabilities, error otherwise.

◆ zigpc_discovery_update_callback()

void zigpc_ctrl::zigpc_discovery_update_callback ( zigbee_eui64_uint_t  eui64,
zigpc_discovery_status  discovery_status 
)

Callback handler for ZigPC device discovery updates.

Parameters
eui64Device identifier.
discovery_statusDiscovery status type.

Variable Documentation

◆ LOG_TAG

constexpr char zigpc_ctrl::LOG_TAG[] = "zigpc_ctrl"
constexpr