-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRoboteqDevice.h
More file actions
47 lines (34 loc) · 1.11 KB
/
RoboteqDevice.h
File metadata and controls
47 lines (34 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef __RoboteqDevice_H_
#define __RoboteqDevice_H_
using namespace std;
string ReplaceString(string source, string find, string replacement);
void sleepms(int milliseconds);
class RoboteqDevice
{
private:
int device_fd;
int fd0;
int handle;
protected:
void InitPort();
int Write(string str);
int ReadAll(string &str);
int IssueCommand(string commandType, string command, string args, int waitms, string &response, bool isplusminus = false);
int IssueCommand(string commandType, string command, int waitms, string &response, bool isplusminus = false);
public:
bool IsConnected();
int Connect(string port);
void Disconnect();
int SetConfig(int configItem, int index, int value);
int SetConfig(int configItem, int value);
int SetCommand(int commandItem, int index, int value);
int SetCommand(int commandItem, int value);
int SetCommand(int commandItem);
int GetConfig(int configItem, int index, int &result);
int GetConfig(int configItem, int &result);
int GetValue(int operatingItem, int index, int &result);
int GetValue(int operatingItem, int &result);
RoboteqDevice();
~RoboteqDevice();
};
#endif