|
#define | ZB_ZCL_SET_STRING_VAL(str, val, len) (ZB_MEMCPY((zb_uint8_t*)(str) + 1, (val), (len)), *(zb_uint8_t*)(str) = (len)) |
| Sets correctly ZCL char string value.
|
|
#define | ZB_ZCL_GET_STRING_LENGTH(str) ((str)[0]) |
| Get ZCL string length.
|
|
#define | ZB_ZCL_SET_STRING_LENGTH(str, _newlen) (((str))[0] = _newlen) |
|
#define | ZB_ZCL_STRING_CONST_SIZE(str) (zb_uint8_t)(sizeof(str) - 1) |
| Returns size of a string constant.
|
|
#define | ZB_ZCL_GET_STRING_BEGIN(_str) (&((_str)[1])) |
|
#define | ZB_ZCL_GET_STRING_END(_str) (ZB_ZCL_GET_STRING_BEGIN(_str) + ZB_ZCL_GET_STRING_LENGTH(_str)) |
|
#define | ZB_ZCL_GET_STRING_REF_AT(_str, _pos) (ZB_ZCL_GET_STRING_BEGIN(_str) + _pos) |
|
#define | ZB_ZCL_GET_STRING_CHAR_AT(_str, _pos) *ZB_ZCL_GET_STRING_REF_AT(_str, _pos) |
|
#define | ZB_ZCL_STRING_TO_C_STRING(_str) |
|
#define | ZB_ZCL_STRING_CLEAR(_str) (_str[0] = 0) |
|
#define | ZB_ZCL_STRING_APPEND_C_STR(_zcl_str, _zcl_str_max_size, _c_str) zb_zcl_string_append_data(_zcl_str, _zcl_str_max_size, (const zb_uint8_t *) _c_str, strlen(_c_str)) |
|
#define | ZB_ZCL_STATIC_STRING_APPEND_C_STR(_zcl_s_str, _c_str) ZB_ZCL_STRING_APPEND_C_STR((zb_uint8_t *) _zcl_s_str, sizeof(_zcl_s_str), _c_str) |
|
#define | ZB_ZCL_STATIC_STRING_APPEND_CHAR(_zcl_s_str, _char) zb_zcl_string_append_byte(_zcl_s_str, sizeof(_zcl_s_str), (zb_uint8_t) _char) |
|
#define | ZB_ZCL_ATTR_SET_WITH_ATTR_ID(_set, _id) ((_set << 8) | (_id & 0xFF)) |
|
#define | ZB_ZCL_ATTR_SET_WITH_ATTR_ID(_set, _id) ((_set << 8) | (_id & 0xFF)) |
|
#define | ZB_ZCL_CLUSTER_REVISION_DEFAULT 1 |
| ZCL 6.0: Default value for cluster revision global attribute, see zb_zcl_attr_global_e.
|
|
#define | ZB_ZCL_SET_ATTRIBUTE(ep, cluster_id, cluster_role, attr_id, value_ptr, check_access) |
| Sets attribute value, perform all needed checks before and after setting new value, including read-only check and marking for reporting. More...
|
|
#define | ZB_ZCL_SET_DIRECTLY_ATTR_VAL8(attr_desc, value) |
| Set attribute 8-bit value without any check. Use this macro on your own risk, if and only if you are absolutely shure that no check for Access rights, Reporting and attribute type is needed. More...
|
|
#define | ZB_ZCL_SET_DIRECTLY_ATTR_VAL16(attr_desc, value) |
| Set attribute 16-bit value without any check. Use this macro on your own risk, if and only if you are absolutely shure that no check for Access rights, Reporting and attribute type is needed. More...
|
|
#define | ZB_ZCL_SET_DIRECTLY_ATTR_VAL32(attr_desc, value) |
| Set attribute 32-bit value without any check. Use this macro on your own risk, if and only if you are absolutely shure that no check for Access rights, Reporting and attribute type is needed. More...
|
|
#define | ZB_ZCL_GET_ATTRIBUTE_VAL_8(attr_desc) (*(zb_uint8_t*)attr_desc->data_p) |
|
#define | ZB_ZCL_GET_ATTRIBUTE_VAL_S8(attr_desc) (*(zb_int8_t*)attr_desc->data_p) |
|
#define | ZB_ZCL_GET_ATTRIBUTE_VAL_16(attr_desc) (*(zb_uint16_t*)attr_desc->data_p) |
|
#define | ZB_ZCL_GET_ATTRIBUTE_VAL_S16(attr_desc) (*(zb_int16_t*)attr_desc->data_p) |
|
#define | ZB_ZCL_GET_ATTRIBUTE_VAL_32(attr_desc) (*(zb_uint32_t*)attr_desc->data_p) |
|
#define | ZB_ZCL_GET_ATTRIBUTE_VAL_S32(attr_desc) (*(zb_int32_t*)attr_desc->data_p) |
|
|
enum | zb_zcl_attr_type_e {
ZB_ZCL_ATTR_TYPE_NULL = 0x00,
ZB_ZCL_ATTR_TYPE_8BIT = 0x08,
ZB_ZCL_ATTR_TYPE_16BIT =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x41,
ZB_ZCL_ATTR_TYPE_CHAR_STRING = 0x42,
ZB_ZCL_ATTR_TYPE_LONG_OCTET_STRING = 0x43,
ZB_ZCL_ATTR_TYPE_LONG_CHAR_STRING = 0x44,
ZB_ZCL_ATTR_TYPE_ARRAY = 0x48,
ZB_ZCL_ATTR_TYPE_IEEE_ADDR = 0xf0,
ZB_ZCL_ATTR_TYPE_128_BIT_KEY = 0xf1,
ZB_ZCL_ATTR_TYPE_UTC_TIME = 0xe2,
ZB_ZCL_ATTR_TYPE_CUSTOM_32ARRAY = 0x4a,
ZB_ZCL_ATTR_TYPE_INVALID = 0xff
} |
| ZCL attribute data type values. More...
|
|
enum | zb_zcl_attr_access_e {
ZB_ZCL_ATTR_ACCESS_READ_ONLY = 0x01,
ZB_ZCL_ATTR_ACCESS_WRITE_ONLY = 0x02,
ZB_ZCL_ATTR_ACCESS_READ_WRITE = ZB_ZCL_ATTR_ACCESS_READ_ONLY | ZB_ZCL_ATTR_ACCESS_WRITE_ONLY,
ZB_ZCL_ATTR_ACCESS_REPORTING = 0x04,
ZB_ZCL_ATTR_ACCESS_WRITE_OPTIONAL = ZB_ZCL_ATTR_ACCESS_READ_ONLY,
ZB_ZCL_ATTR_ACCESS_SINGLETON = 0x08,
ZB_ZCL_ATTR_ACCESS_SCENE = 0x10,
ZB_ZCL_ATTR_MANUF_SPEC = 0x20,
ZB_ZCL_ATTR_ACCESS_INTERNAL = 0x40
} |
| ZCL attribute access values. More...
|
|
enum | zb_zcl_attr_global_e { ZB_ZCL_ATTR_GLOBAL_CLUSTER_REVISION_ID = 0xfffd,
ZB_ZCL_ATTR_GLOBAL_ATTRIBUTE_REPORTING_STATUS_ID = 0xfffe
} |
| ZCL 6.0: Global attributes that are included to each cluster. More...
|
|
Types and macros shared among all attributes' definitions.