nRF5 SDK for Thread and Zigbee v2.0.0
Data Structures | Functions
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 representsation of Check-in response command payload. More...
 
struct  zb_zcl_poll_control_set_long_poll_interval_req_s
 Structure representsation of Set Long Poll Interval command payload. More...
 
struct  zb_zcl_poll_control_set_short_poll_interval_req_s
 Structure representsation of Set Short Poll Interval command payload. More...
 

Functions

zb_void_t zb_zcl_poll_control_write_attr_hook (zb_uint8_t endpoint, zb_uint16_t attr_id, zb_uint8_t *new_value)
 Hook on Write attribute. More...
 
zb_void_t 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. More...
 
zb_uint8_t zb_zcl_poll_control_stop (void)
 Stop Poll control processing. More...
 
zb_void_t zb_zcl_poll_control_start_check_in (zb_uint8_t param)
 Start Poll Control process on Server side. More...
 
zb_void_t zb_zcl_poll_controll_register_cb (zb_callback_t cb)
 Register callback for Poll control cluster. More...
 

Poll Control cluster attributes

enum  zb_zcl_poll_control_attr_e {
  ZB_ZCL_ATTR_POLL_CONTROL_CHECKIN_INTERVAL_ID = 0x0000, ZB_ZCL_ATTR_POLL_CONTROL_LONG_POLL_INTERVAL_ID = 0x0001, ZB_ZCL_ATTR_POLL_CONTROL_SHORT_POLL_INTERVAL_ID = 0x0002, ZB_ZCL_ATTR_POLL_CONTROL_FAST_POLL_TIMEOUT_ID = 0x0003,
  ZB_ZCL_ATTR_POLL_CONTROL_CHECKIN_INTERVAL_MIN_ID = 0x0004, ZB_ZCL_ATTR_POLL_CONTROL_LONG_POLL_INTERVAL_MIN_ID = 0x0005, ZB_ZCL_ATTR_POLL_CONTROL_FAST_POLL_TIMEOUT_MAX_ID = 0x0006, ZB_ZCL_ATTR_POLL_CONTROL_STATUS_DATA_ID = 0xffff,
  ZB_ZCL_ATTR_POLL_CONTROL_ADDR_DATA_ID = 0xfffe
}
 Poll Control cluster attribute identifiers. More...
 
#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   0x04
 Minimum value for Long Poll Interval attribute.
 
#define ZB_ZCL_POLL_CONTROL_LONG_POLL_INTERVAL_DEFAULT_VALUE   0x0014
 Default value for Long Poll Interval attribute.
 
#define ZB_ZCL_POLL_CONTROL_LONG_POLL_INTERVAL_MAX_VALUE   0x6e0000
 Maximum value for Long Poll Interval attribute.
 
#define ZB_ZCL_POLL_CONTROL_SHORT_POLL_INTERVAL_MIN_VALUE   0x01
 Minimum value for Short Poll Interval attribute.
 
#define ZB_ZCL_POLL_CONTROL_SHORT_POLL_INTERVAL_DEFAULT_VALUE   0x02
 Default value for Short Poll Interval attribute.
 
#define ZB_ZCL_POLL_CONTROL_SHART_POLL_INTERVAL_MAX_VALUE   0xffff
 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_INTERVAL_MIN_DEFAULT_VALUE   ((zb_uint32_t)0)
 Default value for CheckinIntervalMin attribute.
 
#define ZB_ZCL_POLL_CONTROL_LONG_POLL_INTERVAL_MIN_DEFAULT_VALUE   ((zb_uint32_t)0)
 Default value for LongPollIntervalMin attribute.
 
#define ZB_ZCL_POLL_CONTROL_FAST_POLL_TIMEOUT_MAX_DEFAULT_VALUE   ((zb_uint16_t)0)
 Default value for FastPollTimeoutMax attribute.
 

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 representsation 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 representsation 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 representsation of Set Short Poll Interval command payload.
 
zb_void_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...
 
zb_void_t zb_zcl_poll_control_stop_fast_poll (zb_uint8_t endpoint)
 Force to go long polling. More...
 
zb_void_t 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...
 
zb_void_t zb_zcl_poll_control_save_nvram (zb_uint8_t param)
 Save to NVRAM Poll Control dataset. More...
 
#define ZB_ZCL_CLUSTER_ID_POLL_CONTROL_SERVER_ROLE_GENERATED_CMD_LIST   ZB_ZCL_CMD_POLL_CONTROL_CHECK_IN_ID
 
