Device Query Service#

API and Callbacks for the Device Query Service Component.

This component queries new devices for their endpoints and clusters to record information in the Device Database component. New devices are discovered on receipt of a Device Announce frame or when discovery APIs are called below.

API#

void

Enable or disable the device query service.

bool

Get the global enable state of the Device Query service.

void

Get the EUI64 of current discovery target. The service queries one device at a time.

sl_zigbee_af_device_query_service_discover_target(sl_802154_long_addr_t eui, uint8_t macCapabilities)

Begin discovery of device. While the Device Query Service component automatically queues the discovery of a device based on reception of a Device Announce frame, this API is provided for user applications that wish to begin discovery of a target when desired. It is also worth noting that due to network limitations (e.g. network congestion, bandwidth), the local device may not register the Device Announce message from a particular node.

API Documentation#

sl_zigbee_af_device_query_service_enable_disable#

void sl_zigbee_af_device_query_service_enable_disable (bool enable)

Enable or disable the device query service.

Parameters
TypeDirectionArgument NameDescription
bool[in]enable

True to enable the service, false to disable.

Returns

  • None


sl_zigbee_af_device_query_service_get_enabled_state#

bool sl_zigbee_af_device_query_service_get_enabled_state (void )

Get the global enable state of the Device Query service.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • enable True if enabled, false if disabled.


sl_zigbee_af_device_query_service_get_current_discovery_target_eui64#

void sl_zigbee_af_device_query_service_get_current_discovery_target_eui64 (sl_802154_long_addr_t returnEui64)

Get the EUI64 of current discovery target. The service queries one device at a time.

Parameters
TypeDirectionArgument NameDescription
sl_802154_long_addr_t[out]returnEui64

The EUI of the device in the network currently being queried.

Returns

  • None

Note

  • When a device is fully discovered by this component, it marks the device as discovery-complete in the Device Database component, which issues the ::sl_zigbee_af_device_database_discovery_complete_cb callback to let the user application know.


sl_zigbee_af_device_query_service_discover_target#

sl_status_t sl_zigbee_af_device_query_service_discover_target (sl_802154_long_addr_t eui, uint8_t macCapabilities)

Begin discovery of device. While the Device Query Service component automatically queues the discovery of a device based on reception of a Device Announce frame, this API is provided for user applications that wish to begin discovery of a target when desired. It is also worth noting that due to network limitations (e.g. network congestion, bandwidth), the local device may not register the Device Announce message from a particular node.

Parameters
TypeDirectionArgument NameDescription
sl_802154_long_addr_t[in]eui

The EUI of the device to be queried.

uint8_t[in]macCapabilities

The 802.15.4 MAC capabilities of the device, if known. A value of 0xFF should be passed in if the capabilities are unknown when calling this function. The capabilities will be overwritten when a Node Descriptor Response is received.

Returns

  • SL_STATUS_FULL if the Device Database is full, SL_STATUS_ALREADY_EXISTS if the device is already known, SL_STATUS_INVALID_CONFIGURATION if an rx-off-when-device device is specified but the configuration SL_ZIGBEE_AF_PLUGIN_DEVICE_QUERY_SERVICE_IGNORE_RX_OFF_WHEN_IDLE_DEVICES dictates such devices should be skipped, else SL_STATUS_OK.

Note

  • When a device is fully discovered by this component, it marks the device as discovery-complete in the Device Database component, which issues the ::sl_zigbee_af_device_database_discovery_complete_cb callback to let the user application know.