Digi XBee(R) ANSI C Host Library
|
Macros and structures related to the ZCL datatypes. More...
Go to the source code of this file.
Data Structures | |
struct | zcl_timeofday_t |
Time of Day (for ZCL_TYPE_TIME_TIMEOFDAY Data Type) More... | |
struct | zcl_date_t |
Date (for ZCL_TYPE_TIME_DATE Data Type) More... | |
union | zcl40_t |
40-bit unsigned in host-byte-order More... | |
union | zcl48_t |
48-bit unsigned in host-byte-order More... | |
Macros | |
#define | ZCL_UTCTIME_INVALID 0xFFFFFFFF |
#define | ZCL_TYPE_IS_ANALOG(t) (zcl_type_info[t] & ZCL_T_ANALOG) |
ZCL data type t is an analog type. | |
#define | ZCL_TYPE_IS_DISCRETE(t) (zcl_type_info[t] & ZCL_T_DISCRETE) |
ZCL data type t is a discrete type. | |
#define | ZCL_TYPE_IS_SIGNED(t) (zcl_type_info[t] & ZCL_T_SIGNED) |
ZCL data type t is a signed type. | |
#define | ZCL_TYPE_IS_REPORTABLE(t) (zcl_type_info[t] & ZCL_T_REPORTABLE) |
ZCL data type t is a reportable type. | |
#define | ZCL_TYPE_IS_INVALID(t) (zcl_type_info[t] == ZCL_T_INVALID) |
ZCL data type t is an invalid (unsupported/unrecognized) type. | |
#define | ZCL_SIZE_SHORT -1 |
#define | ZCL_SIZE_LONG -2 |
#define | ZCL_SIZE_VARIABLE -3 |
#define | ZCL_SIZE_INVALID -127 |
Typedefs | |
typedef uint32_t | zcl_utctime_t |
Functions | |
int | zcl_sizeof_type (uint8_t type) |
Return the number of octets used by a given ZCL datatype. More... | |
const char * | zcl_type_name (uint8_t type) |
Return a descriptive string for a given ZCL attribute type. More... | |
Variables | |
const uint8_t | zcl_type_info [256] |
Table to store information on each ZCL datatype. More... | |
ZCL Null Types | |
#define | ZCL_TYPE_NO_DATA 0x00 |
ZCL Logical (discrete) Types | |
#define | ZCL_TYPE_LOGICAL_BOOLEAN 0x10 |
Values for #ZCL_TYPE_LOGICAL_BOOLEAN | |
#define | ZCL_BOOL_FALSE 0x00 |
#define | ZCL_BOOL_TRUE 0x01 |
#define | ZCL_BOOL_INVALID 0xff |
ZCL Enumeration (discrete) Types | |
#define | ZCL_TYPE_ENUM_8BIT 0x30 |
#define | ZCL_TYPE_ENUM_16BIT 0x31 |
ZCL Floating point (analog) Types | |
#define | ZCL_TYPE_FLOAT_SEMI 0x38 |
semi-precision (16-bit) floating point (unsupported) | |
#define | ZCL_TYPE_FLOAT_SINGLE 0x39 |
single-precision (32-bit) IEEE 754 floating point | |
#define | ZCL_TYPE_FLOAT_DOUBLE 0x3a |
double-precision (64-bit) IEEE 754 floating point | |
ZCL String (discrete) Types | |
#define | ZCL_TYPE_STRING_OCTET 0x41 |
First octet is number of bytes in string or 0xff for invalid. | |
#define | ZCL_TYPE_STRING_CHAR 0x42 |
First octet is number of characters in string or 0xff for invalid. More... | |
#define | ZCL_TYPE_STRING_LONG_OCTET 0x43 |
First two octets are number of bytes in string or 0xffff for invalid. More... | |
#define | ZCL_TYPE_STRING_LONG_CHAR 0x44 |
First two octets are number of characters in string or 0xffff for invalid. More... | |
ZCL Ordered Sequence (discrete) Types | |
#define | ZCL_TYPE_ARRAY 0x48 |
ZCL Array (unsupported) | |
#define | ZCL_TYPE_STRUCT 0x4C |
ZCL Struct (unsupported) | |
ZCL Collection (discrete) Types | |
#define | ZCL_TYPE_SET 0x50 |
ZCL Set (unsupported) | |
#define | ZCL_TYPE_BAG 0x51 |
ZCL Bag (unsupported) | |
ZCL Time (analog) Types | |
#define | ZCL_TYPE_TIME_TIMEOFDAY 0xE0 |
see zcl_timeofday_t | |
#define | ZCL_TYPE_TIME_DATE 0xE1 |
see zcl_date_t | |
#define | ZCL_TYPE_TIME_UTCTIME 0xE2 |
number of seconds (stored in uint32_t) since Midnight on 1/1/2000 UTC | |
ZCL Identifier (discrete) Types | |
#define | ZCL_TYPE_ID_CLUSTER 0xE8 |
16-bit cluster ID | |
#define | ZCL_TYPE_ID_ATTRIB 0xE9 |
16-bit attribute ID | |
#define | ZCL_TYPE_ID_BACNET_OID 0xEA |
32-bit BACnet OID | |
ZCL Miscellaneous Types | |
#define | ZCL_TYPE_IEEE_ADDR 0xF0 |
64-bit IEEE address | |
#define | ZCL_TYPE_SECURITY_KEY 0xF1 |
128-bit security key | |
ZCL Unknown Type | |
#define | ZCL_TYPE_UNKNOWN 0xFF |
Unknown ZCL Type. | |
Settings for zcl_type_info[] | |
These bitfields should only be used internally by the library, and should be exposed to user code via public APIs. | |
#define | ZCL_T_INVALID 0x0F |
Not a valid ZCL type. | |
#define | ZCL_T_DISCRETE 0x80 |
Discrete values (bitmap, enum, etc.) that can't be added/subtracted or (if reportable) have a reportable change. More... | |
#define | ZCL_T_ANALOG 0x20 |
If an attribute isn't discrete, it's analog (signed, unsigned, float, etc.) | |
#define | ZCL_T_SIGNED 0x40 |
Type is signed (default is unsigned). Only analog types can be signed. | |
#define | ZCL_T_FLOAT 0x10 |
Type is floating point (single, double or semi-precision). | |
#define | ZCL_T_REPORTABLE (ZCL_T_ANALOG | ZCL_T_DISCRETE) |
Type is reportable. More... | |
#define | ZCL_T_SIZE_MASK 0x0F |
0x00 to 0x08 represent 0 to 8 bytes; 0x0C is 16 bytes; 0x0D is two-octet size prefix, 0x0E is one-octet size prefix; 0x0F is invalid; 0x09, 0x0A and 0x0B are still available to encode special size information. More... | |
#define | ZCL_T_SIZE_INVALID (ZCL_T_INVALID & ZCL_T_SIZE_MASK) |
Macro used when type is invalid or doesn't have a known size. | |
#define | ZCL_T_SIZE_SHORT 0x0E |
First octet of attribute's value is its size. | |
#define | ZCL_T_SIZE_LONG 0x0D |
First two octets of attribute's value are its size. | |
#define | ZCL_T_SIZE_128BIT 0x0C |
128-bit (16-byte) value | |
#define | ZCL_T_SIZE_VARIABLE 0x0B |
variable-length value (array, set, bag, struct) | |
Macros and structures related to the ZCL datatypes.
All multi-byte types are little-endian.