RoboteqDevice.h
Go to the documentation of this file.
00001 #ifndef __RoboteqDevice_H_
00002 #define __RoboteqDevice_H_
00003 
00004 using namespace std;
00005 
00006 string ReplaceString(string source, string find, string replacement);
00007 void sleepms(int milliseconds);
00008 
00009 class RoboteqDevice
00010 {
00011 private:
00012         int device_fd;
00013         int fd0;
00014         int handle;
00015 
00016 protected:
00017         void InitPort();
00018 
00019         int Write(string str);
00020         int ReadAll(string &str);
00021 
00022         int IssueCommand(string commandType, string command, string args, int waitms, string &response, bool isplusminus = false);
00023         int IssueCommand(string commandType, string command, int waitms, string &response, bool isplusminus = false);
00024 
00025 public:
00026         bool IsConnected();
00027         int Connect(string port);
00028         void Disconnect();
00029 
00030         int SetConfig(int configItem, int index, int value);
00031         int SetConfig(int configItem, int value);
00032 
00033         int SetCommand(int commandItem, int index, int value);
00034         int SetCommand(int commandItem, int value);
00035         int SetCommand(int commandItem);
00036 
00037         int GetConfig(int configItem, int index, int &result);
00038         int GetConfig(int configItem, int &result);
00039 
00040         int GetValue(int operatingItem, int index, int &result);
00041         int GetValue(int operatingItem, int &result);
00042 
00043         RoboteqDevice();
00044         ~RoboteqDevice();
00045 };
00046 
00047 #endif


komodo_rover
Author(s): RoboTiCan
autogenerated on Tue Jan 7 2014 11:20:12