forked from psi46/psi46test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prober.h
43 lines (36 loc) · 790 Bytes
/
prober.h
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
/* -------------------------------------------------------------
*
* file: command.h
*
* description: connection to the Suess prober via RS232
*
* author: Beat Meier
* modified: 13.6.2016
*
* rev:
*
* -------------------------------------------------------------
*/
#ifndef PROBER_H
#define PROBER_H
class CProber
{
int rs232;
char readback[256];
int result;
const char *message;
bool IsOpen() { return rs232 >= 0; }
void Clear();
void Read(int ms = 6000);
public:
CProber();
bool Open (int portNr);
void Close ();
~CProber() { Close(); }
int SendCmd(const char *fmt, ...);
int GetRsp() { return result; }
const char* GetRspString() { return readback; }
const char* GetParamString() { return message; }
void PrintErrorMsg();
};
#endif