Logo
Developing with ZBOSS for Zigbee
zb_zcl_poll_control.h File Reference

Data Structures

struct  zb_zcl_poll_control_check_in_cli_param_s
 Parameters to pass to device callback for incoming check in. More...
 
struct  zb_zcl_poll_control_check_in_res_s
 Structure representation of Check-in response command payload. More...
 
struct  zb_zcl_poll_control_set_long_poll_interval_req_s
 Structure representation of Set Long Poll Interval command payload. More...
 
struct  zb_zcl_poll_control_set_short_poll_interval_req_s
 Structure representation of Set Short Poll Interval command payload. More...
 

Macros

Poll Control cluster attribute identifiers

See also
HA spec, Poll Control Cluster 9.5.4.1

Note: These values were members of enum zb_zcl_poll_control_attr_e type but were converted to a set of macros due to MISRA violations.

#define ZB_ZCL_ATTR_POLL_CONTROL_CHECKIN_INTERVAL_ID   0x0000U
 
#define ZB_ZCL_ATTR_POLL_CONTROL_LONG_POLL_INTERVAL_ID   0x0001U
 
#define ZB_ZCL_ATTR_POLL_CONTROL_SHORT_POLL_INTERVAL_ID   0x0002U
 
#define ZB_ZCL_ATTR_POLL_CONTROL_FAST_POLL_TIMEOUT_ID   0x0003U
 
#define ZB_ZCL_ATTR_POLL_CONTROL_MIN_CHECKIN_INTERVAL_ID   0x0004U
 
#define ZB_ZCL_ATTR_POLL_CONTROL_LONG_POLL_MIN_INTERVAL_ID   0x0005U
 
#define ZB_ZCL_ATTR_POLL_CONTROL_FAST_POLL_MAX_TIMEOUT_ID   0x0006U
 
#define ZB_ZCL_ATTR_POLL_CONTROL_STATUS_DATA_ID   0xefffU
 
#define ZB_ZCL_ATTR_POLL_CONTROL_ADDR_DATA_ID   0xeffeU
 
Poll Control cluster attributes
#define ZB_ZCL_POLL_CONTROL_CLUSTER_REVISION_DEFAULT   ((zb_uint16_t)0x0003u)
 Default value for Poll Control cluster revision global attribute. More...
 
#define ZB_ZCL_POLL_CONTROL_CHECKIN_INTERVAL_NO_CHECK_IN_VALUE   0x0000
 Value for stop Check-in process for Check-in Interval attribute. More...
 
#define ZB_ZCL_POLL_CONTROL_CHECKIN_INTERVAL_DEFAULT_VALUE   0x3840
 Default value for Check-in Interval attribute. More...
 
#define ZB_ZCL_POLL_CONTROL_CHECKIN_INTERVAL_MAX_VALUE   0x6e0000
 Maximum value for Check-in Interval attribute. More...
 
#define ZB_ZCL_POLL_CONTROL_LONG_POLL_INTERVAL_MIN_VALUE   ZB_PIM_MINIMUM_LONG_POLL_INTERVAL_IN_QS
 Minimum value for Long Poll Interval attribute. More...
 
#define ZB_ZCL_POLL_CONTROL_LONG_POLL_INTERVAL_DEFAULT_VALUE   ZB_PIM_DEFAULT_LONG_POLL_INTERVAL_IN_QS
 Default value for Long Poll Interval attribute. More...
 
#define ZB_ZCL_POLL_CONTROL_LONG_POLL_INTERVAL_MAX_VALUE   ZB_PIM_MAXIMUM_LONG_POLL_INTERVAL_IN_QS
 Maximum value for Long Poll Interval attribute. More...
 
#define ZB_ZCL_POLL_CONTROL_SHORT_POLL_INTERVAL_MIN_VALUE   ZB_PIM_MINIMUM_SHORT_POLL_INTERVAL_IN_QS
 Minimum value for Short Poll Interval attribute. More...
 
#define ZB_ZCL_POLL_CONTROL_SHORT_POLL_INTERVAL_DEFAULT_VALUE   ZB_PIM_DEFAULT_SHORT_POLL_INTERVAL_IN_QS
 Default value for Short Poll Interval attribute. More...
 
#define ZB_ZCL_POLL_CONTROL_SHORT_POLL_INTERVAL_MAX_VALUE   ZB_PIM_MAXIMUM_SHORT_POLL_INTERVAL_IN_QS
 Maximum value for Short Poll Interval attribute. More...
 
#define ZB_ZCL_POLL_CONTROL_FAST_POLL_TIMEOUT_MIN_VALUE   0x01
 Minimum value for Fast Poll Timeout attribute. More...
 
#define ZB_ZCL_POLL_CONTROL_FAST_POLL_TIMEOUT_DEFAULT_VALUE   0x0028
 Default value for Fast Poll Timeout attribute. More...
 
#define ZB_ZCL_POLL_CONTROL_FAST_POLL_TIMEOUT_MAX_VALUE   0xffff
 Maximum value for Fast Poll Timeout attribute. More...
 
#define ZB_ZCL_POLL_CONTROL_CHECKIN_MIN_INTERVAL_DEFAULT_VALUE   ((zb_uint32_t)0)
 Default value for CheckinIntervalMin attribute. More...
 
