mURGCtrl.h

Go to the documentation of this file.
00001 #ifndef M_URG_CTRL_H
00002 #define M_URG_CTRL_H
00003 
00013 #include "vmonitor.h"
00014 #include "urgCtrl.h"
00015 #include "urgSimulator.h"
00016 
00017 
00021 class mURGCtrl : public URGCtrl {
00022   SDL_cond* cond;
00023   SDL_mutex* mutex;
00024   vmonitor* mon;
00025   int MonitorMode;
00026   int pre_captureTimes;
00027   int pre_ret_value;
00028   bool playback_isconnected;
00029   bool no_record;
00030   static bool isVersionPrinted;
00031   static bool isHelpPrinted;
00032 
00033   static URG_Simulator* simulator;
00034   static int sim_add_count;
00035   long pre_length[SenseSteps];
00036 
00037   void printVersion(void);
00038   void printHelp(void);
00039   void parseArgs(int argc, char* argv[]);
00040   void readLogData(int *ret_value, unsigned long* raw_timestamp);
00041   void writeLogData(int ret_value, unsigned long ticks,
00042                     unsigned long raw_timestamp);
00043   void writeVersionInfo(int ret_value, char lines[][LineLength],
00044                         unsigned long ticks);
00045   void readVersionInfo(int* ret_value, char lines[][LineLength]);
00046 
00047   int raw_capture(long length[], int first_index, int last_index, int group,
00048                   unsigned long* raw_timestamp = NULL);
00049 
00050   unsigned long getHostTicks(void);
00051   void beginTimeAdjust(void);
00052   unsigned long getURGTimestamp(void);
00053   void endTimeAdjust(void);
00054 
00055 public:
00056   mURGCtrl(void);
00057   virtual ~mURGCtrl(void);
00058 
00066   int connect(bool autoCapture, const char* device,
00067               long baudrate = URG::DefaultBaudrate);
00068 
00074   int connect(bool autoCapture = true);
00075 
00083   int connect(int argc, char *argv[], bool autoCapture = URG::AutoCapture);
00084 
00090   int getVersionInfo(char lines[][LineLength]);
00091 
00095   bool isConnected(void);
00096 
00100   int getCaptureTimes(void);
00101 };
00102 
00103 #endif /* !M_URG_CTRL_H */
00104 

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