Digi XBee(R) ANSI C Host Library
|
Simple XBee API. More...
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "xbee/platform.h"
#include "xbee/atcmd.h"
#include "xbee/byteorder.h"
#include "xbee/device.h"
#include "xbee/discovery.h"
#include "xbee/io.h"
#include "xbee/sxa.h"
Macros | |
#define | _xbee_sxa_debug |
#define | _sys_calloc(s) calloc( s, 1) |
#define | _sys_malloc(s) malloc( s) |
#define | _sys_free(p) free( p) |
#define | SXA_OFFSET(base, ofs) (void FAR *)((char FAR *)(base) + (ofs)) |
#define | _SXA_CG_INIT(id, field, get, fn) { id, offsetof(sxa_node_t, field), get, fn } |
#define | _SXA_CG_INIT_END { 0, 0, NULL, NULL } |
#define | sxa_list_head() sxa_table |
#define | sxa_list_count() sxa_table_count |
Functions | |
xbee_dev_t *() | sxa_xbee (sxa_node_t FAR *sxa) |
wpan_address_t FAR *() | sxa_wpan_address (sxa_node_t FAR *sxa) |
const sxa_cached_group_t FAR * | _sxa_cache_group_by_id (uint16_t id) |
void | _sxa_process_version_info (const xbee_cmd_response_t FAR *response, const struct xbee_atcmd_reg_t FAR *reg, void FAR *base) |
void | _sxa_update_io_config_group (sxa_node_t FAR *sxa, const sxa_cached_group_t FAR *cgroup) |
int | _sxa_disc_process_node_data (xbee_dev_t *xbee, const void FAR *raw, int length) |
Function shared by multiple functions that process Node Identification Messages (0x95 frames and ATND responses). More... | |
int | _sxa_disc_atnd_response (xbee_dev_t *xbee, const void FAR *raw, uint16_t length, void FAR *context) |
Frame handler for processing AT Command Response frames. More... | |
int | _sxa_disc_handle_frame_0x95 (xbee_dev_t *xbee, const void FAR *raw, uint16_t length, void FAR *context) |
Frame handler for processing Node Identification Indicator (0x95) frames. More... | |
sxa_node_t FAR * | sxa_node_by_addr (const addr64 FAR *ieee_be) |
sxa_node_t FAR * | sxa_local_node (const xbee_dev_t *xbee) |
sxa_node_t FAR * | sxa_node_by_name (const char FAR *name) |
sxa_node_t FAR * | sxa_node_by_index (int index) |
sxa_node_t FAR * | sxa_node_add (xbee_dev_t *xbee, const xbee_node_id_t FAR *node_id) |
void | sxa_node_table_dump (void) |
int | _sxa_disc_cluster_handler (const wpan_envelope_t FAR *envelope, void FAR *context) |
Cluster handler for "Digi Node Identification" cluster. More... | |
int | _sxa_io_process_response (const addr64 FAR *ieee_be, const void FAR *raw, int length) |
Function shared by multiple functions that process I/O sample messages (0x92 frames and ATIS responses). More... | |
int | _sxa_io_response_handler (xbee_dev_t *xbee, const void FAR *raw, uint16_t length, void FAR *context) |
int | _sxa_io_cluster_handler (const wpan_envelope_t FAR *envelope, void FAR *context) |
int | _sxa_remote_is_cmd_response_handler (xbee_dev_t *xbee, const void FAR *raw, uint16_t length, void FAR *context) |
int | _sxa_local_is_cmd_response_handler (xbee_dev_t *xbee, const void FAR *raw, uint16_t length, void FAR *context) |
int | sxa_get_digital_input (const sxa_node_t FAR *sxa, uint_fast8_t index) |
int | sxa_get_digital_output (const sxa_node_t FAR *sxa, uint_fast8_t index) |
int16_t | sxa_get_analog_input (const sxa_node_t FAR *sxa, uint_fast8_t index) |
int | sxa_set_digital_output (sxa_node_t FAR *sxa, uint_fast8_t index, enum xbee_io_digital_output_state state) |
int | sxa_io_configure (sxa_node_t FAR *sxa, uint_fast8_t index, enum xbee_io_type type) |
int | sxa_io_set_options (sxa_node_t FAR *sxa, uint16_t sample_rate, uint16_t change_mask) |
int | sxa_io_query (sxa_node_t FAR *sxa) |
int | sxa_io_query_status (sxa_node_t FAR *sxa) |
void | sxa_io_dump (sxa_node_t FAR *sxa) |
sxa_node_t FAR * | sxa_init_or_exit (xbee_dev_t *xbee, const wpan_endpoint_table_entry_t *ep_table, int verbose) |
void | _sxa_cmd_list_cache_cb (const xbee_cmd_response_t FAR *response, const struct xbee_atcmd_reg_t FAR *reg, void FAR *base) |
void | _sxa_launch_update (sxa_node_t FAR *sxa, const struct _xbee_reg_descr_t FAR *xrd, uint16_t cache_group) |
void | sxa_tick (void) |
sxa_cache_flags_t | sxa_cache_status (sxa_node_t FAR *sxa, const _xbee_reg_descr_t FAR *zb, uint16_t cache_group) |
void | _sxa_set_cache_status (sxa_node_t FAR *sxa, const _xbee_reg_descr_t FAR *zb, uint16_t cache_group, sxa_cache_flags_t flags) |
void FAR * | sxa_cached_value_ptr (sxa_node_t FAR *sxa, const _xbee_reg_descr_t FAR *zb) |
uint16_t | sxa_cached_value_len (sxa_node_t FAR *sxa, const _xbee_reg_descr_t FAR *zb) |
int | sxa_find_pending_cache (sxa_node_t FAR *sxa, const _xbee_reg_descr_t FAR *zb) |
int | sxa_schedule_update_cache (sxa_node_t FAR *sxa, const _xbee_reg_descr_t FAR *zb) |
int | sxa_is_digi (const sxa_node_t FAR *sxa) |
Variables | |
sxa_node_t FAR * | sxa_table = NULL |
int | sxa_table_count = 0 |
sxa_node_t FAR * | sxa_local_table = NULL |
const FAR xbee_atcmd_reg_t | _sxa_ni_query_regs [] |
const FAR xbee_atcmd_reg_t | _sxa_devinfo_query_regs [] |
const FAR xbee_atcmd_reg_t | _sxa_dhdl_query_regs [] |
const FAR sxa_cached_group_t | _sxa_default_cache_groups [] |
const FAR xbee_atcmd_reg_t | _sxa_init_query_regs [] |
Simple XBee API.
An additional layer of wrapper functions for the XBee API. The wrappers provide simplified handling of . node discovery . XBee I/O response messages . Caching of AT command results