Digi XBee(R) ANSI C Host Library
Functions | Variables

Server code to implement the ZigBee Identify Cluster (ZCL Spec section 3.5). More...

#include "xbee/platform.h"
#include "xbee/byteorder.h"
#include "zigbee/zcl.h"
#include "zigbee/zcl_identify.h"

Functions

uint16_t zcl_identify_isactive (void)
 Used by main program to see if a device is in "Identification mode". More...
 
int _zcl_identify_time_set (const zcl_attribute_full_t FAR *attribute, zcl_attribute_write_rec_t *rec)
 Function registered to ZCL_IDENTIFY_ATTR_IDENTIFY_TIME attribute of Identify Cluster. More...
 
uint_fast8_t _zcl_identify_time_get (const zcl_attribute_full_t FAR *attribute)
 Function registered to ZCL_IDENTIFY_ATTR_IDENTIFY_TIME attribute of Identify Cluster and called to refresh the IdentifyTime attribute. More...
 
int zcl_identify_command (const wpan_envelope_t FAR *envelope, void FAR *context)
 Handler for ZCL Identify Server Commands (Identify, IdentifyQuery). More...
 

Variables

uint16_t zcl_identify_time = 0
 Private variable for tracking amount of "Identification mode" time left.
 
uint32_t zcl_identify_end = 0
 Private variable for tracking value of xbee_seconds_timer() that "Idenfication mode" should end. More...
 
struct {
   zcl_attribute_full_t   identify_time
 
   uint16_t   end_of_list
 
zcl_identify_attr
 Standard attribute list for the Identify Server Cluster. More...
 
const zcl_attribute_tree_t zcl_identify_attribute_tree []
 

Detailed Description

Server code to implement the ZigBee Identify Cluster (ZCL Spec section 3.5).

Main program should call zcl_identify_isactive() in its main loop and perform some sort of action (flash an LED or LCD backlight) to help an installer identify the device during network commissioning.

Use the macro ZCL_CLUST_ENTRY_IDENTIFY_SERVER to add an Identify Cluster Server to the cluster list of an endpoint.

Call zcl_identify_isactive() in the main loop of your program to see how many seconds are left in "Identification mode".

Note
Maybe generalize the attribute read/write functions to use attribute->value (passed in) instead of referencing zcl_identify_time directly? Maybe not, makes it harder for other parts of the system to call _zcl_identify_time_set() and _zcl_identify_time_get().