Instrument Control Lib
Framework to control Oscilloscopes, SMUs, Function Generators and DC Powersupplies via Ethernet.
Oscilloscope.h
Go to the documentation of this file.
1 //
2 // Created by florianfrank on 19.07.22.
3 //
4 
5 #ifndef INSTRUMENT_CONTROL_LIB_OSCILLOSCOPE_H
6 #define INSTRUMENT_CONTROL_LIB_OSCILLOSCOPE_H
7 
8 #include "Device.h"
9 
10 class Oscilloscope : public Device
11 {
12 public:
14  {
16  };
17 
19  {
20  POS_EDGE = 0,
21  NEG_EDGE = 1,
22  EITHER = 2,
23  ALTERNATING = 3
24  };
25 
27  MAIN = 0,
28  WIND = 1,
29  XY = 2,
30  ROLL = 3
31  };
32 
33  enum FILE_FORMAT {
34  ASCII = 0,
35  WORD = 1,
36  BYTE = 2,
37  };
38 
39  enum VOLTAGE_UNIT {
42  };
43 
44  Oscilloscope(const char *ip, int timeoutInMs, PIL::Logging *logger);
45 
46  virtual PIL_ERROR_CODE run() = 0;
47  virtual PIL_ERROR_CODE stop() = 0;
48  virtual PIL_ERROR_CODE single() = 0;
49 
50  virtual PIL_ERROR_CODE autoScale() = 0;
51 
52  virtual PIL_ERROR_CODE setTimeRange(double value) = 0;
53  virtual PIL_ERROR_CODE setChannelOffset(OSC_CHANNEL channel, double offset) = 0;
54  virtual PIL_ERROR_CODE setChannelScale(OSC_CHANNEL channel, double value) = 0;
55  virtual PIL_ERROR_CODE setChannelRange(OSC_CHANNEL channel, double value, VOLTAGE_UNIT voltageUnit) = 0;
56 
57 
58  virtual PIL_ERROR_CODE setTriggerEdge(TRIGGER_EDGE edge) = 0;
59  virtual PIL_ERROR_CODE setTriggerSource(OSC_CHANNEL channel) = 0;
60 };
61 
62 
63 #endif //INSTRUMENT_CONTROL_LIB_OSCILLOSCOPE_H
Basic device class This class contains all basic method of all devices, like Connect,...
Definition: Device.h:30
Definition: Oscilloscope.h:11
virtual PIL_ERROR_CODE setTriggerSource(OSC_CHANNEL channel)=0
Oscilloscope(const char *ip, int timeoutInMs, PIL::Logging *logger)
Definition: Oscilloscope.cpp:3
virtual PIL_ERROR_CODE setChannelScale(OSC_CHANNEL channel, double value)=0
virtual PIL_ERROR_CODE setChannelRange(OSC_CHANNEL channel, double value, VOLTAGE_UNIT voltageUnit)=0
OSC_CHANNEL
Definition: Oscilloscope.h:14
@ CHANNEL_1
Definition: Oscilloscope.h:15
@ CHANNEL_4
Definition: Oscilloscope.h:15
@ CHANNEL_2
Definition: Oscilloscope.h:15
@ CHANNEL_3
Definition: Oscilloscope.h:15
VOLTAGE_UNIT
Definition: Oscilloscope.h:39
@ VOLT
Definition: Oscilloscope.h:40
@ MILLI_VOLT
Definition: Oscilloscope.h:41
virtual PIL_ERROR_CODE setTriggerEdge(TRIGGER_EDGE edge)=0
virtual PIL_ERROR_CODE setChannelOffset(OSC_CHANNEL channel, double offset)=0
virtual PIL_ERROR_CODE run()=0
TRIGGER_EDGE
Definition: Oscilloscope.h:19
@ ALTERNATING
Definition: Oscilloscope.h:23
@ NEG_EDGE
Definition: Oscilloscope.h:21
@ EITHER
Definition: Oscilloscope.h:22
@ POS_EDGE
Definition: Oscilloscope.h:20
virtual PIL_ERROR_CODE single()=0
virtual PIL_ERROR_CODE stop()=0
FILE_FORMAT
Definition: Oscilloscope.h:33
@ ASCII
Definition: Oscilloscope.h:34
@ BYTE
Definition: Oscilloscope.h:36
@ WORD
Definition: Oscilloscope.h:35
DISPLAY_MODES
Definition: Oscilloscope.h:26
@ WIND
Definition: Oscilloscope.h:28
@ MAIN
Definition: Oscilloscope.h:27
@ XY
Definition: Oscilloscope.h:29
@ ROLL
Definition: Oscilloscope.h:30
virtual PIL_ERROR_CODE autoScale()=0
virtual PIL_ERROR_CODE setTimeRange(double value)=0