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

Data Structures

struct  wpan_cluster_table_entry_t
 Information on each cluster associated with an endpoint. More...
 
struct  wpan_conversation_t
 Used to track conversations (outstanding requests) on an endpoint. More...
 
struct  wpan_dev_t
 
struct  wpan_endpoint_table_entry_t
 Information on each endpoint on this device. More...
 
struct  wpan_envelope_t
 
struct  wpan_ep_state_t
 

Typedefs

typedef int(* _wpan_config_fn) (struct wpan_dev_t *dev,...)
 
typedef int(* wpan_aps_handler_fn) (const wpan_envelope_t FAR *envelope, void FAR *context)
 General handler used in the cluster table. More...
 
typedef struct wpan_cluster_table_entry_t wpan_cluster_table_entry_t
 Information on each cluster associated with an endpoint. More...
 
typedef struct wpan_conversation_t wpan_conversation_t
 Used to track conversations (outstanding requests) on an endpoint. More...
 
typedef struct wpan_dev_t wpan_dev_t
 
typedef const wpan_endpoint_table_entry_t *(* wpan_endpoint_get_next_fn) (struct wpan_dev_t *dev, const wpan_endpoint_table_entry_t *ep)
 Custom function for walking the endpoint table. More...
 
typedef int(* wpan_endpoint_send_fn) (const wpan_envelope_t FAR *envelope, uint16_t flags)
 Function called by the WPAN APS layer to send a frame out on the network. More...
 
typedef struct wpan_endpoint_table_entry_t wpan_endpoint_table_entry_t
 Information on each endpoint on this device. More...
 
typedef XBEE_BEGIN_DECLS struct wpan_envelope_t wpan_envelope_t
 
typedef int(* wpan_ep_handler_fn) (const wpan_envelope_t FAR *envelope, struct wpan_ep_state_t FAR *ep_state)
 General handler used in the endpoint table. More...
 
typedef struct wpan_ep_state_t wpan_ep_state_t
 
typedef int(* wpan_response_fn) (struct wpan_conversation_t FAR *conversation, const wpan_envelope_t FAR *envelope)
 Handler registered with wpan_conversation_register() to process responses to outstanding requests. More...
 
typedef int(* wpan_tick_fn) (struct wpan_dev_t *dev)
 Function called by the WPAN APS layer to have the underlying device read and dispatch frames. More...
 

Enumerations

enum  wpan_clust_digi {
  DIGI_CLUST_SLEEP_SYNC = 0x0009, DIGI_CLUST_SERIAL = 0x0011, DIGI_CLUST_LOOPBACK = 0x0012, DIGI_CLUST_ND_COMMAND = 0x0015,
  DIGI_CLUST_DN_COMMAND = 0x0016, DIGI_CLUST_REMOTE_COMMAND = 0x0021, DIGI_CLUST_NR_COMMAND = 0x0022, DIGI_CLUST_IODATA = 0x0092,
  DIGI_CLUST_WATCHPORT = 0x0094, DIGI_CLUST_NODEID_MESSAGE = 0x0095, DIGI_CLUST_DN_RESPONSE = 0x0096, DIGI_CLUST_REMOTE_RESPONSE = 0x00A1,
  DIGI_CLUST_NR_RESPONSE = 0x00A2, DIGI_CLUST_INDIRECT_ROUTE_ERR = 0x00B0, DIGI_CLUST_PROG_XBEE_OTA_UPD = 0x1000, DIGI_CLUST_NBRFWUPDATE = 0x71FE,
  DIGI_CLUST_REMFWUPDATE = 0x71FF, DIGI_CLUST_FWUPDATERESP = (int)0xF1FF
}
 Digi Data cluster IDs (endpoint #WPAN_ENDPOINT_DIGI_DATA) More...
 

Functions

const wpan_cluster_table_entry_twpan_cluster_match (uint16_t match, uint8_t mask, const wpan_cluster_table_entry_t *entry)
 Search a cluster table for a matching cluster ID. More...
 
void wpan_conversation_delete (wpan_conversation_t FAR *conversation)
 Delete a conversation from an endpoint's conversation table. More...
 
int wpan_conversation_register (wpan_ep_state_t FAR *state, wpan_response_fn handler, const void FAR *context, uint16_t timeout)
 Add a conversation to the table of tracked conversations. More...
 
int wpan_conversation_response (wpan_ep_state_t FAR *state, uint8_t transaction_id, const wpan_envelope_t FAR *envelope)
 Searches the endpoint's table of active conversations (outstanding requests waiting for responses) for a given transaction. More...
 
const wpan_endpoint_table_entry_twpan_endpoint_get_next (wpan_dev_t *dev, const wpan_endpoint_table_entry_t *ep)
 Function used to walk a device's endpoint table. More...
 
const wpan_endpoint_table_entry_twpan_endpoint_match (wpan_dev_t *dev, uint8_t endpoint, uint16_t profile_id)
 Walk a device's endpoint table looking for a matching endpoint ID and profile ID. More...
 
uint8_t wpan_endpoint_next_trans (const wpan_endpoint_table_entry_t *ep)
 Increment and return the endpoint's transaction ID counter. More...
 
const wpan_endpoint_table_entry_twpan_endpoint_of_cluster (wpan_dev_t *dev, uint16_t profile_id, uint16_t cluster_id, uint8_t mask)
 Walk a device's endpoint table looking for a matching profile ID and cluster ID. More...
 
const wpan_endpoint_table_entry_twpan_endpoint_of_envelope (const wpan_envelope_t *env)
 Look up the endpoint table entry for the source endpoint of an envelope. More...
 
void wpan_envelope_create (wpan_envelope_t *envelope, wpan_dev_t *dev, const addr64 FAR *ieee, uint16_t network_addr)
 Starting with a blank envelope, fill in the device, 64-bit IEEE address and 16-bit network address of the destination. The profile ID, cluster ID, source/destination endpoints and envelope options are all be set to zero. More...
 
int wpan_envelope_dispatch (wpan_envelope_t *envelope)
 Find the matching endpoint for the provided envelope and have it process the frame. More...
 
void wpan_envelope_dump (const wpan_envelope_t FAR *envelope)
 Debugging function to dump the contents of an envelope to stdout. More...
 
int wpan_envelope_reply (wpan_envelope_t FAR *reply, const wpan_envelope_t FAR *original)
 Create a reply envelope based on the envelope received from a remote node. More...
 
int wpan_envelope_send (const wpan_envelope_t FAR *envelope)
 Send a message to an endpoint using address and payload information stored in a wpan_envelope_t structure. More...
 
int wpan_tick (wpan_dev_t *dev)
 Calls the underlying hardware tick function to process received frames, and times out expired conversations. More...
 

Detailed Description

Cluster/Endpoint layer for WPAN networks (ZigBee and DigiMesh).