|
#define | ZB_ZCL_GROUPS_GET_VIEW_GROUP_REQ(data_buf, view_group_req) |
| Parses View group command and fills in data request structure. If request contains invlid data, ZB_ZCL_NULL_ID is stored as group_id. More...
|
|
#define | ZB_ZCL_GROUPS_GET_VIEW_GROUP_RES(data_buf, view_group_res) |
| Parses View group response command and returns response data structure or NULL if request contains invlid data. More...
|
|
#define | ZB_ZCL_GROUPS_SEND_VIEW_GROUP_REQ(buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, group_id) |
| Send view group command. More...
|
|
View Group command and response have simpe payload. View group command is being processed, and View Group responce command originates from ZCL internals.
- Examples
- View Group request command can be formed as: View Group response command can be parsed as:
For more information see 545_groups sample
#define ZB_ZCL_GROUPS_GET_VIEW_GROUP_REQ |
( |
|
data_buf, |
|
|
|
view_group_req |
|
) |
| |
Value:
(view_group_req_ptr) =
ZB_BUF_LEN(data_buf) >= ZB_ZCL_VIEW_GROUP_REQ_SIZE ? \
\
if (view_group_req_ptr) \
{ \
ZB_HTOLE16(&(view_group_req).group_id, &view_group_req_ptr->group_id); \
} \
else \
{ \
view_group_req.group_id = ZB_ZCL_NULL_ID; \
} \
}
#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_groups_view_group_req_s zb_zcl_groups_view_group_req_t
View group command structure.
View group command structure.
Definition: zb_zcl_groups.h:285
Parses View group command and fills in data request structure. If request contains invlid data, ZB_ZCL_NULL_ID is stored as group_id.
- Parameters
-
data_buf | - pointer to zb_buf_t buffer containing command request data |
view_group_req | - variable to save command request |
- Note
- data_buf buffer should contain command request payload without ZCL header.
#define ZB_ZCL_GROUPS_GET_VIEW_GROUP_RES |
( |
|
data_buf, |
|
|
|
view_group_res |
|
) |
| |
Value:{ \
(view_group_res) =
ZB_BUF_LEN(data_buf) >= ZB_ZCL_VIEW_GROUP_RES_SIZE ? \
\
if (view_group_res) \
{ \
ZB_ZCL_HTOLE16_INPLACE(&(view_group_res)->group_id); \
\
} \
}
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:758
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:767
View group command response structure.
Definition: zb_zcl_groups.h:322
Parses View group response command and returns response data structure or NULL if request contains invlid data.
- Parameters
-
data_buf | - pointer to zb_buf_t buffer containing command response data |
view_group_res | - out pointer to zb_zcl_groups_add_group_res_t, containing command response record |
- Note
- data_buf buffer should contain response command payload without ZCL header
#define ZB_ZCL_GROUPS_SEND_VIEW_GROUP_REQ |
( |
|
buffer, |
|
|
|
addr, |
|
|
|
dst_addr_mode, |
|
|
|
dst_ep, |
|
|
|
ep, |
|
|
|
prfl_id, |
|
|
|
def_resp, |
|
|
|
cb, |
|
|
|
group_id |
|
) |
| |
Value:
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL(ptr, def_resp) \
ZB_ZCL_SEND_COMMAND_SHORT( \
}
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1168
Definition: zb_zcl_common.h:139
Definition: zb_zcl_groups.h:95
#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
Send view group command.
- Parameters
-
buffer | to 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 for getting command send status |
group_id | - group ID to add |