#define ZB_ZCL_POLL_CONTROL_LONG_POLL_MIN_INTERVAL_DEFAULT_VALUE   ((zb_uint32_t)0)
 Default value for LongPollIntervalMin attribute. More...
 
#define ZB_ZCL_POLL_CONTROL_FAST_POLL_MAX_TIMEOUT_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for FastPollTimeoutMax attribute. More...
 
#define ZB_ZCL_DECLARE_POLL_CONTROL_ATTRIB_LIST(attr_list, checkin_interval, long_poll_interval, short_poll_interval, fast_poll_timeout, checkin_interval_min, long_poll_interval_min, fast_poll_timeout_max)
 Declare attribute list for Poll Control cluster - server side. More...
 
#define ZB_ZCL_DECLARE_POLL_CONTROL_ATTRIB_LIST_CLIENT(attr_list)
 Declare attribute list for Poll Control cluster - client side. More...
 

Functions

void zb_zcl_poll_control_start (zb_uint8_t param, zb_uint8_t endpoint)
 Schedule poll control process on given endpoint First check-in will occur after one check-in interval Poll Control process also starts automatically during ZCL periodic activities initialization if Poll Control server cluster is declared. More...
 
zb_uint8_t zb_zcl_poll_control_stop (void)
 Stop Poll control processing. More...
 
void zb_zcl_poll_control_start_check_in (zb_uint8_t param)
 Start Poll Control process on Server side. More...
 
void zb_zcl_poll_controll_register_cb (zb_callback_t cb)
 Register callback for Poll control cluster. More...
 

Poll Control cluster commands

#define ZB_ZCL_POLL_CONTROL_SEND_CHECK_IN_REQ( _buffer, _dst_addr, _dst_addr_mode, _dst_ep, _local_ep, _prfl_id, _cb)
 Send Check-in command, see HA spec 9.5.4.4. More...
 
#define ZB_ZCL_POLL_CONTROL_SEND_CHECK_IN_RES( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, is_start, timeout)
 Send "Check-in response" command, see HA spec 9.5.5.3. More...
 
#define ZB_ZCL_POLL_CONTROL_GET_CHECK_IN_RES(data_ptr, buffer, status)
 Macro for getting Check-in response command. More...
 
#define ZB_ZCL_POLL_CONTROL_SEND_FAST_POLL_STOP_REQ( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb)
 Send "Fast Poll Stop" command, see HA spec 9.5.5.4. More...
 
#define ZB_ZCL_POLL_CONTROL_SEND_SET_LONG_POLL_INTERVAL_REQ( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, interval)
 Send "Set Long Poll Interval" command, see HA spec 9.5.5.5. More...
 
#define ZB_ZCL_POLL_CONTROL_GET_SET_LONG_POLL_INTERVAL_REQ(data_ptr, buffer, status)
 Macro for getting "Set Long Poll Interval" command. More...
 
#define ZB_ZCL_POLL_CONTROL_SEND_SET_SHORT_POLL_INTERVAL_REQ( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, interval)
 Send "Set Short Poll Interval" command, see HA spec 9.5.5.6. More...
 
#define ZB_ZCL_POLL_CONTROL_GET_SET_SHORT_POLL_INTERVAL_REQ(data_ptr, buffer, status)
 Macro for getting "Set Short Poll Interval" command. More...
 
enum  zb_zcl_poll_control_cmd_e { ZB_ZCL_CMD_POLL_CONTROL_CHECK_IN_ID = 0x00 }
 Poll Control cluster command identifiers. More...
 
enum  zb_zcl_poll_control_resp_cmd_e { ZB_ZCL_CMD_POLL_CONTROL_CHECK_IN_RESPONSE_ID = 0x00, ZB_ZCL_CMD_POLL_CONTROL_FAST_POLL_STOP_ID = 0x01, ZB_ZCL_CMD_POLL_CONTROL_SET_LONG_POLL_INTERVAL_ID = 0x02, ZB_ZCL_CMD_POLL_CONTROL_SET_SHORT_POLL_INTERVAL_ID = 0x03 }
 Poll Control cluster response command identifiers. More...
 
typedef struct zb_zcl_poll_control_check_in_cli_param_s zb_zcl_poll_control_check_in_cli_param_t
 Parameters to pass to device callback for incoming check in. More...
 
typedef struct zb_zcl_poll_control_check_in_res_s zb_zcl_poll_control_check_in_res_t
 Structure representation of Check-in response command payload. More...
 
typedef struct zb_zcl_poll_control_set_long_poll_interval_req_s zb_zcl_poll_control_set_long_poll_interval_t
 Structure representation of Set Long Poll Interval command payload. More...
 
typedef struct zb_zcl_poll_control_set_short_poll_interval_req_s zb_zcl_poll_control_set_short_poll_interval_t
 Structure representation of Set Short Poll Interval command payload. More...
 
zb_ret_t zb_zcl_poll_control_set_client_addr (zb_uint8_t local_ep, zb_uint16_t addr, zb_uint8_t ep)
 Set client address information. This address is used to send Check-in command. If address information is NOT sent, check-in command will be sent assuming binding with client is created. More...
 
void zb_zcl_set_fast_poll_timeout (zb_uint8_t ep, zb_uint16_t fast_poll_timeout)
 Function is used by Poll control client to set Fast poll timeout value. This value is included into Check-in response command. More...
 
void zb_zcl_poll_control_save_nvram (zb_uint8_t param)
 Save to NVRAM Poll Control dataset. More...