Initialization

Provided that the DRLC cluster is enabled in the compile-time options (see Section41.12), the cluster is automatically initialized when the ZCL is initialized and the ZigBee device is registered in the application - that is, by calling eZCL_Initialise() and the relevant endpoint registration function for the device, for example:

  • eSE_RegisterEspEndPoint() on a standalone ESP (cluster server)

  • eSE_RegisterIPDEndPoint() on an IPD (cluster client)

As part of this initialization, the DRLC cluster is created and, on the ESP, a DRLC timer server is registered to support time-stamps in the LCEs.

A DRLC cluster client must also perform a number of other initialization steps in order to establish communication with the cluster server. These are described below.

  1. Set ‘device class’ attribute: The value of the ‘device class’ attribute (see Section 41.2) must be set immediately after eSE_RegisterIPDEndPoint() is called and before the network is started.

  2. Bind to server: A non-sleeping client should bind its endpoint to the server using the ZigBee PRO API function ZPS_eAplZdpBindUnbindRequest(). This allows the server to send out unsolicited LCEs to the client.

  • Before this binding can take place, the client must obtain the IEEE/MAC address of the ESP/server. This can be achieved by first using the function ZPS_eAplZdpMatchDescRequest() to find the ESP/Server and to obtain its network address. The function ZPS_eAplZdpIeeeAddrRequest() can then be used to obtain the corresponding IEEE/MAC address. Once found, both addresses must be added to the local Address Map using the function ZPS_eAplZdoAddAddrMapEntry().

  • All four of the above ZPS functions are described in the ZigBee 3.0 Stack User Guide (JNUG3130).

  1. Synchronize time with ESP: A client should synchronize ZCL time with the ESP using the Time cluster as soon as initialization is complete. It is not possible to process unsolicited LCEs with a ‘start-time of now’ until ZCL time has been synchronized.

Once the clients have been set up, the ESP/server may need to configure the enrolment groups and randomization attributes of the DRLC clients (see Section41.2). The ESP may use one of the following mechanisms to determine when a DRLC client has come on-line:

  • A Get Scheduled Events message is received from a new client

  • A Report Event Status message is received from a new client

  • A binding request is received from a new client

Parent topic:Demand-Response and Load Control Cluster