|
XBee Firmware Library
1.6.0
|
Files | |
| file | zcl_types.c |
| file | zcl_types.h |
Data Structures | |
| union | zcl40_t |
| 40-bit unsigned in host-byte-order More... | |
| union | zcl48_t |
| 48-bit unsigned in host-byte-order More... | |
Typedefs | |
| typedef union zcl40_t | zcl40_t |
| 40-bit unsigned in host-byte-order More... | |
| typedef union zcl48_t | zcl48_t |
| 48-bit unsigned in host-byte-order More... | |
| typedef PACKED_STRUCT | zcl_date_t |
| Date (for #ZCL_TYPE_TIME_DATE Data Type) More... | |
| typedef PACKED_STRUCT | zcl_timeofday_t |
| Time of Day (for #ZCL_TYPE_TIME_TOD Data Type) More... | |
| 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 | |
| uint8_t | day |
| 1-31 or 0xff for unused More... | |
| uint8_t | dayofweek |
| 1-7 (1 = Monday, 7 = Sunday) or 0xff for unused More... | |
| uint16_t | high16 |
| uint8_t | high8 |
| uint8_t | hundredths |
| 0-99 or 0xff for unused More... | |
| uint32_t | low32 |
| uint32_t | low32 |
| uint8_t | minutes |
| 0-59 or 0xff for unused More... | |
| mixed | |
| mixed | |
| uint8_t | month |
| 1-12 or 0xff for unused More... | |
| PACKED_STRUCT | |
| PACKED_STRUCT | |
| uint8_t | seconds |
| 0-59 or 0xff for unused More... | |
| uint16_t | u16 [3] |
| uint8_t | u8 [5] |
| uint8_t | u8 [6] |
| const uint8_t | zcl_type_info [256] |
| Table to store information on each ZCL datatype. More... | |
| const uint8_t | zcl_type_info [256] |
| Table to store information on each ZCL datatype. More... | |
| typedef uint32_t zcl_utctime_t |
| zcl_types_debug int zcl_sizeof_type | ( | uint8_t | type | ) |
Return the number of octets used by a given ZCL datatype.
| [in] | type | Type to look up. Typically one of the ZCL_TYPE_* macros, or the type element of an attribute record. |
| ZCL_SIZE_INVALID | unknown or invalid type |
| ZCL_SIZE_SHORT | 1-octet size prefix |
| ZCL_SIZE_LONG | 2-octet size prefix |
| ZCL_SIZE_VARIABLE | variable-length type (array, struct, set, bag) |
| >=0 | number of octets used by type (0 to 8, 16) |
| zcl_types_debug const char * zcl_type_name | ( | uint8_t | type | ) |
Return a descriptive string for a given ZCL attribute type.
| [in] | type | ZCL attribute type |
| uint8_t day |
1-31 or 0xff for unused
| uint8_t dayofweek |
1-7 (1 = Monday, 7 = Sunday) or 0xff for unused
| uint16_t high16 |
| uint8_t high8 |
| uint8_t hundredths |
0-99 or 0xff for unused
| uint32_t low32 |
| uint32_t low32 |
| uint8_t minutes |
0-59 or 0xff for unused
| mixed |
| mixed |
| uint8_t month |
1-12 or 0xff for unused
| PACKED_STRUCT |
| PACKED_STRUCT |
| uint8_t seconds |
0-59 or 0xff for unused
| uint16_t u16[3] |
| uint8_t u8[5] |
| uint8_t u8[6] |
| const uint8_t zcl_type_info[256] |
Table to store information on each ZCL datatype.
Lower 4 bits encode size (0 to 8 octets, 16 octets, one-byte size prefix, two-byte size prefix), upper 4 bits encode additional information.
Need to represent 0 to 8 octets, 16 octets, size in first octet, size in first two octets. 12 possible values.
Using this table, it may be possible to simplify the encode/decode functions greatly – just use memcpy or swapcpy to copy the given number of bytes.
Special case for floating point values if the platform doesn't use IEEE floats, and to convert from 2-byte semi-precision float to 4-byte float.
| const uint8_t zcl_type_info[256] |
Table to store information on each ZCL datatype.
Lower 4 bits encode size (0 to 8 octets, 16 octets, one-byte size prefix, two-byte size prefix), upper 4 bits encode additional information.
Need to represent 0 to 8 octets, 16 octets, size in first octet, size in first two octets. 12 possible values.
Using this table, it may be possible to simplify the encode/decode functions greatly – just use memcpy or swapcpy to copy the given number of bytes.
Special case for floating point values if the platform doesn't use IEEE floats, and to convert from 2-byte semi-precision float to 4-byte float.
1.8.10