]> git.zerfleddert.de Git - rigol/blob - scope.h
cef5e650e4c5125527b410b046ba80d714f13817
[rigol] / scope.h
1 struct scope {
2 struct {
3 struct usb_dev_handle *dev;
4 int ep_bulk_out;
5 int ep_bulk_in;
6 unsigned int wMaxPacketSize_in;
7 unsigned char bTag;
8 int brokenRigol;
9 struct usbtmc_capabilities *cap;
10 } usb;
11 struct {
12 struct {
13 char lang[32];
14 int counter_enabled;
15 int beep_enabled;
16 } system;
17
18 struct {
19 int key_lock;
20 } keyboard;
21
22 struct {
23 /* TODO */
24 } measure;
25
26 struct {
27 char type[32];
28 char mode[32];
29 int averages;
30 double srate_chan1;
31 double srate_chan2;
32 double srate_digital;
33 } acquire;
34
35 struct {
36 /* TODO */
37 } display;
38
39 struct {
40 /* TODO */
41 } channel;
42
43 struct {
44 char mode[32];
45 double offset;
46 double delayed_offset;
47 double scale;
48 char format[32];
49 } timebase;
50
51 struct {
52 /* TODO */
53 } trigger;
54
55 struct {
56 /* TODO */
57 } la;
58
59 struct {
60 /* TODO */
61 } math;
62 } status;
63 char idn[128];
64 };
65
66 int sendscpi(struct scope* sc, char* cmd, unsigned char *resp, int resplen);
67 struct scope* initscope(void);
68 void closescope(struct scope* sc);
69 void claimscope(struct scope* sc);
70 void releasescope(struct scope* sc);
71 void resetscope(struct scope* sc);
72 char *scope_idn(struct scope *sc);
73 char *scope_get_string(struct scope *sc, char *cmd, int maxlen);
74 int scope_get_truth_value(struct scope *sc, char *cmd);
75 int scope_get_int(struct scope *sc, char *cmd);
76 double scope_get_double(struct scope *sc, char*cmd);
77 int update_scope_status(struct scope *sc);
Impressum, Datenschutz