Revision 668
Updated port of wireless library to bay boards.
wireless.h | ||
---|---|---|
107 | 107 |
* @param packet the packet received |
108 | 108 |
* @param length the length of the packet |
109 | 109 |
**/ |
110 |
void (*handle_receive) (char type, int source, unsigned char* packet, |
|
111 |
int length); |
|
112 |
|
|
110 |
void (*handle_receive) (char type, int source, unsigned char* packet, int length); |
|
111 |
|
|
113 | 112 |
/** |
114 | 113 |
* Called for any cleanup when the network is turned off. |
115 | 114 |
**/ |
116 | 115 |
void (*unregister) (void); |
117 |
|
|
116 |
|
|
118 | 117 |
} PacketGroupHandler; |
119 | 118 |
|
120 | 119 |
/**@brief Initialize the wireless library **/ |
... | ... | |
129 | 128 |
void wl_unregister_packet_group(PacketGroupHandler* h); |
130 | 129 |
|
131 | 130 |
/**@brief Send a packet to a specific robot in any PAN **/ |
132 |
void wl_send_robot_to_robot_global_packet(char group, char type, |
|
133 |
char* data, int len, int dest, char frame); |
|
131 |
int wl_send_robot_to_robot_global_packet(char group, char type, char* data, int len, int dest, char frame); |
|
134 | 132 |
/**@brief Send a packet to a specific robot in our PAN **/ |
135 |
void wl_send_robot_to_robot_packet(char group, char type, |
|
136 |
char* data, int len, int dest, char frame); |
|
133 |
int wl_send_robot_to_robot_packet(char group, char type, char* data, int len, int dest, char frame); |
|
137 | 134 |
/**@brief Send a packet to all robots **/ |
138 |
void wl_send_global_packet(char group, char type, |
|
139 |
char* data, int len, char frame); |
|
135 |
int wl_send_global_packet(char group, char type, char* data, int len, char frame); |
|
140 | 136 |
/**@brief Send a packet to all robots in our PAN **/ |
141 |
void wl_send_pan_packet(char group, char type, |
|
142 |
char* data, int len, char frame); |
|
137 |
void wl_send_pan_packet(char group, char type, char* data, int len, char frame); |
|
143 | 138 |
|
144 | 139 |
/**@brief Set the PAN we are using **/ |
145 |
void wl_set_pan(int pan);
|
|
140 |
int wl_set_pan(int pan);
|
|
146 | 141 |
/**@brief Get the PAN we are using **/ |
147 | 142 |
int wl_get_pan(void); |
148 | 143 |
/**@brief Set the channel we are using **/ |
149 |
void wl_set_channel(int channel);
|
|
144 |
int wl_set_channel(int channel);
|
|
150 | 145 |
/**@brief Get the channel we are using **/ |
151 | 146 |
int wl_get_channel(void); |
152 | 147 |
/**@brief Get the 16-bit address of the XBee module **/ |
Also available in: Unified diff