XBee Firmware Library  1.6.0
Data Structures | Typedefs | Functions | Variables

Data Structures

struct  zcl_array_t
 
struct  zcl_attribute_base_t
 
struct  zcl_attribute_full_t
 
union  zcl_attribute_minmax_t
 
struct  zcl_attribute_tree_t
 
struct  zcl_attribute_write_rec_t
 
struct  zcl_command_t
 
union  zcl_rec_report_t
 
struct  zcl_struct_element_t
 
struct  zcl_struct_t
 

Typedefs

typedef struct zcl_array_t zcl_array_t
 
typedef PACKED_STRUCT zcl_attrib_t
 
typedef struct zcl_attribute_base_t zcl_attribute_base_t
 
typedef struct zcl_attribute_full_t zcl_attribute_full_t
 
typedef union zcl_attribute_minmax_t zcl_attribute_minmax_t
 
typedef struct zcl_attribute_tree_t zcl_attribute_tree_t
 
typedef uint_fast8_t(* zcl_attribute_update_fn) (const struct zcl_attribute_full_t FAR *entry)
 Function pointer assigned to a ZCL attribute record, called to update the value of the given attribute. More...
 
typedef int(* zcl_attribute_write_fn) (const struct zcl_attribute_full_t FAR *entry, zcl_attribute_write_rec_t *rec)
 Function pointer assigned to a ZCL attribute record, called instead of zcl_decode_attribute() to process a Write Request for the attribute. More...
 
typedef struct zcl_attribute_write_rec_t zcl_attribute_write_rec_t
 
typedef struct zcl_command_t zcl_command_t
 
typedef PACKED_STRUCT zcl_default_response_t
 Used for #ZCL_CMD_DEFAULT_RESP. More...
 
typedef PACKED_STRUCT zcl_discover_attrib_resp_t
 Used for #ZCL_CMD_DISCOVER_ATTRIB_RESP. More...
 
typedef PACKED_STRUCT zcl_discover_attrib_t
 Used for #ZCL_CMD_DISCOVER_ATTRIB. More...
 
typedef PACKED_STRUCT zcl_header_common_t
 Common portion of ZCL header (appears after optional Manufacturer Code) More...
 
typedef PACKED_STRUCT zcl_header_nomfg_t
 
typedef PACKED_STRUCT zcl_header_response_t
 
typedef PACKED_STRUCT zcl_header_t
 
typedef PACKED_STRUCT zcl_header_withmfg_t
 
typedef PACKED_STRUCT zcl_read_struct_attrib_t
 
typedef PACKED_STRUCT zcl_rec_attrib_report_t
 Used for #ZCL_CMD_DISCOVER_ATTRIB_RESP. More...
 
typedef PACKED_STRUCT zcl_rec_read_attrib_array_resp_t
 
typedef PACKED_STRUCT zcl_rec_read_attrib_error_resp_t
 
typedef PACKED_STRUCT zcl_rec_read_attrib_resp_t
 Used for #ZCL_CMD_READ_ATTRIB_RESP. More...
 
typedef PACKED_STRUCT zcl_rec_read_attrib_struct_resp_t
 
typedef PACKED_STRUCT zcl_rec_read_report_cfg_t
 
typedef PACKED_STRUCT zcl_rec_report_error_resp_t
 
typedef PACKED_STRUCT zcl_rec_report_receive_resp_t
 
typedef PACKED_STRUCT zcl_rec_report_receive_t
 
typedef PACKED_STRUCT zcl_rec_report_send_resp_t
 
typedef PACKED_STRUCT zcl_rec_report_send_t
 
typedef union zcl_rec_report_t zcl_rec_reporting_config_t
 
typedef PACKED_STRUCT zcl_rec_reporting_status_t
 
typedef PACKED_STRUCT zcl_rec_write_attrib_status_t
 Used for #ZCL_CMD_WRITE_ATTRIB_RESP. More...
 
typedef PACKED_STRUCT zcl_rec_write_struct_attrib_resp_t
 
typedef PACKED_STRUCT zcl_rec_write_struct_attrib_t
 
typedef PACKED_STRUCT zcl_selector_t
 
typedef struct zcl_struct_element_t zcl_struct_element_t
 
typedef struct zcl_struct_t zcl_struct_t
 

Functions

const zcl_attribute_base_t FAR * zcl_attribute_get_next (const zcl_attribute_base_t FAR *entry)
 Return a pointer to the next attribute entry from an attribute table. More...
 
int zcl_build_header (zcl_header_response_t *rsp, zcl_command_t *cmd)
 Support function to fill in a ZCL response header. More...
 
