Developing with ZBOSS for Zigbee
ZCL Poll Control cluster

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...
 

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 Controll 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 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_CHECKIN_INTERVAL_NO_CHECK_IN_VALUE   0x0000
 Value for stop Check-in process for Check-in Interval attribute.
 
#define ZB_ZCL_POLL_CONTROL_CHECKIN_INTERVAL_DEFAULT_VALUE   0x3840
 Default value for Check-in Interval attribute.
 
#define ZB_ZCL_POLL_CONTROL_CHECKIN_INTERVAL_MAX_VALUE   0x6e0000
 Maximum value for Check-in Interval attribute.
 
#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.
 
#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.
 
#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.
 
#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.
 
#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.
 
#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.
 
#define ZB_ZCL_POLL_CONTROL_FAST_POLL_TIMEOUT_MIN_VALUE   0x01
 Minimum value for Fast Poll Timeout attribute.
 
#define ZB_ZCL_POLL_CONTROL_FAST_POLL_TIMEOUT_DEFAULT_VALUE   0x0028
 Default value for Fast Poll Timeout attribute.
 
#define ZB_ZCL_POLL_CONTROL_FAST_POLL_TIMEOUT_MAX_VALUE   0xffff
 Maximum value for Fast Poll Timeout attribute.
 
#define ZB_ZCL_POLL_CONTROL_CHECKIN_MIN_INTERVAL_DEFAULT_VALUE   ((zb_uint32_t)0)
 Default value for CheckinIntervalMin attribute.
 
#define ZB_ZCL_POLL_CONTROL_LONG_POLL_MIN_INTERVAL_DEFAULT_VALUE   ((zb_uint32_t)0)
 Default value for LongPollIntervalMin attribute.
 
#define ZB_ZCL_POLL_CONTROL_FAST_POLL_MAX_TIMEOUT_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for FastPollTimeoutMax attribute.
 
#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...
 

Poll Control cluster commands

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.
 
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.
 
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.
 
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.
 
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...
 
#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...
 

Detailed Description

All commands in the cluster have only request form, and carry no payload.

Macro Definition Documentation

◆ ZB_ZCL_ATTR_POLL_CONTROL_ADDR_DATA_ID

#define ZB_ZCL_ATTR_POLL_CONTROL_ADDR_DATA_ID   0xeffeU

Status Data - custom non-spec parameters for server side

◆ ZB_ZCL_ATTR_POLL_CONTROL_CHECKIN_INTERVAL_ID

#define ZB_ZCL_ATTR_POLL_CONTROL_CHECKIN_INTERVAL_ID   0x0000U

Check-in Interval attribute, HA spec 9.5.4.1.1

◆ ZB_ZCL_ATTR_POLL_CONTROL_FAST_POLL_MAX_TIMEOUT_ID

#define ZB_ZCL_ATTR_POLL_CONTROL_FAST_POLL_MAX_TIMEOUT_ID   0x0006U

Fast Poll Timeout Max attribute, HA spec 9.5.4.1.6

◆ ZB_ZCL_ATTR_POLL_CONTROL_FAST_POLL_TIMEOUT_ID

#define ZB_ZCL_ATTR_POLL_CONTROL_FAST_POLL_TIMEOUT_ID   0x0003U

Fast Poll Timeout attribute, HA spec 9.5.4.1.

◆ ZB_ZCL_ATTR_POLL_CONTROL_LONG_POLL_INTERVAL_ID

#define ZB_ZCL_ATTR_POLL_CONTROL_LONG_POLL_INTERVAL_ID   0x0001U

Long Poll Interval attribute, HA spec 9.5.4.1.2

◆ ZB_ZCL_ATTR_POLL_CONTROL_LONG_POLL_MIN_INTERVAL_ID

#define ZB_ZCL_ATTR_POLL_CONTROL_LONG_POLL_MIN_INTERVAL_ID   0x0005U

Long Poll Interval Min attribute, HA spec 9.5.4.1.5

◆ ZB_ZCL_ATTR_POLL_CONTROL_MIN_CHECKIN_INTERVAL_ID

#define ZB_ZCL_ATTR_POLL_CONTROL_MIN_CHECKIN_INTERVAL_ID   0x0004U

