HA and ZCL specific descriptors are used to store internal information about attributes, clusters, endpoints and device itself. HA API implements declaration of standard HA devices with limitation - it declares only 1 HA device per user application, i.e. it is assumed that user application supports only 1 endpoint. Lower levels API supports multiple endpoints support (and multiple HA devices support) and HA API may be extended to support multiple HA devices declaration.
HA and ZCL provide the following API to declare devices:
- ZB_ZCL_DECLARE_<CLUSTER_NAME>_ATTRIB_LIST - declares attribute list, specific for particular cluster. Variables to store attribute should be declared by application in advance and provided as input parameters.
- ZB_HA_DECLARE_<DEVICE_NAME>_CLUSTER_LIST - declares cluster list, specific for particular devices. Attribute lists for each supported cluster is specified as input parameters.
- ZB_HA_DECLARE_<DEVICE_NAME>_EP - declares endpoint descriptor for particular device. Data needed for Scenes cluster functioning and Simple descriptor are declared internally. Endpoint identifier and cluster list are provided as input parameters.
- ZB_HA_DECLARE_<DEVICE_NAME>_CTX - declares context for particular HA device. Endpoint descriptor is provided as input parameter.
- ZB_AF_REGISTER_DEVICE_CTX - Registers device context in runtime. Device context is provided as input parameter, should be called in runtime.
- ZB_AF_SET_ENDPOINT_HANDLER - Sets clusters commands function handler. Endpoint identifier and function address is provided as input parameter, should be called in runtime.