
Macros | |
| #define | ZB_ZCL_START_PACKET(zbbuf) |
| Initializes zb_buf_t buffer and returns pointer to the beginning of array. | |
| #define | ZB_ZCL_GET_BYTES_WRITTEN(zbbuf, ptr) |
| Return number of bytes written to the buffer. | |
| #define | ZB_ZCL_GET_BYTES_AVAILABLE_WITH_FRAGMENTATION(zbbuf, ptr) |
| #define | ZB_ZCL_GET_BYTES_AVAILABLE_WO_FRAGMENTATION(zbbuf, ptr) (ZB_ZCL_HI_WO_IEEE_MAX_PAYLOAD_SIZE - ZB_ZCL_GET_BYTES_WRITTEN(zbbuf, ptr)) |
| #define | ZB_ZCL_GET_BYTES_AVAILABLE(zbbuf, ptr, profile_id, cluster_id) |
| Return number of bytes available in a packet. | |
| #define | ZB_ZCL_ATTR_SZ_RAW(attr_size) |
| #define | ZB_ZCL_PACKET_PUT_DATA8(ptr, val) |
| Put 8-bit value to packet. | |
| #define | ZB_ZCL_PACKET_PUT_DATA16(ptr, val) |
| #define | ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val) (ptr) = zb_put_next_htole16((ptr), val) |
| #define | ZB_ZCL_PACKET_PUT_2DATA16_VAL(ptr, val1, val2) (ptr) = zb_put_next_2_htole16((ptr),(val1),(val2)) |
| #define | ZB_ZCL_PACKET_PUT_2DATA32_VAL(ptr, val1, val2) (ptr) = zb_put_next_2_htole32((ptr),(val1),(val2)) |
| #define | ZB_ZCL_PACKET_PUT_DATA32_VAL(ptr, val) |
| Put 32-bit value to packet. More... | |
| #define | ZB_ZCL_PACKET_PUT_DATA32(ptr, val) |
| Put 32-bit value to packet. More... | |
| #define | ZB_ZCL_PACKET_PUT_DATA48_VAL(ptr, val) |
| Put 48-bit value to packet. More... | |
| #define | ZB_ZCL_PACKET_PUT_DATA48(ptr, val) |
| Put 48-bit value to packet. More... | |
| #define | ZB_ZCL_PACKET_PUT_DATA24_VAL(ptr, val) |
| Put 24-bit value to packet. More... | |
| #define | ZB_ZCL_PACKET_PUT_DATA24(ptr, val) |
| Put 24-bit value to packet. More... | |
| #define | ZB_ZCL_PACKET_PUT_DATA64(ptr, val) |
| Put 64-bit value to packet. More... | |
| #define | ZB_ZCL_PACKET_GET_DATA8(dst_ptr, src_ptr) |
| Get 8-bit value from packet. More... | |
| #define | ZB_ZCL_PACKET_PUT_DATA_N(ptr, val, n) |
| Put N byte data to packet. More... | |
| #define | ZB_ZCL_PACKET_GET_DATA16(dst_ptr, src_ptr) |
| Get 16-bit value from packet. More... | |
| #define | ZB_ZCL_PACKET_GET_DATA24(dst_ptr, src_ptr) |
| Get 24-bit value from packet. More... | |
| #define | ZB_ZCL_PACKET_GET_DATA48(dst_ptr, src_ptr) |
| Get 48-bit value from packet. More... | |
| #define | ZB_ZCL_PACKET_GET_DATA32(dst_ptr, src_ptr) |
| Get 32-bit value from packet. More... | |
| #define | ZB_ZCL_PACKET_GET_DATA64(dst_ptr, src_ptr) |
| Get 64-bit value from packet. More... | |
| #define | ZB_ZCL_PACKET_GET_DATA_IEEE(dst_ptr, src_ptr) |
| Get IEEE address from packet. More... | |
| #define | ZB_ZCL_PACKET_PUT_DATA_IEEE(dst_ptr, src_ptr) |
| Put IEEE address into packet. More... | |
| #define | ZB_ZCL_PACKET_PUT_STRING(_ptr, _val) |
| #define | ZB_ZCL_PACKET_GET_STRING(_zcl_str, data, _zcl_str_max_size) |
| #define | ZB_ZCL_PACKET_GET_STATIC_STRING(_zcl_str, data) ZB_ZCL_PACKET_GET_STRING(_zcl_str, data, sizeof(_zcl_str)) |
| #define | ZB_ZCL_PACKET_GET_DATA_N(dst_ptr, src_ptr, n) |
| Get N-byte value from packet. More... | |
| #define | ZB_ZCL_FINISH_PACKET(zbbuf, ptr) (void) zb_zcl_finish_and_send_packet((zbbuf), (ptr), |
| #define | ZB_ZCL_SEND_COMMAND_SHORT(buffer, addr, dst_addr_mode, dst_ep, ep, prof_id, cluster_id, cb) (const zb_addr_u *)(const void *)(&(addr)), (dst_addr_mode), (dst_ep), (ep), (prof_id), (cluster_id), (cb)) |
| #define | ZB_ZCL_FINISH_N_SEND_PACKET(zbbuf, ptr, addr, dst_addr_mode, dst_ep, ep, prof_id, cluster_id, cb) (void) zb_zcl_finish_and_send_packet((zbbuf), (ptr),(const zb_addr_u *)(const void *)(&(addr)), dst_addr_mode, dst_ep, ep, prof_id, cluster_id, cb) |
| #define | ZB_ZCL_FINISH_N_SEND_PACKET_NEW(zbbuf, ptr, addr, dst_addr_mode, dst_ep, ep, prof_id, cluster_id, cb, aps_secured, disable_aps_ack, delay) (void) zb_zcl_finish_and_send_packet_new((zbbuf), (ptr),(const zb_addr_u *)(const void *)(&(addr)), dst_addr_mode, dst_ep, ep, prof_id, cluster_id, cb, aps_secured, disable_aps_ack, delay) |
| #define | ZB_ZCL_FINISH_PACKET_O(zbbuf, ptr) (ptr) = zb_buf_alloc_left((zbbuf), ZB_ZCL_GET_BYTES_WRITTEN((zbbuf), (ptr))); |
Functions | |
| zb_bool_t | zb_zcl_can_cluster_be_fragmented (zb_uint16_t profile_id, zb_uint16_t cluster_id) |
| zb_ret_t | zb_zcl_finish_and_send_packet (zb_bufid_t buffer, zb_uint8_t *ptr, const zb_addr_u *dst_addr, zb_uint8_t dst_addr_mode, zb_uint8_t dst_ep, zb_uint8_t ep, zb_uint16_t prof_id, zb_uint16_t cluster_id, zb_callback_t cb) |
| ZCL finish and send packet. More... | |
| zb_ret_t | zb_zcl_finish_and_send_packet_new (zb_bufid_t buffer, zb_uint8_t *ptr, const zb_addr_u *dst_addr, zb_uint8_t dst_addr_mode, zb_uint8_t dst_ep, zb_uint8_t ep, zb_uint16_t prof_id, zb_uint16_t cluster_id, zb_callback_t cb, zb_bool_t aps_secured, zb_bool_t disable_aps_ack, zb_uint16_t delay) |
Types and macros shared fill Fill ZCL packet.
| #define ZB_ZCL_ATTR_SZ_RAW | ( | attr_size | ) |
| #define ZB_ZCL_FINISH_PACKET | ( | zbbuf, | |
| ptr | |||
| ) | (void) zb_zcl_finish_and_send_packet((zbbuf), (ptr), |
Finish ZCL packet filling. Used bytes number are marked in a buffer.
| zbbuf | - pointer to zb_buf_t buffer. |
| ptr | - pointer to the byte after the last written byte in the buffer. |
| #define ZB_ZCL_GET_BYTES_AVAILABLE_WITH_FRAGMENTATION | ( | zbbuf, | |
| ptr | |||
| ) |
| #define ZB_ZCL_PACKET_GET_DATA16 | ( | dst_ptr, | |
| src_ptr | |||
| ) |
Get 16-bit value from packet.
| dst_ptr | - pointer to the memory to store value (pointer value preserved). |
| src_ptr | - pointer to the memory to get value from (will be incremented by value size). |
| #define ZB_ZCL_PACKET_GET_DATA24 | ( | dst_ptr, | |
| src_ptr | |||
| ) |
Get 24-bit value from packet.
| dst_ptr | - pointer to the memory to store value (pointer value preserved). |
| src_ptr | - pointer to the memory to get value from (will be incremented by value size). |
| #define ZB_ZCL_PACKET_GET_DATA32 | ( | dst_ptr, | |
| src_ptr | |||
| ) |
Get 32-bit value from packet.
| dst_ptr | - pointer to the memory to store value (pointer value preserved). |
| src_ptr | - pointer to the memory to get value from (will be incremented by value size). |
| #define ZB_ZCL_PACKET_GET_DATA48 | ( | dst_ptr, | |
| src_ptr | |||
| ) |
Get 48-bit value from packet.
| dst_ptr | - pointer to the memory to store value (pointer value preserved). |
| src_ptr | - pointer to the memory to get value from (will be incremented by value size). |
| #define ZB_ZCL_PACKET_GET_DATA64 | ( | dst_ptr, | |
| src_ptr | |||
| ) |
Get 64-bit value from packet.
| dst_ptr | - pointer to the memory to store value (pointer value preserved). |
| src_ptr | - pointer to the memory to get value from (will be incremented by value size). |
| #define ZB_ZCL_PACKET_GET_DATA8 | ( | dst_ptr, | |
| src_ptr | |||
| ) |
Get 8-bit value from packet.
| dst_ptr | - pointer to the memory to store value (pointer value preserved). |
| src_ptr | - pointer to the memory to get value from (will be incremented). |
| #define ZB_ZCL_PACKET_GET_DATA_IEEE | ( | dst_ptr, | |
| src_ptr | |||
| ) |
Get IEEE address from packet.
| dst_ptr | - pointer to the memory to store value (pointer value preserved). |
| src_ptr | - pointer to the memory to get value from (will be incremented by value size). |
| #define ZB_ZCL_PACKET_GET_DATA_N | ( | dst_ptr, | |
| src_ptr, | |||
| n | |||
| ) |
Get N-byte value from packet.
| dst_ptr | - pointer to the memory to store value (will be incremented by value size). |
| src_ptr | - pointer to the memory to get value from (pointer value preserved). |
| n | - data length. |
| #define ZB_ZCL_PACKET_GET_STATIC_STRING | ( | _zcl_str, | |
| data | |||
| ) | ZB_ZCL_PACKET_GET_STRING(_zcl_str, data, sizeof(_zcl_str)) |
Get ZCL String from packet and put it into array with fixed size.
| #define ZB_ZCL_PACKET_GET_STRING | ( | _zcl_str, | |
| data, | |||
| _zcl_str_max_size | |||
| ) |
Get ZCL String from packet.
| _zcl_str | - Destination buffer. |
| data | - Pointer to incoming data. |
| _zcl_str_max_size | - Size of destination buffer. |
| #define ZB_ZCL_PACKET_PUT_DATA16 | ( | ptr, | |
| val | |||
| ) |
| #define ZB_ZCL_PACKET_PUT_DATA16_VAL | ( | ptr, | |
| val | |||
| ) | (ptr) = zb_put_next_htole16((ptr), val) |
Put 16-bit value to packet
| ptr | - pointer to the place to put value to |
| val | - value to put into packet |
| #define ZB_ZCL_PACKET_PUT_DATA24 | ( | ptr, | |
| val | |||
| ) |
Put 24-bit value to packet.
| ptr | - pointer to the place to put value to |
| val | - pointer to the value to put into packet |
| #define ZB_ZCL_PACKET_PUT_DATA24_VAL | ( | ptr, | |
| val | |||
| ) |
Put 24-bit value to packet.
| ptr | - pointer to the place to put value to |
| val | - value to put into packet |
| #define ZB_ZCL_PACKET_PUT_DATA32 | ( | ptr, | |
| val | |||
| ) |
Put 32-bit value to packet.
| ptr | - pointer to the place to put value to |
| val | - pointer to the value to put into packet |
| #define ZB_ZCL_PACKET_PUT_DATA32_VAL | ( | ptr, | |
| val | |||
| ) |
Put 32-bit value to packet.
| ptr | - pointer to the place to put value to |
| val | - pointer to the value to put into packet |
| #define ZB_ZCL_PACKET_PUT_DATA48 | ( | ptr, | |
| val | |||
| ) |
Put 48-bit value to packet.
| ptr | - pointer to the place to put value to |
| val | - pointer to the value to put into packet |
| #define ZB_ZCL_PACKET_PUT_DATA48_VAL | ( | ptr, | |
| val | |||
| ) |
Put 48-bit value to packet.
| ptr | - pointer to the place to put value to |
| val | - value to put into packet |
| #define ZB_ZCL_PACKET_PUT_DATA64 | ( | ptr, | |
| val | |||
| ) |
Put 64-bit value to packet.
| ptr | - pointer to the place to put value to |
| val | - pointer to the value to put into packet |
| #define ZB_ZCL_PACKET_PUT_DATA_IEEE | ( | dst_ptr, | |
| src_ptr | |||
| ) |
Put IEEE address into packet.
| dst_ptr | - pointer to the memory to store value (will be incremented by value size). |
| src_ptr | - pointer to the memory to get value from (pointer value preserved). |
| #define ZB_ZCL_PACKET_PUT_DATA_N | ( | ptr, | |
| val, | |||
| n | |||
| ) |
Put N byte data to packet.
| ptr | - pointer to the place to put value to. |
| val | - pointer to the value to put into packet. |
| n | - number of bytes to be copied. |
| #define ZB_ZCL_PACKET_PUT_STRING | ( | _ptr, | |
| _val | |||
| ) |
Put ZCL Octet String to packet
| zb_ret_t zb_zcl_finish_and_send_packet | ( | zb_bufid_t | buffer, |
| zb_uint8_t * | ptr, | ||
| const zb_addr_u * | dst_addr, | ||
| zb_uint8_t | dst_addr_mode, | ||
| zb_uint8_t | dst_ep, | ||
| zb_uint8_t | ep, | ||
| zb_uint16_t | prof_id, | ||
| zb_uint16_t | cluster_id, | ||
| zb_callback_t | cb | ||
| ) |
ZCL finish and send packet.
| buffer | pointer to the buffer where ZCL cmd is stored |
| ptr | pointer to the end of ZCL cmd in buffer |
| dst_addr | destination address (see zb_addr_u) |
| dst_addr_mode | destination 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 endpoint |
| ep | source endpoint |
| prof_id | profile the command belongs to |
| cluster_id | cluster identifier |
| cb | command send status callback |