robotServer.cpp

00001 /*
00002   遠隔操作用のサーバプログラム
00003   Satofumi KAMIMURA
00004   $Id$
00005 */
00006 
00007 #include "robotServer.h"
00008 #include "connectionHub.h"
00009 #include "runCtrlHub.h"
00010 #include "timeUtils.h"
00011 
00012 
00013 int main(int argc, char *argv[]) {
00014   try {
00015     RunCtrlHub run_port(RunVirtualPort, "/dev/ttyUSB0", 115200);
00016     ConnectionHub urg_port(URGVirtualPort, "/dev/ttyACM0", 115200);
00017 
00018     printf("begin....\n");
00019     while (true) {
00020       if (!run_port.update() || !urg_port.update()) {
00021         break;
00022       }
00023       VXV::Delay(1);
00024     }
00025     printf("disconnected\n");
00026     
00027   } catch (std::exception& e) {
00028     printf("exception: %s\n", e.what());
00029   }
00030   return 0;
00031 }
00032 

Generated on Mon Apr 13 22:52:02 2009 by  doxygen 1.5.7.1