send functions: - core: wl_send(char *data, uint8_t length, uint8_t group, uint8 scope, uint8 dest, uint8 mode) - scope = global or current PAN? - dest = robot ID - mode = TCP or UDP? - wrappers: wl_send_global(char *data, uint8_t length, uint8_t group) wl_send_pan(char *data, uint8_t length, uint8_t group) wl_send_robot/p2p(char *data, uint8_t length, uint8_t group, uint8 dest, uint8 mode) - default: wl_send_basic(char *data) ACK (private, for the most part...): - error int8_t wl_ack_error() - return error on lost packet (only last packet sent) - maybe the # of lost packets, reset on call to this function receive functions: - receive functions int8_t wl_dispatch( void ) - get new packets and call handler functions for received groups - does not handle default group - returns error codes int8_t wl_get( char *data, uint8_t length) - data is an already-initialized packet - length is the length of data - handles basic and dispatch/group - on return - data will point to BASIC packet data - returns the length of packet data or error - default receive function: int8_t wl_get_basic( char *data, uint8_t length ) - data is an already-initialized packet - length is the length of data - on return - data will point to packet data - returns the length of packet data or error - other per-group handlers: registered by user init functions: - regular init wl_init( void ) - initialize xbee - set default channel, PAN register functions: - user registers packet group and handler function int8_t wl_register_handler(uint8_t group, void (*func)(void), uint8_t priority) - group = group number - func = function pointer to handler - priority = 0 for normal (put on buffer), anything else (e.g. 1) for high