Check-in Interval Min attribute, HA spec 9.5.4.1.4

◆ ZB_ZCL_ATTR_POLL_CONTROL_SHORT_POLL_INTERVAL_ID

#define ZB_ZCL_ATTR_POLL_CONTROL_SHORT_POLL_INTERVAL_ID   0x0002U

Short Poll Interval attribute, HA spec 9.5.4.1.3

◆ ZB_ZCL_ATTR_POLL_CONTROL_STATUS_DATA_ID

#define ZB_ZCL_ATTR_POLL_CONTROL_STATUS_DATA_ID   0xefffU

Status Data - custom non-spec parameters

◆ ZB_ZCL_DECLARE_POLL_CONTROL_ATTRIB_LIST

#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 
)
Value:
zb_zcl_poll_control_srv_cfg_data_t srv_cfg_data_ctx_##attr_list = \
{ ZB_ZCL_POLL_CTRL_INVALID_ADDR, ZB_ZCL_POLL_INVALID_EP, 0, 0 }; \
ZB_ZCL_START_DECLARE_ATTRIB_LIST(attr_list) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_POLL_CONTROL_CHECKIN_INTERVAL_ID, (checkin_interval)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_POLL_CONTROL_LONG_POLL_INTERVAL_ID, (long_poll_interval)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_POLL_CONTROL_SHORT_POLL_INTERVAL_ID, (short_poll_interval)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_POLL_CONTROL_FAST_POLL_TIMEOUT_ID, (fast_poll_timeout)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_POLL_CONTROL_MIN_CHECKIN_INTERVAL_ID, (checkin_interval_min)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_POLL_CONTROL_LONG_POLL_MIN_INTERVAL_ID, (long_poll_interval_min)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_POLL_CONTROL_FAST_POLL_MAX_TIMEOUT_ID, (fast_poll_timeout_max)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_POLL_CONTROL_ADDR_DATA_ID, &(srv_cfg_data_ctx_##attr_list)) \
ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST

Declare attribute list for Poll Control cluster - server side.

Parameters
attr_list- attribute list name
checkin_interval- pointer to variable to store Check-in Interval attribute
long_poll_interval- pointer to variable to store Long Poll Interval attribute
short_poll_interval- pointer to variable to store Short Poll Interval attribute
fast_poll_timeout- pointer to variable to store Fast Poll Timeout attribute
checkin_interval_min- pointer to variable to store Check-in Interval Min attribute
long_poll_interval_min-pointer to variable to store Long Poll Interval Min attribute
fast_poll_timeout_max- pointer to variable to store Fast Poll Timeout Max attribute

◆ ZB_ZCL_DECLARE_POLL_CONTROL_ATTRIB_LIST_CLIENT

#define ZB_ZCL_DECLARE_POLL_CONTROL_ATTRIB_LIST_CLIENT (   attr_list)
Value:
zb_zcl_poll_control_client_status_t client_status_data_ctx_##attr_list = \
{ ZB_FALSE, ZB_ZCL_POLL_CONTROL_FAST_POLL_TIMEOUT_CLIENT_DEFAULT_VALUE }; \
ZB_ZCL_START_DECLARE_ATTRIB_LIST(attr_list) \
(&(client_status_data_ctx_##attr_list))) \
ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST

Declare attribute list for Poll Control cluster - client side.

Parameters
attr_list- attribute list name

◆ ZB_ZCL_POLL_CONTROL_GET_CHECK_IN_RES

#define ZB_ZCL_POLL_CONTROL_GET_CHECK_IN_RES (   data_ptr,
  buffer,
  status 
)
Value:
{ \
if (zb_buf_len((buffer)) != sizeof(zb_zcl_poll_control_check_in_res_t)) \
{ \
} \
else \
{ \
zb_zcl_poll_control_check_in_res_t *src_ptr = \
(data_ptr)->is_start = src_ptr->is_start; \
ZB_HTOLE16(&((data_ptr)->timeout), &(src_ptr->timeout)); \
} \
}

Macro for getting Check-in response command.

Attention
Assumes that ZCL header already cut.
Parameters
data_ptr- pointer to a variable of type zb_zcl_poll_control_check_in_res_s.
buffercontaining the packet (by pointer).
status- variable to put parse status to (see zb_zcl_parse_status_t).

◆ ZB_ZCL_POLL_CONTROL_GET_SET_LONG_POLL_INTERVAL_REQ

#define ZB_ZCL_POLL_CONTROL_GET_SET_LONG_POLL_INTERVAL_REQ (   data_ptr,
  buffer,
  status 
)
Value:
{ \
{ \
} \
else \
{ \
zb_zcl_poll_control_set_long_poll_interval_t *src_ptr = \
ZB_HTOLE32(&((data_ptr)->interval), &(src_ptr->interval)); \
} \
}

Macro for getting "Set Long Poll Interval" command.

Attention
Assumes that ZCL header already cut.
Parameters
data_ptr- pointer to a variable of type zb_zcl_poll_control_set_long_poll_interval_t.
buffercontaining the packet (by pointer).
status- variable to put parse status to (see zb_zcl_parse_status_t).

◆ ZB_ZCL_POLL_CONTROL_GET_SET_SHORT_POLL_INTERVAL_REQ

#define ZB_ZCL_POLL_CONTROL_GET_SET_SHORT_POLL_INTERVAL_REQ (   data_ptr,
  buffer,
  status 
)
Value:
{ \
{ \
} \
else \
{ \
zb_zcl_poll_control_set_short_poll_interval_t *src_ptr = \
ZB_HTOLE16(&((data_ptr)->interval), &(src_ptr->interval)); \
} \
}

