|
#define | ZB_ZCL_GROUPS_GET_GROUP_MEMBERSHIP_REQ(data_buf, group_member_req) |
| Parses Get Group Membership command and returns pointer to data request structure. If request contains invlid data, NULL is returned. More...
|
|
#define | ZB_ZCL_GROUPS_GET_GROUP_MEMBERSHIP_RES(data_buf, group_member_res) |
| Parses Get Group Membership command response and returns pointer to data response structure. If response contains invlid data, NULL is returned. More...
|
|
#define | ZB_ZCL_GROUPS_INIT_GET_GROUP_MEMBERSHIP_REQ(buffer, ptr, def_resp, group_cnt) |
| Initialize Get group membership command. More...
|
|
#define | ZB_ZCL_GROUPS_ADD_ID_GET_GROUP_MEMBERSHIP_REQ(ptr, group_id) |
| Add group id to command payload. More...
|
|
#define | ZB_ZCL_GROUPS_SEND_GET_GROUP_MEMBERSHIP_REQ(buffer, ptr, addr, dst_addr_mode, dst_ep, ep, prfl_id, cb) |
| Sends Get group membership command. More...
|
|
Both Get Group Membership command request and response have a complex array-style payload.
- Examples
- Get Group Membership request can be filled in as: Get Group Membership response can be parsed as: If there are more then one response record, macro call can be iterated.
For more information see 516_groups sample
#define ZB_ZCL_GROUPS_ADD_ID_GET_GROUP_MEMBERSHIP_REQ |
( |
|
ptr, |
|
|
|
group_id |
|
) |
| |
Value:
}
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1289
Add group id to command payload.
- Parameters
-
ptr | - command buffer pointer |
group_id | - group ID |
#define ZB_ZCL_GROUPS_GET_GROUP_MEMBERSHIP_REQ |
( |
|
data_buf, |
|
|
|
group_member_req |
|
) |
| |
Value:
zb_uint8_t cmd_size = ZB_ZCL_GET_GROUP_MEMBERSHIP_REQ_SIZE; \
\
(group_member_req) = (
ZB_BUF_LEN(data_buf) >= cmd_size) ? \
\
if (group_member_req) \
{ \
cmd_size +=
sizeof(
zb_uint16_t) * (group_member_req)->group_count; \
{ \
for(i_tmp = 0; i_tmp < (group_member_req)->group_count; i_tmp++) \
{ \
ZB_ZCL_HTOLE16_INPLACE(&(group_member_req)->group_id[i_tmp]); \
} \
} \
else \
{ \
group_member_req = NULL; \
} \
} \
}
Get Group Membership command structure.
Definition: zb_zcl_groups.h:401
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:120
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:758
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:767
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:116
Parses Get Group Membership command and returns pointer to data request structure. If request contains invlid data, NULL is returned.
- Parameters
-
data_buf | - pointer to zb_buf_t buffer containing command request data |
group_member_req | - pointer to command request |
- Note
- data_buf buffer should contain command request payload without ZCL header.
#define ZB_ZCL_GROUPS_GET_GROUP_MEMBERSHIP_RES |
( |
|
data_buf, |
|
|
|
group_member_res |
|
) |
| |
Value:
zb_uint8_t cmd_size = ZB_ZCL_GET_GROUP_MEMBERSHIP_RES_SIZE; \
\
(group_member_res) = (
ZB_BUF_LEN(data_buf) >= cmd_size) ? \
\
if (group_member_res) \
{ \
cmd_size +=
sizeof(
zb_uint16_t) * (group_member_res)->group_count; \
{ \
for(i = 0; i < (group_member_res)->group_count; i++) \
{ \
ZB_ZCL_HTOLE16_INPLACE(&(group_member_res)->group_id[i]); \
} \
} \
else \
{ \
group_member_res = NULL; \
} \
} \
}
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:120
Get Group Membership command response structure.
Definition: zb_zcl_groups.h:448
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:758
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:767
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:116
Parses Get Group Membership command response and returns pointer to data response structure. If response contains invlid data, NULL is returned.
- Parameters
-
data_buf | - pointer to zb_buf_t buffer containing command response data |
group_member_res | - pointer to command response |
- Note
- data_buf buffer should contain command response payload without ZCL header.
#define ZB_ZCL_GROUPS_INIT_GET_GROUP_MEMBERSHIP_REQ |
( |
|
buffer, |
|
|
|
ptr, |
|
|
|
def_resp, |
|
|
|
group_cnt |
|
) |
| |
Value:{ \
ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL(ptr, def_resp) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ( \
}
#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
Definition: zb_zcl_groups.h:96
Initialize Get group membership command.
- Parameters
-
buffer | to put packet to |
ptr | - command buffer pointer |
def_resp | - enable/disable default response |
group_cnt | - group count |
#define ZB_ZCL_GROUPS_SEND_GET_GROUP_MEMBERSHIP_REQ |
( |
|
buffer, |
|
|
|
ptr, |
|
|
|
addr, |
|
|
|
dst_addr_mode, |
|
|
|
dst_ep, |
|
|
|
ep, |
|
|
|
prfl_id, |
|
|
|
cb |
|
) |
| |
Value:
ZB_ZCL_SEND_COMMAND_SHORT( \
}
Definition: zb_zcl_common.h:139
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1572
Sends Get group membership command.
- Parameters
-
buffer | to place data to |
ptr | - pointer to the memory area after the command data end |
addr | - address to send packet to |
dst_addr_mode | - addressing mode |
dst_ep | - destination endpoint |
ep | - sending endpoint |
prfl_id | - profile identifier |
cb | - callback for getting command send status |