-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMilKInterface.h
66 lines (49 loc) · 1.48 KB
/
MilKInterface.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
* File: MilKInterface.h
* Author: hardion
*
* Created on May 24, 2012, 10:48 AM
*/
#ifndef MILKINTERFACE_H
#define MILKINTERFACE_H
#include <string>
namespace milk {
enum State {
INIT, LOCALE, OFF, STANDBY, ON, RUNNING, ERROR
};
class MilKInterface {
public:
/*virtual MilKInterface(std::string ip, int port);*/
/*virtual MilKInterface(const MilKInterface& orig)=0;*/
//virtual ~MilKInterface() = 0;
/** Attributes **/
virtual int get_current() = 0;
virtual int get_current_set() = 0;
virtual int get_current_accuracy() = 0;
virtual int get_field() = 0;
virtual int get_field_set() = 0;
virtual int get_field_accuracy() = 0;
virtual int set_current(int new_value) = 0;
virtual int set_field(int new_value) = 0;
/* Configuration */
virtual std::string get_ip() = 0;
virtual unsigned short get_port() = 0;
// State of the device composed by the information from
// STATUS_RTIME
virtual State get_state() = 0;
// Status of the device (from READ_STATUS1)
// A complete description of the current status of the device
virtual std::string get_status() = 0;
/** Commands **/
virtual void on() = 0;
virtual void standby() = 0;
virtual void off() = 0;
virtual void locale() = 0;
virtual void remote() = 0;
// Stop any process
// This command doesn't change the mode of regulation
virtual void stop() = 0;
private:
};
}
#endif /* MILKINTERFACE_H */