Macro for getting "Set Short Poll Interval" command.

Attention
Assumes that ZCL header already cut.
Parameters
data_ptr- pointer to a variable of type zb_zcl_poll_control_set_short_poll_interval_t.
buffercontaining the packet (by pointer).
status- variable to put parse status to (see zb_zcl_parse_status_t).

◆ ZB_ZCL_POLL_CONTROL_SEND_CHECK_IN_REQ

#define ZB_ZCL_POLL_CONTROL_SEND_CHECK_IN_REQ (   _buffer,
  _dst_addr,
  _dst_addr_mode,
  _dst_ep,
  _local_ep,
  _prfl_id,
  _cb 
)
Value:
{ \
zb_uint8_t* _ptr = ZB_ZCL_START_PACKET(_buffer); \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(_ptr); \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER(_ptr, ZB_ZCL_GET_SEQ_NUM(), \
ZB_ZCL_FINISH_PACKET((_buffer), _ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
_buffer, _dst_addr, _dst_addr_mode, _dst_ep, _local_ep, _prfl_id, \
}

Send Check-in command, see HA spec 9.5.4.4.

Parameters
_buffer- to put packet to
_dst_addr- destination address
_dst_addr_mode- addressing mode
_dst_ep- destination endpoint
_local_ep- source endpoint
_prfl_id- profile identifier
_cb- callback for getting command send status

◆ ZB_ZCL_POLL_CONTROL_SEND_CHECK_IN_RES

#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 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL(ptr, (def_resp)) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ(ptr, ZB_ZCL_GET_SEQ_NUM(), \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (is_start)); \
ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, (timeout)); \
ZB_ZCL_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}

Send "Check-in response" command, see HA spec 9.5.5.3.

Parameters
bufferto put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback
is_start- Start Fast Polling
timeout- Fast Poll Timeout

◆ ZB_ZCL_POLL_CONTROL_SEND_FAST_POLL_STOP_REQ

#define ZB_ZCL_POLL_CONTROL_SEND_FAST_POLL_STOP_REQ (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL(ptr, (def_resp)) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ(ptr, ZB_ZCL_GET_SEQ_NUM(), \
ZB_ZCL_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}

Send "Fast Poll Stop" command, see HA spec 9.5.5.4.

Parameters
bufferto put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback

◆ ZB_ZCL_POLL_CONTROL_SEND_SET_LONG_POLL_INTERVAL_REQ

#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 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL(ptr, (def_resp)) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ(ptr, ZB_ZCL_GET_SEQ_NUM(), \
ZB_ZCL_PACKET_PUT_DATA32_VAL(ptr, (interval)); \
ZB_ZCL_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}

Send "Set Long Poll Interval" command, see HA spec 9.5.5.5.

Parameters
bufferto put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback
interval- New Long Poll Interval

