spin.cpp

00001 /*
00002   spin コマンド
00003   Satofumi KAMIMURA
00004   $Id$
00005 */
00006 
00007 #if !MONITOR
00008 #include <runCtrl.h>
00009 #else
00010 #include <mRunCtrl.h>
00011 #endif
00012 #include <pathUtils.h>
00013 #include <stdio.h>
00014 #include <stdlib.h>
00015 
00016 using namespace VXV;
00017 
00018 
00019 int main(int argc, char *argv[]) {
00020   try {
00021 #if !MONITOR
00022     RunCtrl run;
00023 #else
00024     mRunCtrl run;
00025     vmonitor::show();
00026 #endif
00027     if (run.connect(argc, argv) < 0) {
00028       printf("RunCtrl::connect: %s\n", run.what());
00029       exit(1);
00030     }
00031 
00032     run.spin(deg(90));
00033     VXV::Delay(5000);
00034     
00035     run.spin(deg(-90));
00036     VXV::Delay(5000);
00037     
00038     run.stop();
00039     VXV::Delay(1000);
00040 
00041   } catch (std::exception& e) {
00042     printf("exception: %s\n", e.what());
00043   }
00044   return 0;
00045 }
00046 

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