Developing with ZBOSS for Zigbee
|
Data Structures | |
struct | zb_zcl_default_resp_payload_s |
Default response payload structure. More... | |
Macros | |
#define | ZB_ZCL_SEND_DEFAULT_RESP_DIRECTION(buffer, addr, addr_mode, dst_ep, ep, prof_id, cluster_id, seq_num, cmd, status_code, direction) |
Send default response command with custom Direction. More... | |
#define | ZB_ZCL_SEND_DEFAULT_RESP_WITH_CB(buffer, addr, addr_mode, dst_ep, ep, prof_id, cluster_id, seq_num, cmd, status_code, callback) |
Send default response command and execute callback when it is acknowledged or expired. More... | |
#define | ZB_ZCL_SEND_DEFAULT_RESP_WITH_CB_NEW(buffer, addr, addr_mode, dst_ep, ep, prof_id, cluster_id, seq_num, cmd, status_code, callback, aps_secured) |
#define | ZB_ZCL_SEND_DEFAULT_RESP_MANUF_WITH_CB(buffer, addr, addr_mode, dst_ep, ep, prof_id, cluster_id, seq_num, cmd, status_code, manuf_code, direction, callback) |
Send default response command and execute callback when it's acknowledged or expired. More... | |
#define | ZB_ZCL_CHECK_IF_SEND_DEFAULT_RESP_EXT( _is_broadcast, _delivery_mode, _disable_def_resp, _status, _is_def_resp_frame) |
check whether command requires default response to be sent More... | |
#define | ZB_ZCL_CHECK_IF_SEND_DEFAULT_RESP(_cmd_info, _status) |
API call that is used to check if it is needed to send Default response for the command. More... | |
#define | ZB_ZCL_SEND_DEFAULT_RESP_EXT(_buffer, _dst_addr, _dst_addr_mode, _dst_ep, _src_ep, _prof_id, _cluster_id, _seq_num, _cmd, _status_code, _direction, _is_manuf_specific, _manuf_code, _callback) |
General API for sending Default response command. More... | |
#define | ZB_ZCL_SEND_DEFAULT_RESP(buffer, addr, addr_mode, dst_ep, ep, prof_id, cluster_id, seq_num, cmd, status_code) |
Send default response command. More... | |
#define | ZB_ZCL_SEND_DEFAULT_RESP_NEW(buffer, addr, addr_mode, dst_ep, ep, prof_id, cluster_id, seq_num, cmd, status_code, aps_secured) |
#define | ZB_ZCL_SEND_DEFAULT_RESP_MANUF( buffer, addr, addr_mode, dst_ep, ep, prof_id, cluster_id, seq_num, cmd, status_code, manuf_code, direction) |
Send default response command. More... | |
#define | ZB_ZCL_READ_DEFAULT_RESP(buffer) |
Default response structured reading. More... | |
Typedefs | |
typedef struct zb_zcl_default_resp_payload_s | zb_zcl_default_resp_payload_t |
Default response payload structure. | |
Default response command is defined in ZCL spec, subclause 2.4.12.
#define ZB_ZCL_CHECK_IF_SEND_DEFAULT_RESP | ( | _cmd_info, | |
_status | |||
) |
API call that is used to check if it is needed to send Default response for the command.
_cmd_info | - variable of zb_zcl_parsed_hdr_t type, containing received command header data |
_status | - status of the handled command |
#define ZB_ZCL_CHECK_IF_SEND_DEFAULT_RESP_EXT | ( | _is_broadcast, | |
_delivery_mode, | |||
_disable_def_resp, | |||
_status, | |||
_is_def_resp_frame | |||
) |
check whether command requires default response to be sent
Default response is sent if:
This is a helper method, use ZB_ZCL_CHECK_IF_SEND_DEFAULT_RESP instead
_is_broadcast | - broadcast bit from NWK header |
_delivery_mode | - delivery mode from APS header |
_disable_def_resp | - Disable Default Response bit from ZCL header |
_status | - status of the handled command |
_is_def_resp_frame | - check for command type |
#define ZB_ZCL_READ_DEFAULT_RESP | ( | buffer | ) |
Default response structured reading.
buffer | - pointer to the message buffer (of type zb_bufid_t) containing payload |
#define ZB_ZCL_SEND_DEFAULT_RESP | ( | buffer, | |
addr, | |||
addr_mode, | |||
dst_ep, | |||
ep, | |||
prof_id, | |||
cluster_id, | |||
seq_num, | |||
cmd, | |||
status_code | |||
) |
Send default response command.
buffer | - ID zb_bufid_t of a buffer with payload |
addr | - short destination address |
addr_mode | - address mode, only ZB_APS_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT and ZB_APS_ADDR_MODE_16_ENDP_PRESENT are supported |
dst_ep | - destination end point |
ep | - our end point |
prof_id | - profile identifier |
cluster_id | - cluster identifier |
seq_num | - sequence number |
cmd | - identifier of the command the response is dedicated to |
status_code | - status field for received command |
#define ZB_ZCL_SEND_DEFAULT_RESP_DIRECTION | ( | buffer, | |
addr, | |||
addr_mode, | |||
dst_ep, | |||
ep, | |||
prof_id, | |||
cluster_id, | |||
seq_num, | |||
cmd, | |||
status_code, | |||
direction | |||
) |
Send default response command with custom Direction.
If you don't want to specify direction explicitly, use ZB_ZCL_SEND_DEFAULT_RESP()
buffer | - ID zb_bufid_t of a buffer with payload |
addr | - short destination address |
addr_mode | - address mode, only ZB_APS_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT and ZB_APS_ADDR_MODE_16_ENDP_PRESENT are supported |
dst_ep | - destination end point |
ep | - our end point |
prof_id | - profile identifier |
cluster_id | - cluster identifier |
seq_num | - sequence number |
cmd | - identifier of the command the response is dedicated to |
status_code | - status field for received command |
direction | - direction of the command (see zcl_frame_direction) |
#define ZB_ZCL_SEND_DEFAULT_RESP_EXT | ( | _buffer, | |
_dst_addr, | |||
_dst_addr_mode, | |||
_dst_ep, | |||
_src_ep, | |||
_prof_id, | |||
_cluster_id, | |||
_seq_num, | |||
_cmd, | |||
_status_code, | |||
_direction, | |||
_is_manuf_specific, | |||
_manuf_code, | |||
_callback | |||
) |
General API for sending Default response command.
_buffer | - zb_bufid_t buffer |
_dst_addr | - 16-bit destination address |
_dst_addr_mode | - destination address mode. Possible values ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT, ZB_APS_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT, ZB_APS_ADDR_MODE_16_ENDP_PRESENT |
_dst_ep | - destination Endpoint number |
_src_ep | - source Endpoint number |
_prof_id | - profile ID |
_cluster_id | - cluster ID |
_seq_num | - transaction sequence number |
_cmd | - command ID |
_status_code | - command status (see zcl_status) |
_direction | - direction of command (see zcl_frame_direction) |
_is_manuf_specific | - flag, equal to 1 if command is manufacturer specific |
_manuf_code | - manufacturer specific code, is taken unto account only if _is_manuf_specific is equal to 1 |
_callback | - pointer to the callback function that will be called when the command is sent |
#define ZB_ZCL_SEND_DEFAULT_RESP_MANUF | ( | buffer, | |
addr, | |||
addr_mode, | |||
dst_ep, | |||
ep, | |||
prof_id, | |||
cluster_id, | |||
seq_num, | |||
cmd, | |||
status_code, | |||
manuf_code, | |||
direction | |||
) |
Send default response command.
buffer | - ID zb_bufid_t of a buffer with payload |
addr | - short destination address |
addr_mode | - address mode, only ZB_APS_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT and ZB_APS_ADDR_MODE_16_ENDP_PRESENT are supported |
dst_ep | - destination end point |
ep | - our end point |
prof_id | - profile identifier |
cluster_id | - cluster identifier |
seq_num | - sequence number |
cmd | - identifier of the command the response is dedicated to |
status_code | - status field for received command |
manuf_code | - manufacturer code |
direction | - direction of command (see zcl_frame_direction) |
#define ZB_ZCL_SEND_DEFAULT_RESP_MANUF_WITH_CB | ( | buffer, | |
addr, | |||
addr_mode, | |||
dst_ep, | |||
ep, | |||
prof_id, | |||
cluster_id, | |||
seq_num, | |||
cmd, | |||
status_code, | |||
manuf_code, | |||
direction, | |||
callback | |||
) |
Send default response command and execute callback when it's acknowledged or expired.
If no callback is needed, use ZB_ZCL_SEND_DEFAULT_RESP()
buffer | - ID zb_bufid_t of a buffer with payload |
addr | - short destination address |
addr_mode | - address mode, only ZB_APS_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT and ZB_APS_ADDR_MODE_16_ENDP_PRESENT are supported |
dst_ep | - destination end point |
ep | - our end point |
prof_id | - profile identifier |
cluster_id | - cluster identifier |
seq_num | - sequence number |
cmd | - identifier of the command the response is dedicated to |
status_code | - status field for received command |
manuf_code | - manufacturer code |
direction | - direction of the command (see zcl_frame_direction) |
callback | - callback to be executed when command is acknowledged or expired (of type zb_callback_t) |
#define ZB_ZCL_SEND_DEFAULT_RESP_NEW | ( | buffer, | |
addr, | |||
addr_mode, | |||
dst_ep, | |||
ep, | |||
prof_id, | |||
cluster_id, | |||
seq_num, | |||
cmd, | |||
status_code, | |||
aps_secured | |||
) |
#define ZB_ZCL_SEND_DEFAULT_RESP_WITH_CB | ( | buffer, | |
addr, | |||
addr_mode, | |||
dst_ep, | |||
ep, | |||
prof_id, | |||
cluster_id, | |||
seq_num, | |||
cmd, | |||
status_code, | |||
callback | |||
) |
Send default response command and execute callback when it is acknowledged or expired.
If no callback is needed, use ZB_ZCL_SEND_DEFAULT_RESP()
buffer | - ID zb_bufid_t of a buffer with payload |
addr | - short destination address |
addr_mode | - address mode, only ZB_APS_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT and ZB_APS_ADDR_MODE_16_ENDP_PRESENT are supported |
dst_ep | - destination end point |
ep | - our end point |
prof_id | - profile identifier |
cluster_id | - cluster identifier |
seq_num | - sequence number |
cmd | - identifier of the command the response is dedicated to |
status_code | - status field for received command |
callback | - callback to be executed when command is acknowledged or expired (of type zb_callback_t) |
#define ZB_ZCL_SEND_DEFAULT_RESP_WITH_CB_NEW | ( | buffer, | |
addr, | |||
addr_mode, | |||
dst_ep, | |||
ep, | |||
prof_id, | |||
cluster_id, | |||
seq_num, | |||
cmd, | |||
status_code, | |||
callback, | |||
aps_secured | |||
) |