Zigbee Protocol Controller 1.6.0
zigpc_discovery::callbacks Namespace Reference

Functions

void clear (void)
 Clear all registered callbacks. More...
 
void notify (zigbee_eui64_uint_t eui64, zigpc_discovery_status status)
 Invoke registered callbacks the discovery status for the device. More...
 
sl_status_t add (zigbee_eui64_uint_t eui64, const zigpc_discovery_status_callback_t callback)
 Add a callback to be invoked for a specific EUI64 (or WILDCARD_EUI64 for all devices). More...
 
sl_status_t remove_for_device (zigbee_eui64_uint_t eui64)
 Remove all registered callbacks for a specific EUI64. More...
 
sl_status_t remove (zigbee_eui64_uint_t eui64, const zigpc_discovery_status_callback_t callback)
 Remove a registered callback for a specific EUI64 (or WILDCARD_EUI64 for all devices). More...
 

Variables

constexpr zigbee_eui64_uint_t WILDCARD_EUI64 = ZIGBEE_NULL_EUI64_UINT
 Wildcard identifier to be used when adding/removing callbacks. More...
 

Function Documentation

◆ add()

sl_status_t zigpc_discovery::callbacks::add ( zigbee_eui64_uint_t  eui64,
const zigpc_discovery_status_callback_t  callback 
)

Add a callback to be invoked for a specific EUI64 (or WILDCARD_EUI64 for all devices).

Parameters
eui64Device identifier.
callbackCallback to register.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER on invalid callbacks passed, or error otherwise.

◆ clear()

void zigpc_discovery::callbacks::clear ( void  )

Clear all registered callbacks.

NOTE: This should be called at initialization.

◆ notify()

void zigpc_discovery::callbacks::notify ( zigbee_eui64_uint_t  eui64,
zigpc_discovery_status  status 
)

Invoke registered callbacks the discovery status for the device.

This function also invokes callbacks registered using /ref WILDCARD_EUI64.

Parameters
eui64Device Identifier.
statusCorresponding discovery status.

◆ remove()

sl_status_t zigpc_discovery::callbacks::remove ( zigbee_eui64_uint_t  eui64,
const zigpc_discovery_status_callback_t  callback 
)

Remove a registered callback for a specific EUI64 (or WILDCARD_EUI64 for all devices).

Parameters
eui64Device identifier.
callbackCallback to remove.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER on invalid callbacks passed, or error otherwise.

◆ remove_for_device()

sl_status_t zigpc_discovery::callbacks::remove_for_device ( zigbee_eui64_uint_t  eui64)

Remove all registered callbacks for a specific EUI64.

NOTE: Cannot remove callbacks registered to WILDCARD_EUI64

Parameters
eui64Device identifier.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_INVALID_PARAMETER on WILDCARD_EUI64 passed in, or error otherwise.

Variable Documentation

◆ WILDCARD_EUI64

constexpr zigbee_eui64_uint_t zigpc_discovery::callbacks::WILDCARD_EUI64 = ZIGBEE_NULL_EUI64_UINT
constexpr

Wildcard identifier to be used when adding/removing callbacks.

Using this EUI64 will allow listeners to be notified of every device discovery status update.