#define ZB_ZCL_CLUSTER_ID_POLL_CONTROL_CLIENT_ROLE_RECEIVED_CMD_LIST   ZB_ZCL_CLUSTER_ID_POLL_CONTROL_SERVER_ROLE_GENERATED_CMD_LIST
 
#define ZB_ZCL_CLUSTER_ID_POLL_CONTROL_CLIENT_ROLE_GENERATED_CMD_LIST
 
#define ZB_ZCL_CLUSTER_ID_POLL_CONTROL_SERVER_ROLE_RECEIVED_CMD_LIST   ZB_ZCL_CLUSTER_ID_POLL_CONTROL_CLIENT_ROLE_GENERATED_CMD_LIST
 
#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_CLI_CALL_USER_APP(_buffer, _short_addr, _ep, _fast_poll_timeout, _result)
 
#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.

For more information see 5.51.2_poll_control_commands sample

Macro Definition Documentation

#define ZB_ZCL_CLUSTER_ID_POLL_CONTROL_CLIENT_ROLE_GENERATED_CMD_LIST
#define ZB_ZCL_POLL_CONTROL_CLI_CALL_USER_APP (   _buffer,
  _short_addr,
  _ep,
  _fast_poll_timeout,
  _result 
)
Value:
{ \
TRACE_MSG(TRACE_ZCL1, "ZB_ZCL_POLL_CONTROL_CLI_CALL_USER_APP", (FMT__0)); \
if (ZCL_CTX().device_cb) \
{ \
&(user_app_data->cb_param.checkin_cli_param); \
value->fast_poll_timeout = (_fast_poll_timeout); \
value->short_addr = (_short_addr); \
value->ep = (_ep); \
user_app_data->device_cb_id = ZB_ZCL_POLL_CONTROL_CHECK_IN_CLI_CB_ID; \
user_app_data->endpoint = (_ep); \
user_app_data->status = RET_OK; \
(ZCL_CTX().device_cb)(param); \
_result = user_app_data->status; \
} \
else \
{ \
_result = RET_OK; \
} \
}
Definition: zboss_api_zcl.h:515
Data for Device user application callback. This structure has receive to User application callback (s...
Definition: zboss_api_zcl.h:1230
#define ZB_GET_BUF_PARAM(zbbuf, type)
Definition: zboss_api_core.h:956
struct zb_zcl_device_callback_param_s zb_zcl_device_callback_param_t
Data for Device user application callback. This structure has receive to User application callback (s...
#define ZCL_CTX()
Definition: zboss_api_zcl.h:1829
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.
#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 \
{ \
(data_ptr)->is_start = src_ptr->is_start; \
ZB_HTOLE16(&((data_ptr)->timeout), &(src_ptr->timeout)); \
} \
}
struct zb_zcl_poll_control_check_in_res_s zb_zcl_poll_control_check_in_res_t
Structure representsation of Check-in response command payload.
Definition: zb_zcl_common.h:252
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:758
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:767
Definition: zb_zcl_common.h:251
Structure representsation of Check-in response command payload.
Definition: zb_zcl_poll_control.h:437

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).
#define ZB_ZCL_POLL_CONTROL_GET_SET_LONG_POLL_INTERVAL_REQ (   data_ptr,
  buffer,
  status 
)
Value:
{ \
{ \
} \
else \
{ \
ZB_HTOLE32(&((data_ptr)->interval), &(src_ptr->interval)); \
} \
}
Definition: zb_zcl_common.h:252
Structure representsation of Set Long Poll Interval command payload.
Definition: zb_zcl_poll_control.h:524
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:758
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:767
struct zb_zcl_poll_control_set_long_poll_interval_req_s zb_zcl_poll_control_set_long_poll_interval_t
Structure representsation of Set Long Poll Interval command payload.
Definition: zb_zcl_common.h:251

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).
#define ZB_ZCL_POLL_CONTROL_GET_SET_SHORT_POLL_INTERVAL_REQ (   data_ptr,
  buffer,
  status 
)
Value:
{ \
{ \
} \
else \
{ \
ZB_HTOLE16(&((data_ptr)->interval), &(src_ptr->interval)); \
} \
}
Definition: zb_zcl_common.h:252
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:758
Structure representsation of Set Short Poll Interval command payload.
Definition: zb_zcl_poll_control.h:581
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:767
Definition: zb_zcl_common.h:251
struct zb_zcl_poll_control_set_short_poll_interval_req_s zb_zcl_poll_control_set_short_poll_interval_t
Structure representsation of Set Short Poll Interval command payload.

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).
#define ZB_ZCL_POLL_CONTROL_SEND_CHECK_IN_REQ (   _buffer,
  _dst_addr,
  _dst_addr_mode,
  _dst_ep,
  _local_ep,
  _prfl_id,
  _cb 
)
Value:
{ \
ZB_ZCL_FINISH_PACKET((_buffer), _ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
_buffer, _dst_addr, _dst_addr_mode, _dst_ep, _local_ep, _prfl_id, \
}
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1168
Definition: zb_zcl_poll_control.h:348
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1250
#define ZB_ZCL_CONSTRUCT_COMMAND_HEADER(data_ptr, tsn, cmd_id)
Construct ZCL header.
Definition: zb_zcl_common.h:1125
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1572
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:116
Definition: zb_zcl_common.h:167
#define ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(buf_ptr)
Construct ZCL header frame control value for cluster-specific command response.
Definition: zb_zcl_common.h:1112

Send Check-in command, see HA spec 9.5.4.4.

Parameters
_buffer- to put packet to
_dst_addr- destinition 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
#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_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1271
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1168
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1289
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1572
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:116
Definition: zb_zcl_poll_control.h:356
Definition: zb_zcl_common.h:167

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
#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, \
}
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1168
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1572
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:116
Definition: zb_zcl_poll_control.h:357
Definition: zb_zcl_common.h:167

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
#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_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1168
Definition: zb_zcl_poll_control.h:358
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1572
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:116
Definition: zb_zcl_common.h:167
#define ZB_ZCL_PACKET_PUT_DATA32_VAL(ptr, val)
Put 32 bit value to packet.
Definition: zb_zcl_common.h:1301

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
#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_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, \
}
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1168
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1289
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1572
Definition: zb_zcl_poll_control.h:359
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:116
Definition: zb_zcl_common.h:167

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

