22 #ifndef __ZIGBEE_ZCL_TYPES_H 23 #define __ZIGBEE_ZCL_TYPES_H 33 #define ZCL_TYPE_NO_DATA 0x00 // 0 octets 40 #define ZCL_TYPE_GENERAL_8BIT 0x08 // 1 octet 41 #define ZCL_TYPE_GENERAL_16BIT 0x09 // 2 octets 42 #define ZCL_TYPE_GENERAL_24BIT 0x0a // 3 octets 43 #define ZCL_TYPE_GENERAL_32BIT 0x0b // 4 octets 44 #define ZCL_TYPE_GENERAL_40BIT 0x0c // 5 octets 45 #define ZCL_TYPE_GENERAL_48BIT 0x0d // 6 octets 46 #define ZCL_TYPE_GENERAL_56BIT 0x0e // 7 octets 47 #define ZCL_TYPE_GENERAL_64BIT 0x0f // 8 octets 53 #define ZCL_TYPE_LOGICAL_BOOLEAN 0x10 // 1 octet, invalid=0xff 59 #define ZCL_BOOL_FALSE 0x00 60 #define ZCL_BOOL_TRUE 0x01 61 #define ZCL_BOOL_INVALID 0xff 67 #define ZCL_TYPE_BITMAP_8BIT 0x18 // 1 octet 68 #define ZCL_TYPE_BITMAP_16BIT 0x19 // 2 octets 69 #define ZCL_TYPE_BITMAP_24BIT 0x1a // 3 octets 70 #define ZCL_TYPE_BITMAP_32BIT 0x1b // 4 octets 71 #define ZCL_TYPE_BITMAP_40BIT 0x1c // 5 octets 72 #define ZCL_TYPE_BITMAP_48BIT 0x1d // 6 octets 73 #define ZCL_TYPE_BITMAP_56BIT 0x1e // 7 octets 74 #define ZCL_TYPE_BITMAP_64BIT 0x1f // 8 octets 80 #define ZCL_TYPE_UNSIGNED_8BIT 0x20 // 1 octet, invalid=0xff 81 #define ZCL_TYPE_UNSIGNED_16BIT 0x21 // 2 octets, invalid = 0xffff 82 #define ZCL_TYPE_UNSIGNED_24BIT 0x22 // 3 octets, invalid = 0xffffff 83 #define ZCL_TYPE_UNSIGNED_32BIT 0x23 // 4 octets, invalid = 0xffffffff 84 #define ZCL_TYPE_UNSIGNED_40BIT 0x24 // 5 octets, invalid = all ff's 85 #define ZCL_TYPE_UNSIGNED_48BIT 0x25 // 6 octets, invalid = all ff's 86 #define ZCL_TYPE_UNSIGNED_56BIT 0x26 // 7 octets, invalid = all ff's 87 #define ZCL_TYPE_UNSIGNED_64BIT 0x27 // 8 octets, invalid = all ff's 93 #define ZCL_TYPE_SIGNED_8BIT 0x28 // 1 octet, invalid=0x80 94 #define ZCL_TYPE_SIGNED_16BIT 0x29 // 2 octets, invalid=0x8000 95 #define ZCL_TYPE_SIGNED_24BIT 0x2a // 3 octets, invalid=0x800000 96 #define ZCL_TYPE_SIGNED_32BIT 0x2b // 4 octets, invalid=0x80000000 97 #define ZCL_TYPE_SIGNED_40BIT 0x2c // 5 octets, invalid=0x8000000000 98 #define ZCL_TYPE_SIGNED_48BIT 0x2d // 6 octets, invalid=0x80...0 99 #define ZCL_TYPE_SIGNED_56BIT 0x2e // 7 octets, invalid=0x80...0 100 #define ZCL_TYPE_SIGNED_64BIT 0x2f // 8 octets, invalid=0x80...0 106 #define ZCL_TYPE_ENUM_8BIT 0x30 // 1 octet, invalid=0xff 107 #define ZCL_TYPE_ENUM_16BIT 0x31 // 2 octets, invalid=0xffff 113 #define ZCL_TYPE_FLOAT_SEMI 0x38 // 2 octets, invalid=NaN 117 #define ZCL_TYPE_FLOAT_SINGLE 0x39 // 4 octets, invalid=NaN 120 #define ZCL_TYPE_FLOAT_DOUBLE 0x3a // 8 octets, invalid=NaN 217 #define ZCL_TYPE_STRING_OCTET 0x41 223 #define ZCL_TYPE_STRING_CHAR 0x42 228 #define ZCL_TYPE_STRING_LONG_OCTET 0x43 234 #define ZCL_TYPE_STRING_LONG_CHAR 0x44 243 #define ZCL_TYPE_ARRAY 0x48 // invalid=0xffff in first 2 octets 245 #define ZCL_TYPE_STRUCT 0x4C // invalid=0xffff in first 2 octets 252 #define ZCL_TYPE_SET 0x50 // number of elements = 0xffff 254 #define ZCL_TYPE_BAG 0x51 // number of elements = 0xffff 261 #define ZCL_TYPE_TIME_TIMEOFDAY 0xE0 // 4 octets, invalid=0xffffffff 265 #define ZCL_TYPE_TIME_DATE 0xE1 // 4 octets, invalid=0xffffffff 268 #define ZCL_TYPE_TIME_UTCTIME 0xE2 // 4 octets, invalid=0xffffffff 272 #define ZCL_UTCTIME_INVALID 0xFFFFFFFF 293 #define ZCL_TYPE_ID_CLUSTER 0xE8 // 2 octets, invalid=0xffff 297 #define ZCL_TYPE_ID_ATTRIB 0xE9 // 2 octets, invalid=0xffff 300 #define ZCL_TYPE_ID_BACNET_OID 0xEA // 4 octets, invalid=0xffffffff 306 #define ZCL_TYPE_IEEE_ADDR 0xF0 // 8 octets, invalid=all ffs 310 #define ZCL_TYPE_SECURITY_KEY 0xF1 // 16 octets (128-bit security key) 316 #define ZCL_TYPE_UNKNOWN 0xFF // 0 octets 327 #if BYTE_ORDER == LITTLE_ENDIAN 342 #if BYTE_ORDER == LITTLE_ENDIAN 361 #define ZCL_T_INVALID 0x0F 363 #define ZCL_T_DISCRETE 0x80 366 #define ZCL_T_ANALOG 0x20 369 #define ZCL_T_SIGNED 0x40 371 #define ZCL_T_FLOAT 0x10 373 #define ZCL_T_REPORTABLE (ZCL_T_ANALOG | ZCL_T_DISCRETE) 383 #define ZCL_T_SIZE_MASK 0x0F 384 #define ZCL_T_SIZE_INVALID (ZCL_T_INVALID & ZCL_T_SIZE_MASK) 386 #define ZCL_T_SIZE_SHORT 0x0E 388 #define ZCL_T_SIZE_LONG 0x0D 390 #define ZCL_T_SIZE_128BIT 0x0C 392 #define ZCL_T_SIZE_VARIABLE 0x0B 397 #define ZCL_TYPE_IS_ANALOG(t) (zcl_type_info[t] & ZCL_T_ANALOG) 398 #define ZCL_TYPE_IS_DISCRETE(t) (zcl_type_info[t] & ZCL_T_DISCRETE) 400 #define ZCL_TYPE_IS_SIGNED(t) (zcl_type_info[t] & ZCL_T_SIGNED) 402 #define ZCL_TYPE_IS_REPORTABLE(t) (zcl_type_info[t] & ZCL_T_REPORTABLE) 404 #define ZCL_TYPE_IS_INVALID(t) (zcl_type_info[t] == ZCL_T_INVALID) 409 #define ZCL_SIZE_SHORT -1 410 #define ZCL_SIZE_LONG -2 411 #define ZCL_SIZE_VARIABLE -3 412 #define ZCL_SIZE_INVALID -127 423 #endif // __ZIGBEE_ZCL_TYPES_H unsigned long uint32_t
32-bit unsigned integer
Definition: platform_config.h:43
const uint8_t zcl_type_info[256]
Table to store information on each ZCL datatype.
Definition: zcl_types.c:54
#define XBEE_BEGIN_DECLS
Macro defined to.
Definition: platform.h:41
const char * zcl_type_name(uint8_t type)
Return a descriptive string for a given ZCL attribute type.
Definition: zcl_types.c:316
Date (for ZCL_TYPE_TIME_DATE Data Type)
Definition: zcl_types.h:288
48-bit unsigned in host-byte-order
Definition: zcl_types.h:338
Time of Day (for ZCL_TYPE_TIME_TIMEOFDAY Data Type)
Definition: zcl_types.h:280
unsigned short uint16_t
16-bit unsigned integer
Definition: platform_config.h:41
unsigned char uint8_t
8-bit unsigned integer
Definition: platform_config.h:39
Macros for working with 64-bit integers via the zcl64_t datatype.
40-bit unsigned in host-byte-order
Definition: zcl_types.h:324
int zcl_sizeof_type(uint8_t type)
Return the number of octets used by a given ZCL datatype.
Definition: zcl_types.c:274
#define XBEE_END_DECLS
Macro defined to.
Definition: platform.h:42