Digi XBee(R) ANSI C Host Library
Modules
Wireless Personal Area Networking (WPAN)

Modules

 Cluster/Endpoint layer
 
 Datatypes and support functions
 

Detailed Description

WPAN Overview

Endpoint Table
The endpoint table is a complex data structure that describes all endpoints, clusters, ZCL attributes and manufacturer-specific command handlers for a given device. The structure of the table is as follows (note that not all members of each object are listed):
  • Each DEVICE (wpan_dev_t) corresponds to a local, serially-connected XBee module. This DEVICE has multiple ENDPOINTs.
  • Each ENDPOINT (wpan_endpoint_table_entry_t) has
    • An ENDPOINT ID (0 to 254), PROFILE ID, DEVICE ID and DEVICE VERSION.
    • Multiple CLUSTERs. The ZDP endpoint handler currently uses a switch to handle frames for each cluster, but could be updated to let the endpoint dispatcher hand frames off to each cluster's handler.
    • A HANDLER to process frames for CLUSTERs without their own HANDLER, or CLUSTERs that aren't in the table.
    • A pointer to an ENDPOINT STATE (wpan_ep_state_t) structure.
  • Each CLUSTER (wpan_cluster_table_entry_t) has
    • FLAGs indicating whether it is an input or output cluster (or both), and whether packets sent to/from the cluster require APS-layer encryption.
    • A HANDLER to process frames for that cluster.
    • A CONTEXT pointer that is passed to the HANDLER. For a ZCL endpoint, the CONTEXT points to an ATTRIBUTE TREE.
  • On ZCL endpoints, each entry in the ATTRIBUTE TREE (zcl_attribute_tree_t) has
    • A manufacturer ID with ZCL_MFG_NONE (0) representing the general attributes for the cluster.
    • Pointers to a list of SERVER and CLIENT cluster ATTRIBUTEs.
  • Each ATTRIBUTE is either a BASE ATTRIBUTE (zcl_attribute_base_t) with
    • A 16-bit ID.
    • FLAGS indicating whether the attribute is read-only, is a full attribute (see below), has a minimum or maximum limit and is reportable.
    • A ZCL TYPE.
    • A pointer to the ATTRIBUTE's VALUE.
  • ... or a FULL ATTRIBUTE (zcl_attribute_full_t) which has
    • A BASE ATTRIBUTE structure (so both BASE and FULL attributes start with the same structure elements).
    • Optional MINIMUM and MAXIMUM (zcl_attribute_minmax_t) values.
    • A READ function (zcl_attribute_update_fn) to refresh the ATTRIBUTE's VALUE.
    • A WRITE function (zcl_attribute_write_fn) to process a ZCL Write Attributes request if the attribute requires additional processing over what the standard function, zcl_decode_attribute, does.
Endpoint Dispatching
The endpoint dispatcher searches the endpoint table to find a handler for a given frame, based on its destination endpoint and cluster ID.