Revision 418
added return values to a bunch of libwireless functions. Makefile for colonetserver now compiles libwireless when necessary. added static to a bunch of libwireless vars. commented out colonet timeout
colonet_wireless.cpp | ||
---|---|---|
113 | 113 |
} |
114 | 114 |
} else { |
115 | 115 |
printf("sending to specific robot.\n"); |
116 |
wl_send_robot_to_robot_global_packet(COLONET_PACKET_GROUP_ID, (char)msg_type, (char*)(&pkt), |
|
117 |
sizeof(ColonetRobotServerPacket), dest, COLONET_RESPONSE_PACKET_FRAME_ID); |
|
116 |
if (wl_send_robot_to_robot_global_packet(COLONET_PACKET_GROUP_ID, (char)msg_type, (char*)(&pkt), |
|
117 |
sizeof(ColonetRobotServerPacket), dest, COLONET_RESPONSE_PACKET_FRAME_ID) != 0) { |
|
118 |
return -1; |
|
119 |
} |
|
118 | 120 |
} |
119 | 121 |
|
120 | 122 |
return 0; |
... | ... | |
130 | 132 |
|
131 | 133 |
wl_token_iterator_begin(); |
132 | 134 |
|
133 |
int* p = ids;
|
|
135 |
int i = 0;
|
|
134 | 136 |
while (wl_token_iterator_has_next()) { |
135 |
*p = wl_token_iterator_next();
|
|
136 |
p++;
|
|
137 |
ids[i] = wl_token_iterator_next();
|
|
138 |
i++;
|
|
137 | 139 |
} |
138 | 140 |
|
139 | 141 |
*numrobots = num_robots; |
... | ... | |
164 | 166 |
/**************************** Private functions ******************************/ |
165 | 167 |
|
166 | 168 |
static void timeout_handler() { |
167 |
printf("colonet wireless - timeout!\n"); |
|
169 |
// printf("colonet wireless - timeout!\n");
|
|
168 | 170 |
} |
169 | 171 |
|
170 | 172 |
static void handle_response(int frame, int received) { |
Also available in: Unified diff