◆ ZB_ZCL_POLL_CONTROL_SEND_SET_SHORT_POLL_INTERVAL_REQ

#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 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL(ptr, (def_resp)) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ(ptr, ZB_ZCL_GET_SEQ_NUM(), \
ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, (interval)); \
ZB_ZCL_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}

Send "Set Short Poll Interval" command, see HA spec 9.5.5.6.

Parameters
bufferto put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback
interval- New Short Poll Interval

Enumeration Type Documentation

◆ zb_zcl_poll_control_cmd_e

Poll Control cluster command identifiers.

See also
HA spec, Poll Control Cluster, 9.5.4.3
Enumerator
ZB_ZCL_CMD_POLL_CONTROL_CHECK_IN_ID 

"Check-in" command. HA spec 9.5.4.4

◆ zb_zcl_poll_control_resp_cmd_e

Poll Control cluster response command identifiers.

See also
HA spec, Poll Control Cluster, 9.5.5.2
Enumerator
ZB_ZCL_CMD_POLL_CONTROL_CHECK_IN_RESPONSE_ID 

"Check-in response" command, HA spec 9.5.5.3

ZB_ZCL_CMD_POLL_CONTROL_FAST_POLL_STOP_ID 

"Fast Poll Stop" command, HA spec 9.5.5.4

ZB_ZCL_CMD_POLL_CONTROL_SET_LONG_POLL_INTERVAL_ID 

"Set Long Poll Interval" command, HA spec 9.5.5.5

ZB_ZCL_CMD_POLL_CONTROL_SET_SHORT_POLL_INTERVAL_ID 

"Set Short Poll Interval" command, HA spec 9.5.5.6

Function Documentation

◆ zb_zcl_poll_control_save_nvram()

void zb_zcl_poll_control_save_nvram ( zb_uint8_t  param)

Save to NVRAM Poll Control dataset.

Parameters
param
Note
ignore param, set it to 0

◆ zb_zcl_poll_control_set_client_addr()

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.

Parameters
local_ep- local endpoint number, is used to find particular attribute
addr- poll control client short address
ep- poll control client end point
Returns
RET_ERROR if addr is not a TC (WWAH requirement). RET_OK otherwise.

◆ zb_zcl_poll_control_start()

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 Controll process also starts automatically during ZCL periodic activities initialization if Poll Control server cluster is declared.

Parameters
param- buffer for check-in command
endpoint- endpoint to start poll control process on

◆ zb_zcl_poll_control_start_check_in()

void zb_zcl_poll_control_start_check_in ( zb_uint8_t  param)

Start Poll Control process on Server side.

Parameters
param- buffer for Poll Process

◆ zb_zcl_poll_control_stop()

zb_uint8_t zb_zcl_poll_control_stop ( void  )

Stop Poll control processing.

Checking already scheduled will be canceled

Returns
reference to buffer which was previously reserved for check-in. It must be reused or explicitly freed.

◆ zb_zcl_poll_controll_register_cb()

void zb_zcl_poll_controll_register_cb ( zb_callback_t  cb)

Register callback for Poll control cluster.

This callback will be called when check-in command is sent.

Parameters
cb- pointer to callback

◆ zb_zcl_set_fast_poll_timeout()

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.

