robotServer.cpp
00001
00002
00003
00004
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