int zcl_check_minmax (const zcl_attribute_base_t FAR *entry, const uint8_t FAR *buffer_le)
 Checks whether a new value from a Write Attributes command is within the limits specified for a given attribute. More...
 
int zcl_command_build (zcl_command_t *cmd, const wpan_envelope_t FAR *envelope, zcl_attribute_tree_t FAR *tree)
 Parse a ZCL request and store in a zcl_command_t structure with fields in fixed locations (therefore easier to use than the variable-length frame header). More...
 
void zcl_command_dump (const zcl_command_t *cmd)
 Debugging routine that dumps contents of a parsed ZCL command structure to STDOUT. More...
 
uint32_t zcl_convert_24bit (const void FAR *value_le, bool_t extend_sign)
 Convert a 24-bit (3-byte) little-endian value to a 32-bit value in host byte order. More...
 
int zcl_decode_attribute (const zcl_attribute_base_t FAR *entry, zcl_attribute_write_rec_t *rec)
 Decode attribute value from a Write Attribute Request or Read Attribute Response record and optionally write to entry. More...
 
int zcl_default_response (zcl_command_t *request, uint8_t status)
 Send a Default Response (#ZCL_CMD_DEFAULT_RESP) to a given command. More...
 
int zcl_encode_attribute_value (uint8_t FAR *buffer, int16_t bufsize, const zcl_attribute_base_t FAR *entry)
 Format a ZCL attribute's value for a Read Attributes Response or a Write Attributes Request. More...
 
void zcl_envelope_payload_dump (const wpan_envelope_t *envelope)
 Debugging routine that parses an envelope payload as a ZCL command and dumps a parsed copy to STDOUT. More...
 
const zcl_attribute_base_t FAR * zcl_find_attribute (const zcl_attribute_base_t FAR *entry, uint16_t search_id)
 Search the attribute table starting at entry, for attribute ID search_id. More...
 
int zcl_general_command (const wpan_envelope_t FAR *envelope, void FAR *context)
 Handler for ZCL General Commands. More...
 
int zcl_invalid_cluster (const wpan_envelope_t FAR *envelope, wpan_ep_state_t FAR *ep_state)
 Called if a request comes in for an invalid endpoint/cluster combination. More...
 
int zcl_invalid_command (const wpan_envelope_t FAR *envelope)
 Called if a request comes in for an invalid command on a valid endpoint/cluster combination. More...
 
int zcl_parse_attribute_record (const zcl_attribute_base_t FAR *entry, zcl_attribute_write_rec_t *write_rec)
 Parse an attribute record from a Write Attributes Request or a Read Attributes Response and possibly store the new attribute value. More...
 
int zcl_send_response (zcl_command_t *request, const void FAR *response, uint16_t length)
 Send a response to a ZCL command. More...
 
const char * zcl_status_text (uint_fast8_t status)
 Converts a ZCL status byte (one of the ZCL_STATUS_* macros) into a string. More...
 

Variables

zcl_rec_attrib_report_t attrib [1]
 
uint16_t attrib_id_le
 
uint8_t attrib_type
 
uint8_t command
 
uint16_t count_le
 number of elements to follow More...
 
uint8_t direction
 
uint8_t element_type
 
uint8_t elements [1]
 mult. uint8_t type and variable-length value More...
 
uint16_t id
 
uint16_t id_le
 
uint16_t index_le [15]
 
uint16_t max_interval_le
 
uint8_t max_return_count
 
uint16_t mfg_code_le
 
uint16_t min_interval_le
 
uint8_t payload [1]
 first byte of variable-length field More...
 
zcl_rec_report_send_t report_cfg
 
zcl_selector_t selector
 
uint8_t sequence
 
uint8_t status
 
uint16_t timeout_period_le
 
union {
   zcl_header_common_t   common
 
      mfg
 manufacturer-specific extension More...
 
      PACKED_STRUCT
 
      std
 standard More...
 
type
 see zigbee/zcl_types.h More...
 
uint8_t value [1]
 variable length, depending on type More...
 
const zcl_attribute_tree_t FAR zcl_attributes_none [1]
 

Detailed Description

Header for implementation of ZigBee Cluster Library.

Type definitions and frame formats.

Based on document 075123r01ZB, updated for 075123r02ZB

Even though the XBee modules uses big-endian byte order for its API, the payload data should be in the correct format for Rabbit (little-endian). Multi-byte variables and structure members use an "_le" suffix if the value is little-endian, a "_be" suffix if the value is big-endian, and no suffix if the value is in host byte order.

See xbee/byteorder.h for functions to convert between big/little-endian and host byte order.