Parameters
ep- local endpoint number, running Poll control client
fast_poll_timeout- Fast poll timeout value (in quarterseconds)
zb_zcl_poll_control_set_long_poll_interval_req_s
Structure representation of Set Long Poll Interval command payload.
Definition: zb_zcl_poll_control.h:504
ZB_ZCL_ATTR_POLL_CONTROL_FAST_POLL_TIMEOUT_ID
#define ZB_ZCL_ATTR_POLL_CONTROL_FAST_POLL_TIMEOUT_ID
Definition: zb_zcl_poll_control.h:96
ZB_ZCL_ATTR_POLL_CONTROL_MIN_CHECKIN_INTERVAL_ID
#define ZB_ZCL_ATTR_POLL_CONTROL_MIN_CHECKIN_INTERVAL_ID
Definition: zb_zcl_poll_control.h:98
ZB_ZCL_START_PACKET
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1431
ZB_ZCL_ATTR_POLL_CONTROL_ADDR_DATA_ID
#define ZB_ZCL_ATTR_POLL_CONTROL_ADDR_DATA_ID
Definition: zb_zcl_poll_control.h:107
ZB_ZCL_ATTR_POLL_CONTROL_LONG_POLL_INTERVAL_ID
#define ZB_ZCL_ATTR_POLL_CONTROL_LONG_POLL_INTERVAL_ID
Definition: zb_zcl_poll_control.h:92
ZB_ZCL_CLUSTER_ID_POLL_CONTROL
#define ZB_ZCL_CLUSTER_ID_POLL_CONTROL
Definition: zb_zcl_common.h:231
ZB_ZCL_ATTR_POLL_CONTROL_FAST_POLL_MAX_TIMEOUT_ID
#define ZB_ZCL_ATTR_POLL_CONTROL_FAST_POLL_MAX_TIMEOUT_ID
Definition: zb_zcl_poll_control.h:102
ZB_ZCL_CMD_POLL_CONTROL_CHECK_IN_RESPONSE_ID
@ ZB_ZCL_CMD_POLL_CONTROL_CHECK_IN_RESPONSE_ID
Definition: zb_zcl_poll_control.h:333
ZB_ZCL_GET_SEQ_NUM
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1349
zb_zcl_poll_control_check_in_res_s
Structure representation of Check-in response command payload.
Definition: zb_zcl_poll_control.h:417
ZB_ZCL_CMD_POLL_CONTROL_CHECK_IN_ID
@ ZB_ZCL_CMD_POLL_CONTROL_CHECK_IN_ID
Definition: zb_zcl_poll_control.h:325
ZB_ZCL_CMD_POLL_CONTROL_SET_SHORT_POLL_INTERVAL_ID
@ ZB_ZCL_CMD_POLL_CONTROL_SET_SHORT_POLL_INTERVAL_ID
Definition: zb_zcl_poll_control.h:336
ZB_ZCL_ATTR_POLL_CONTROL_STATUS_DATA_ID
#define ZB_ZCL_ATTR_POLL_CONTROL_STATUS_DATA_ID
Definition: zb_zcl_poll_control.h:105
zb_buf_begin
#define zb_buf_begin(buf)
Definition: zboss_api_buf.h:344
ZB_ZCL_PARSE_STATUS_SUCCESS
@ ZB_ZCL_PARSE_STATUS_SUCCESS
Definition: zb_zcl_common.h:328
ZB_ZCL_ATTR_POLL_CONTROL_SHORT_POLL_INTERVAL_ID
#define ZB_ZCL_ATTR_POLL_CONTROL_SHORT_POLL_INTERVAL_ID
Definition: zb_zcl_poll_control.h:94
ZB_ZCL_CMD_POLL_CONTROL_FAST_POLL_STOP_ID
@ ZB_ZCL_CMD_POLL_CONTROL_FAST_POLL_STOP_ID
Definition: zb_zcl_poll_control.h:334
ZB_ZCL_ATTR_POLL_CONTROL_CHECKIN_INTERVAL_ID
#define ZB_ZCL_ATTR_POLL_CONTROL_CHECKIN_INTERVAL_ID
Definition: zb_zcl_poll_control.h:90
ZB_ZCL_PARSE_STATUS_FAILURE
@ ZB_ZCL_PARSE_STATUS_FAILURE
Definition: zb_zcl_common.h:329
ZB_ZCL_ATTR_POLL_CONTROL_LONG_POLL_MIN_INTERVAL_ID
#define ZB_ZCL_ATTR_POLL_CONTROL_LONG_POLL_MIN_INTERVAL_ID
Definition: zb_zcl_poll_control.h:100
ZB_FALSE
#define ZB_FALSE
Definition: zb_types.h:370
zb_buf_len
#define zb_buf_len(buf)
Definition: zboss_api_buf.h:362
ZB_ZCL_CMD_POLL_CONTROL_SET_LONG_POLL_INTERVAL_ID
@ ZB_ZCL_CMD_POLL_CONTROL_SET_LONG_POLL_INTERVAL_ID
Definition: zb_zcl_poll_control.h:335
zb_zcl_poll_control_set_short_poll_interval_req_s
Structure representation of Set Short Poll Interval command payload.
Definition: zb_zcl_poll_control.h:561