-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdp832.h
45 lines (32 loc) · 1.01 KB
/
dp832.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
#include <iostream>
#include <fstream>
using namespace std;
class dp830 {
public:
explicit dp830(const char *devname);
~dp830();
int On(int channel);
int AllOn();
int Off(int channel);
int AllOff();
int GetState(int channel);
void Reset() { write_("*RST"); };
int SetCurrent(int channel, double limit);
int SetOCP(int channel, double limit);
int SetVoltage(int channel, double limit);
double GetOCP(int channel);
double GetCurrentSetPoint(int channel);
double GetVoltageSetPoint(int channel);
int GetOCPTripped(int channel);
int Bounce(int channel, double delay);
double MeasureVoltage(int channel);
double MeasureCurrent(int channel);
double MeasurePower(int channel);
private:
int write_(const char *command);
int read_(char *buf, int len);
int SetLimit_(int channel, const char *tag, double limit);
double Measure_(int channel, const char *tag);
double GetSetPoint_(int channel, const char *tag);
fstream fhandle_;
};