Revision 424
changed various things in colonet dragonfly and server to make stuff work
colonet_defs.h | ||
---|---|---|
12 | 12 |
#define COLONET_PACKET_GROUP_ID 8 |
13 | 13 |
#define COLONET_RESPONSE_PACKET_FRAME_ID COLONET_PACKET_GROUP_ID |
14 | 14 |
|
15 |
// Message types |
|
16 |
typedef enum {COLONET_COMMAND = 13, COLONET_REQUEST = 14, |
|
17 |
COLONET_RESPONSE = 15} ColonetMessageType; |
|
15 |
//Colonet Client commands |
|
16 |
//TODO: renamed these to end in LENGTH |
|
17 |
#define MAX_COMMAND_LEN 128 |
|
18 |
#define MAX_RESPONSE_LEN 1024 |
|
18 | 19 |
|
20 |
typedef enum {SEND_TO_ROBOT = 0, REQUEST_FROM_SERVER = 1, RESPONSE_TO_CLIENT_REQUEST = 2} ColonetClientMessageType; |
|
21 |
typedef enum {COLONET_COMMAND = 13, COLONET_REQUEST = 14, COLONET_RESPONSE = 15} ColonetRobotMessageType; |
|
22 |
|
|
19 | 23 |
//Packet properties |
20 |
#define PACKET_DATA_LEN 7
|
|
24 |
#define PACKET_DATA_LEN 16
|
|
21 | 25 |
|
22 | 26 |
#define WL_DEFAULT_PAN 3332 |
23 | 27 |
|
... | ... | |
26 | 30 |
|
27 | 31 |
// Message dests |
28 | 32 |
#define GLOBAL_DEST 200 |
29 |
//#define MAX_NUM_ROBOTS 7 |
|
30 | 33 |
#define COLONET_SERVER_RESPONSE_ADDR 201 |
31 | 34 |
|
32 | 35 |
#define USER_DEFINED_MSG_ID_START 0xF0 |
... | ... | |
37 | 40 |
* wireless library to the robots and from the robots to the colonet wireless |
38 | 41 |
* library. */ |
39 | 42 |
typedef struct { |
40 |
short client_id; // ID number of the client sending the packet. |
|
41 |
// Size of short is common to robots and server. |
|
43 |
short client_id; // ID number of the client sending the packet. Size of short is common to robots and server. |
|
42 | 44 |
unsigned char msg_code; // Specific instruction for the robot -- see below. |
43 | 45 |
unsigned char data[PACKET_DATA_LEN]; |
44 | 46 |
} ColonetRobotServerPacket; |
... | ... | |
157 | 159 |
//response: RESPONSE_TO_CLIENT_REQUEST REQUEST_XBEE_IDS <numRobots> <id0> <id1> ... <idNumRobots> |
158 | 160 |
|
159 | 161 |
|
160 |
|
|
161 |
//Colonet Client commands |
|
162 |
//TODO: renamed these to end in LENGTH |
|
163 |
#define MAX_COMMAND_LEN 128 |
|
164 |
#define MAX_RESPONSE_LEN 1024 |
|
165 |
|
|
166 |
#define SEND_TO_ROBOT 0x00 |
|
167 |
#define REQUEST_FROM_SERVER 0x01 |
|
168 |
#define RESPONSE_TO_CLIENT_REQUEST 0x02 |
|
169 |
|
|
170 |
|
|
171 | 162 |
#endif |
Also available in: Unified diff