Poll Control cluster attribute identifiers.

See also
HA spec, Poll Control Cluster 9.5.4.1
Enumerator
ZB_ZCL_ATTR_POLL_CONTROL_CHECKIN_INTERVAL_ID 

Check-in Interval attribute, HA spec 9.5.4.1.1.

ZB_ZCL_ATTR_POLL_CONTROL_LONG_POLL_INTERVAL_ID 

Long Poll Interval attribute, HA spec 9.5.4.1.2.

ZB_ZCL_ATTR_POLL_CONTROL_SHORT_POLL_INTERVAL_ID 

Short Poll Interval attribute, HA spec 9.5.4.1.3.

ZB_ZCL_ATTR_POLL_CONTROL_FAST_POLL_TIMEOUT_ID 

Fast Poll Timeout attribute, HA spec 9.5.4.1.

ZB_ZCL_ATTR_POLL_CONTROL_CHECKIN_INTERVAL_MIN_ID 

Check-in Interval Min attribute, HA spec 9.5.4.1.4.

ZB_ZCL_ATTR_POLL_CONTROL_LONG_POLL_INTERVAL_MIN_ID 

Long Poll Interval Min attribute, HA spec 9.5.4.1.5.

ZB_ZCL_ATTR_POLL_CONTROL_FAST_POLL_TIMEOUT_MAX_ID 

Fast Poll Timeout Max attribute, HA spec 9.5.4.1.6.

ZB_ZCL_ATTR_POLL_CONTROL_STATUS_DATA_ID 

Status Data - custom non-spec parameters.

ZB_ZCL_ATTR_POLL_CONTROL_ADDR_DATA_ID 

Status Data - custom non-spec parameters for server side.

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

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_void_t zb_zcl_poll_control_save_nvram ( zb_uint8_t  param)

Save to NVRAM Poll Control dataset.

Parameters
ignore,setit to 0
zb_void_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
zb_void_t 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.

Parameters
param- buffer for check-in command
endpoint- endpoint to start poll control process on
zb_void_t 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_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_void_t zb_zcl_poll_control_stop_fast_poll ( zb_uint8_t  endpoint)

Force to go long polling.

Parameters
endpoint- Endpoint, implementing Poll control cluster
zb_void_t zb_zcl_poll_control_write_attr_hook ( zb_uint8_t  endpoint,
zb_uint16_t  attr_id,
zb_uint8_t new_value 
)

Hook on Write attribute.

send Check-in if change Check-in interval & Check-in remain time > new check-in interval

Parameters
endpoint- endpoint number
attr_id- ID of attribute being written
new_value- pointer to new value of attribute
zb_void_t 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_void_t 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)

Documentation feedback | Developer Zone | Subscribe | Updated