Functions | |
int8_t | wl_init (void) |
Initialize wireless. | |
int8_t | wl_terminate (void) |
Terminate wireless. | |
int8_t | wl_send (char *data, uint8_t length, uint8_t group, uint8_t scope, uint8_t dest, uint8_t mode) |
The core send function. This will take all possible arguments and send all types of packets. | |
int8_t | wl_send_global (char *data, uint8_t length, uint8_t group) |
Wrapper for core send function that will send a global packet across the current channel. | |
int8_t | wl_send_pan (char *data, uint8_t length, uint8_t group) |
Wrapper for core send function that will send a packet across the current channel on the current pan. | |
int8_t | wl_send_robot (char *data, uint8_t length, uint8_t group, uint8_t dest, uint8_t mode) |
Wrapper for core send function that will send a packet across the current channel to a specific robot. | |
int8_t | wl_send_basic (char *data, uint8_t length) |
Default (i.e. basic) send wrapper. | |
int8_t | wl_ack_error (void) |
Returns the number of acknowledgment errors. | |
int8_t | wl_ack_check (uint8_t packet) |
Checks a specific packet for the acknowledgement status. | |
void | wl_ack_reset (void) |
Resets acknowledgement statistics back to zero. | |
int8_t | wl_get (char *data, uint8_t length) |
The main receive function. Dispatches packets for registered handlers and returns next basic packet if available. | |
int8_t | wl_get_basic (char *data, uint8_t length) |
Returns the next basic packet if available. | |
int8_t | wl_dispatch (void) |
Dispatches packets for registered handlers. | |
int8_t | wl_register_handler (uint8_t group, void(*func)(void), uint8_t priority) |
Function to register new packet handlers (for non-default groups only). |
int8_t wl_ack_check | ( | uint8_t | packet | ) |
acknowledgement error check check if a specific packet has been lost note: buffer will overflow ever 255 packets
packet | number |
int8_t wl_ack_error | ( | void | ) |
acknowledgment error check if any of the packets you have sent have been lost.
note that all other error checking will be handled by library, so your user behavior won't have to worry about it
void wl_ack_reset | ( | void | ) |
acknowledgement reset reset the acknowledgement buffer
int8_t wl_get | ( | char * | data, | |
uint8_t | length | |||
) |
the main receive function (similar to wl_do)
when called, this function will receive the next packet on the default packet group it will also dispatch registered packet handler functions for any other packet groups it has received
data | an already-initialized array to store the default group packet data in | |
length | the length of the initialized data array |
int8_t wl_get_basic | ( | char * | data, | |
uint8_t | length | |||
) |
function to receive only packets on the default group this function is only meant to receive packets sent using wl_send_basic()
data | an already-initialized array to store the default group packet data in | |
length | the length of the initialized data array |
int8_t wl_init | ( | void | ) |
initialization function: set up xbee communication and packet handler infrastructure
int8_t wl_register_handler | ( | uint8_t | group, | |
void(*)(void) | func, | |||
uint8_t | priority | |||
) |
function to register new packet handlers (for non-default groups only)
group | the packet group number of the packets to handle with this function | |
func | the function pointer to the user-specified packet handler | |
priority | flag to set the priority of the function handler |
int8_t wl_send_basic | ( | char * | data, | |
uint8_t | length | |||
) |
Default (i.e. basic) send wrapper.
data | pointer to the byte array of data to be included in the packet | |
length | the length of the data array |
int8_t wl_send_global | ( | char * | data, | |
uint8_t | length, | |||
uint8_t | group | |||
) |
Wrapper for core send function that will send a global packet across the current channel.
data | pointer to the byte array of data to be included in the packet | |
length | the length of the data array | |
group | the packet group of the packet |
int8_t wl_send_pan | ( | char * | data, | |
uint8_t | length, | |||
uint8_t | group | |||
) |
Wrapper for core send function that will send a packet across the current channel on the current pan.
data | pointer to the byte array of data to be included in the packet | |
length | the length of the data array | |
group | the packet group of the packet |
int8_t wl_terminate | ( | void | ) |
termination function: end xbee communication, deregister all handlers, etc