Project

General

Profile

Revision 629

Added by Jason knichel about 16 years ago

added some more documentation

View differences:

colonet_wireless.cpp
222 222

  
223 223
/**************************** Private functions ******************************/
224 224

  
225
//TODO: fill in the doxygen comments
226
/**
227
 * @brief 
228
 *
229
 * @return Void
230
 */
225 231
static void timeout_handler() {
226 232
  // printf("colonet wireless - timeout!\n");
227 233
}
228 234

  
235
//TODO: fill in the doxygen comments
236
/**
237
 * @brief 
238
 *
239
 * @param frame
240
 * @param received
241
 *
242
 * @return Void
243
 */
229 244
static void handle_response(int frame, int received) {
230 245
  //TODO: These are just here to get rid of compiler warnings
231 246
  frame = frame;
......
233 248
  printf("handle_response\n");
234 249
}
235 250

  
251
/**
252
 * @brief When a packet is received via wireless, the data is passed to this function
253
 *
254
 * @param type 
255
 * @param source The robot the packet came from
256
 * @param data The data the robot sent
257
 * @param len The length of the data
258
 *
259
 * @return Void
260
 */
236 261
static void handle_receive(char type, int source, unsigned char* data, int len) {
237 262
  type = type; //TODO: This is just here to get rid of compiler warnings.
238 263

  
......
250 275
    int robot_x, robot_y;
251 276
    PositionMonitor* pm = colonet_server.getPositionMonitor();
252 277
    int num_robots = pm->getNumVisibleRobots();
278

  
253 279
    //ask the position monitor for where that robot is.
254 280
    int ret = pm->getRobotPosition(source, &robot_x, &robot_y);
255 281
    if (ret != 0 && num_robots != 1) {
......
285 311
  }
286 312
}
287 313

  
314
//TODO: fill in the doxygen comments
315
/**
316
 * @brief 
317
 *
318
 * @return Void
319
 */
288 320
static void unregister(void) {
289 321
  printf("unregister\n");
290 322
}
......
308 340

  
309 341
  while (1) {
310 342
    wl_do();
343

  
344
    //this sleep is here so the thread this runs in doesn't hog the cpu
311 345
    usleep(1000);
312 346
  }
313 347

  
......
317 351
  return NULL;
318 352
}
319 353

  
320
/** @brief
354
/** 
355
 * @brief
321 356
 *
322 357
 * @param pkt Packet to be logged
323 358
 *

Also available in: Unified diff