Contains definitions for using the XBee. More...
Go to the source code of this file.
Defines | |
#define | XBEE_PORT_DEFAULT "/dev/ttyUSB1" |
#define | XBEE_PAN_DEFAULT 0xFFFF |
Unset PAN, uses XBee default. | |
#define | XBEE_CHANNEL_DEFAULT 0 |
Unset channel, uses XBee default. | |
#define | XBEE_BROADCAST 0xFFFF |
Broadcast to all robots in the PAN. | |
#define | XBEE_OPTIONS_NONE 0x00 |
No special options. | |
#define | XBEE_OPTIONS_DISABLE_RESPONSE 0x01 |
Do not receive a TX_STATUS message from this packet. | |
#define | XBEE_OPTIONS_BROADCAST_ALL_PANS 0x04 |
Send the packet to all PANS. | |
#define | XBEE_TX_STATUS 0x89 |
A transmit status packet. | |
#define | XBEE_RX 0x81 |
A packet received from another XBee. | |
Functions | |
int | xbee_lib_init (void) |
Initialize the XBee library. | |
void | xbee_terminate (void) |
Uninitialize the XBee library. | |
int | xbee_get_packet (unsigned char *packet) |
Get a packet from the XBee. | |
int | xbee_send_packet (char *packet, int len, int dest, char options, char frame) |
Send a packet to the XBee. | |
int | xbee_set_pan_id (int id) |
Set the PAN ID for the XBee. | |
unsigned int | xbee_get_pan_id (void) |
Get the XBee's PAN ID. | |
int | xbee_set_channel (int channel) |
Set the channel the XBee is currently using. | |
int | xbee_get_channel (void) |
Get the channel the XBee is currently using. | |
unsigned int | xbee_get_address (void) |
Get the XBee's 16-bit address. | |
void | xbee_set_com_port (char *port) |
Set the com port on a computer, undefined on the robot. |
Contains definitions for using the XBee.
Copyright (c) 2007 Colony Project
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Contains definitions for interfacing with the XBee module, from either a robot or a computer. To use a robot, define ROBOT in wl_defs.h, and to use a computer, don't define ROBOT.
#define XBEE_PORT_DEFAULT "/dev/ttyUSB1" |
The port to use the XBee from on the computer. Also, a backup port if the other is used.