root / trunk / code / projects / colonet / utilities / manual_control / manualControlRobot / wireless.h @ 13
History | View | Annotate | Download (683 Bytes)
1 | 13 | emarinel | #ifndef WIRELESS_H
|
---|---|---|---|
2 | #define WIRELESS_H
|
||
3 | |||
4 | /*
|
||
5 | Wireless - wireless functions for Colony
|
||
6 | |||
7 | Eugene Marinelli
|
||
8 | 7/22/06
|
||
9 | */
|
||
10 | |||
11 | #define WL_MSG_MAX_LEN 16 |
||
12 | #define WL_PACKET_MAX_LEN (WL_MSG_MAX_LEN+5) |
||
13 | |||
14 | #define GLOBAL_DEST 200 |
||
15 | |||
16 | typedef struct { |
||
17 | char prefix[2]; |
||
18 | char src;
|
||
19 | char dest;
|
||
20 | char msg[WL_MSG_MAX_LEN];
|
||
21 | char checksum;
|
||
22 | } WL_Packet; |
||
23 | |||
24 | int wl_init(int msg_len, char listener_address); |
||
25 | int wl_send(char* msg, char dest); |
||
26 | int wl_recv(char* msgbuf, char* src, char* dest); |
||
27 | // get most recent valid message - implement message queue later
|
||
28 | |||
29 | int wl_create_packet(char* msg, char src, char dest, WL_Packet* packet); |
||
30 | char wl_get_checksum(WL_Packet* packet);
|
||
31 | |||
32 | #endif |