Data Structures | |
struct | PacketGroupHandler |
struct | PacketGroupHandler |
Functions | |
void | wl_init (void) |
Initialize the wireless library. | |
void | wl_terminate (void) |
Uninitialize the wireless library. | |
void | wl_do (void) |
Perform wireless library functionality. | |
void | wl_register_packet_group (PacketGroupHandler *h) |
Register a packet group with the wireless library. | |
void | wl_unregister_packet_group (PacketGroupHandler *h) |
Unregister a packet group with the wireless library. | |
void | wl_send_robot_to_robot_global_packet (char group, char type, char *data, int len, int dest, char frame) |
Send a packet to a specific robot in any PAN. | |
void | wl_send_robot_to_robot_packet (char group, char type, char *data, int len, int dest, char frame) |
Send a packet to a specific robot in our PAN. | |
void | wl_send_global_packet (char group, char type, char *data, int len, char frame) |
Send a packet to all robots. | |
void | wl_send_pan_packet (char group, char type, char *data, int len, char frame) |
Send a packet to all robots in our PAN. | |
void | wl_set_pan (int pan) |
Set the PAN we are using. | |
int | wl_get_pan (void) |
Get the PAN we are using. | |
void | wl_set_channel (int channel) |
Set the channel we are using. | |
int | wl_get_channel (void) |
Get the channel we are using. | |
unsigned int | wl_get_xbee_id (void) |
Get the 16-bit address of the XBee module. |
Contains functions and definitions for dealing with wireless functionality.
The wireless library provides a modular method for dealing with wireless packets, by allowing packet groups to be registered. A packet group is a collection of packets which share a packet group code. Each packet in the group also has a type. A packet group code and type are sent with each packet. When a packet with a group code registered in the wireless library is received, the corresponding event handler is called. The event handler uses the packet type and other information stored in the packet to respond.
This architecture allows different wireless functionality to be defined and handled separately, making it simpler and more efficient to take advantage of the XBee's wireless functionality.
|
Perform wireless library functionality. Performs wireless library functionality. This function must be called frequently for wireless to perform effectively. This function will call timeout handlers, as well as received packet and transmit status handlers. |
|
Get the channel we are using. Get the channel the XBee is part of.
|
|
Get the PAN we are using. Get the PAN the XBee is currently part of.
|
|
Get the 16-bit address of the XBee module. Returns the 16-bit address of the XBee module.
|
|
Initialize the wireless library. Initializes the wireless library. Must be called before any other function. |
|
Register a packet group with the wireless library. Register a packet group with the wireless library. The event handlers in the packet group will be called whenever an event dealing with the packet group's group code occurs.
|
|
Send a packet to all robots. Send a packet to all XBees in all PANs.
|
|
Send a packet to all robots in our PAN. Send a packet to all XBee's in the same PAN.
|
|
Send a packet to a specific robot in any PAN. Send a packet to a specific XBee without specifying a PAN.
|
|
Send a packet to a specific robot in our PAN. Send a packet to a specific XBee in the same PAN.
|
|
Set the channel we are using. Set the channel the XBee is listening to.
|
|
Set the PAN we are using. Set the PAN for the XBee to join.
|
|
Uninitialize the wireless library. Uninitializes the wireless library. |
|
Unregister a packet group with the wireless library. Unregister a packet group from the wireless library.
|