Zigbee Protocol Controller 1.6.0
ZigPC Device Discovery

This is responsible for starting and notify discovery of a Zigbee device on the network. The currently supported messages are as follows: More...

Modules

 ZigPC Discovery Internal API
 
 ZigPC Discovery Internal Callback Storage
 This module provides the ability to add/remove/invoke discovery-based callbacks. Both device-specific and WILDCARD_EUI64 based callbacks can be added and removed.
 
 ZigPC Discovery Internal Event Handlers
 This module contains all the handlers for events received by clients and zigpc_gateway.
 
 ZigPC Discovery Internal Process Queue
 This module provides the interface to add events to be added as Contiki events to be processed within the zigpc_discovery context.
 
 ZigPC Discovery Internal Timers
 This module manages a list of callback timers used by zigpc_discovery. callbacks with timeouts can be added removed.
 

Typedefs

typedef enum zigpc_discovery_status zigpc_discovery_status_t
 Discovery status types possible for a device being discovered. More...
 
typedef void(* zigpc_discovery_status_callback_t) (zigbee_eui64_uint_t eui64, zigpc_discovery_status_t status)
 Device discovery callback function that can be registered to be notified of discovery success/failure per device. More...
 

Enumerations

enum  zigpc_discovery_status { DISCOVERY_START = 1 , DISCOVERY_SUCCESS , DEVICE_DISCOVERY_FAIL , ENDPOINT_DISCOVERY_FAIL }
 Discovery status types possible for a device being discovered. More...
 

Functions

sl_status_t zigpc_discovery_fixt_setup (void)
 Setup fixture for zigpc discovery component. More...
 
int zigpc_discovery_fixt_shutdown (void)
 Shutdown fixture for zigpc discovery component. More...
 
sl_status_t zigpc_discovery_interview_device (zigbee_eui64_uint_t eui64, const zigpc_discovery_status_callback_t callback)
 Begin the interview process for a Zigbee device on the network. More...
 
sl_status_t zigpc_discovery_add_listener (const zigpc_discovery_status_callback_t callback)
 Register listener to receive discovery status updates for all devices. More...
 
sl_status_t zigpc_discovery_remove_listener (const zigpc_discovery_status_callback_t callback)
 Remove registered discovery listener. More...
 

Detailed Description

This is responsible for starting and notify discovery of a Zigbee device on the network. The currently supported messages are as follows:

The following diagram shows the expected behavior for controllers and listeners:

Typedef Documentation

◆ zigpc_discovery_status_callback_t

typedef void(* zigpc_discovery_status_callback_t) (zigbee_eui64_uint_t eui64, zigpc_discovery_status_t status)

Device discovery callback function that can be registered to be notified of discovery success/failure per device.

Parameters
eui64Device identifier.
statusDiscovery status.

◆ zigpc_discovery_status_t

Discovery status types possible for a device being discovered.

Enumeration Type Documentation

◆ zigpc_discovery_status

Discovery status types possible for a device being discovered.

Enumerator
DISCOVERY_START 
DISCOVERY_SUCCESS 
DEVICE_DISCOVERY_FAIL 
ENDPOINT_DISCOVERY_FAIL 

Function Documentation

◆ zigpc_discovery_add_listener()

sl_status_t zigpc_discovery_add_listener ( const zigpc_discovery_status_callback_t  callback)

Register listener to receive discovery status updates for all devices.

Parameters
callbackReference to callback to register.
Returns
sl_status_t SL_STATUS_OK on add success, error otherwise.

◆ zigpc_discovery_fixt_setup()

sl_status_t zigpc_discovery_fixt_setup ( void  )

Setup fixture for zigpc discovery component.

Returns
sl_status_t SL_STATUS_OK on success, error otherwise.

◆ zigpc_discovery_fixt_shutdown()

int zigpc_discovery_fixt_shutdown ( void  )

Shutdown fixture for zigpc discovery component.

Returns
int 0 on success, error otherwise.

◆ zigpc_discovery_interview_device()

sl_status_t zigpc_discovery_interview_device ( zigbee_eui64_uint_t  eui64,
const zigpc_discovery_status_callback_t  callback 
)

Begin the interview process for a Zigbee device on the network.

This function will kick-off the process to find:

  • Endpoints active on a Zigbee device
  • Client and server clusters active per Zigbee device endpoint
Parameters
eui64Device identifier.
Returns
sl_status_t SL_STATUS_OK on accepted request, error otherise.

◆ zigpc_discovery_remove_listener()

sl_status_t zigpc_discovery_remove_listener ( const zigpc_discovery_status_callback_t  callback)

Remove registered discovery listener.

Parameters
callbackReference to callback to register.
Returns
sl_status_t SL_STATUS_OK on successful removal, error otherwise.