Enumerations

enum  EmberZclDiscoveryRequestMode {
  EMBER_ZCL_DISCOVERY_REQUEST_SINGLE_QUERY = 0,
  EMBER_ZCL_DISCOVERY_REQUEST_MULTIPLE_QUERY = 1,
  EMBER_ZCL_DISCOVERY_REQUEST_MODE_MAX = 2
}

Functions

void emberZclDiscInit (void)
 
bool emberZclDiscSetMode (EmberZclDiscoveryRequestMode mode)
 
bool emberZclDiscSend (EmberCoapResponseHandler responseHandler)
 
bool emberZclDiscCoreRd (EmberCoapResponseHandler responseHandler)
 
bool emberZclDiscByClusterId (const EmberZclClusterSpec_t *clusterSpec, EmberCoapResponseHandler responseHandler)
 
bool emberZclDiscByEndpoint (EmberZclEndpointId_t endpointId, EmberZclDeviceId_t deviceId, EmberCoapResponseHandler responseHandler)
 
bool emberZclDiscByUid (const EmberZclUid_t *uid, uint16_t uidBits, EmberCoapResponseHandler responseHandler)
 
bool emberZclDiscByClusterRev (EmberZclClusterRevision_t version, EmberCoapResponseHandler responseHandler)
 
bool emberZclDiscByDeviceId (EmberZclDeviceId_t deviceId, EmberCoapResponseHandler responseHandler)
 
bool emberZclDiscByResourceVersion (EmberZclClusterRevision_t version, EmberCoapResponseHandler responseHandler)

Detailed Description

See zcl-core-types.h for source code.

See zcl-core-well-known.h for source code.

Enumeration Type Documentation

Defines possible request modes.

Enumerator
EMBER_ZCL_DISCOVERY_REQUEST_SINGLE_QUERY 

Discovery request is allowed a single query.

EMBER_ZCL_DISCOVERY_REQUEST_MULTIPLE_QUERY 

Discovery request is allowed multiple queries.

EMBER_ZCL_DISCOVERY_REQUEST_MODE_MAX 

Maximum discovery request mode.

Function Documentation

bool emberZclDiscByClusterId ( const EmberZclClusterSpec_t clusterSpec,
EmberCoapResponseHandler  responseHandler 
)

This function appends a cluster ID query to the discovery request string.

Parameters
clusterSpecA structure for cluster ID / role / manufacture code
responseHandlerThe response handler
Returns
in EMBER_ZCL_DISCOVERY_REQUEST_SINGLE_QUERY mode: True if the command was sent or false otherwise. in EMBER_ZCL_DISCOVERY_REQUEST_MULTIPLE_QUERY mode: True if the command was appended or false otherwise.

Referenced by emberZclOtaBootloadClientServerHasDiscByClusterId().

bool emberZclDiscByClusterRev ( EmberZclClusterRevision_t  version,
EmberCoapResponseHandler  responseHandler 
)

This function appends a cluster revision query to the discovery request string.

Parameters
versionThe version
responseHandlerThe response handler
Returns
in EMBER_ZCL_DISCOVERY_REQUEST_SINGLE_QUERY mode: True if the command was sent or false otherwise. in EMBER_ZCL_DISCOVERY_REQUEST_MULTIPLE_QUERY mode: True if the command was appended or false otherwise.
bool emberZclDiscByDeviceId ( EmberZclDeviceId_t  deviceId,
EmberCoapResponseHandler  responseHandler 
)

This function appends a device ID query to the discovery request string.

Parameters
deviceIdThe device identifier
responseHandlerThe response handler
Returns
in EMBER_ZCL_DISCOVERY_REQUEST_SINGLE_QUERY mode: True if the command was sent or false otherwise. in EMBER_ZCL_DISCOVERY_REQUEST_MULTIPLE_QUERY mode: True if the command was appended or false otherwise.
bool emberZclDiscByEndpoint ( EmberZclEndpointId_t  endpointId,
EmberZclDeviceId_t  deviceId,
EmberCoapResponseHandler  responseHandler 
)

This function appends an endpoint query to the Discovery request string.

Parameters
endpointIdThe endpoint identifier
deviceIdThe device identifier
responseHandlerThe response handler
Returns
in EMBER_ZCL_DISCOVERY_REQUEST_SINGLE_QUERY mode: True if the command was sent or false otherwise. in EMBER_ZCL_DISCOVERY_REQUEST_MULTIPLE_QUERY mode: True if the command was appended or false otherwise.
bool emberZclDiscByResourceVersion ( EmberZclClusterRevision_t  version,
EmberCoapResponseHandler  responseHandler 
)

This function appends a resource version query to the discovery request string.

Parameters
versionThe version
responseHandlerThe response handler
Returns
in EMBER_ZCL_DISCOVERY_REQUEST_SINGLE_QUERY mode: True if the command was sent or false otherwise. in EMBER_ZCL_DISCOVERY_REQUEST_MULTIPLE_QUERY mode: True if the command was appended or false otherwise.
bool emberZclDiscByUid ( const EmberZclUid_t uid,
uint16_t  uidBits,
EmberCoapResponseHandler  responseHandler 
)

This function appends a UID query to the discovery request string.

Parameters
uidThe uid
uidBitsThe uid bits
responseHandlerThe response handler
Returns
in EMBER_ZCL_DISCOVERY_REQUEST_SINGLE_QUERY mode: True if the command was sent or false otherwise. in EMBER_ZCL_DISCOVERY_REQUEST_MULTIPLE_QUERY mode: True if the command was appended or false otherwise.
bool emberZclDiscCoreRd ( EmberCoapResponseHandler  responseHandler)

This function appends a core.rd query to the discovery request string.

Parameters
responseHandlerThe response handler
Returns
in EMBER_ZCL_DISCOVERY_REQUEST_SINGLE_QUERY mode: True if the command was sent or false otherwise. in EMBER_ZCL_DISCOVERY_REQUEST_MULTIPLE_QUERY mode: True if the command was appended or false otherwise.
void emberZclDiscInit ( void  )

Initialization for sending Discovery command.

bool emberZclDiscSend ( EmberCoapResponseHandler  responseHandler)

This function broadcasts a GET using the Discovery request string.

Parameters
responseHandlerThe response handler
Returns
True if the message was sent or false otherwise.
bool emberZclDiscSetMode ( EmberZclDiscoveryRequestMode  mode)

This function sets mode to create a query.

Parameters
modeEMBER_ZCL_DISCOVERY_REQUEST_SINGLE_QUERY - single query EMBER_ZCL_DISCOVERY_REQUEST_MULTIPLE_QUERY - multiple queries
Returns
True if mode was set or false otherwise.

Under EMBER_ZCL_DISCOVERY_REQUEST_SINGLE_QUERY mode, appending one query string automatically triggers the Discovery command to be broadcast. Under EMBER_ZCL_DISCOVERY_REQUEST_MULTIPLE_QUERY mode, appended query strings is accumulated. The accumulated query string will not be broadcast until emberZclDiscSend() is called.