]> cvs.zerfleddert.de Git - rigol/blobdiff - scope.h
remove debug output
[rigol] / scope.h
diff --git a/scope.h b/scope.h
index 1fdb515fe42a62741b9527472b0b993ae6477a09..dba5670f3e614bb96baa17159e257c386153b4ea 100644 (file)
--- a/scope.h
+++ b/scope.h
@@ -1,3 +1,43 @@
+struct measure_s {
+       double vpp;
+       double vmax;
+       double vmin;
+       double vamplitude;
+       double vtop;
+       double vbase;
+       double vaverage;
+       double vrms;
+
+       double overshoot;
+       double preshoot;
+
+       double frequency;
+       double risetime;
+       double falltime;
+
+       double period;
+       double pwidth;
+       double nwidth;
+       double pdutycycle;
+       double ndutycycle;
+
+       double pdelay;
+       double ndelay;
+};
+
+struct channel_s {
+       int bwlimit_enabled;
+       char coupling[32];
+       int displayed;
+       int inverted;
+       double offset;
+       double probe;
+       double scale;
+       int filter_enabled;
+       int memory_depth;
+       char vernier[32];
+};
+
 struct scope {
        struct {
                struct usb_dev_handle *dev;
@@ -6,7 +46,77 @@ struct scope {
                unsigned int wMaxPacketSize_in;
                unsigned char bTag;
                int brokenRigol;
+               struct usbtmc_capabilities *cap;
        } usb;
+       struct {
+               struct {
+                       char lang[32];
+                       int counter_enabled;
+                       int beep_enabled;
+               } system;
+
+               struct {
+                       int key_lock;
+               } keyboard;
+
+               struct {
+                       struct measure_s ch1;
+                       struct measure_s ch2;
+
+                       int total;
+                       char source[32];
+               } measure;
+
+               struct {
+                       char type[32];
+                       char mode[32];
+                       int averages;
+                       double srate_ch1;
+                       double srate_ch2;
+                       double srate_digital;
+               } acquire;
+
+               struct {
+                       char type[32];
+                       char grid[32];
+                       int persist;
+                       char mnudisplay[32];
+                       int mnustatus;
+                       char screen[32];
+                       int brightness;
+                       int intensity;
+               } display;
+
+               struct {
+                       struct channel_s ch1;
+                       struct channel_s ch2;
+               } channel;
+
+               struct {
+                       char mode[32];
+                       double offset;
+                       double delayed_offset;
+                       double scale;
+                       char format[32];
+               } timebase;
+
+               struct {
+                       /* TODO */
+               } trigger;
+
+               struct {
+                       /* TODO */
+               } la;
+
+               struct {
+                       int displayed;
+               } math;
+
+               struct {
+                       int displayed;
+               } fft;
+       } status;
+
        char idn[128];
 };
 
@@ -15,4 +125,11 @@ struct scope* initscope(void);
 void closescope(struct scope* sc);
 void claimscope(struct scope* sc);
 void releasescope(struct scope* sc);
+void resetscope(struct scope* sc);
 char *scope_idn(struct scope *sc);
+char *scope_get_string(struct scope *sc, char *cmd, int maxlen);
+int scope_get_truth_value(struct scope *sc, char *cmd);
+int scope_get_int(struct scope *sc, char *cmd);
+double scope_get_double(struct scope *sc, char*cmd);
+void update_scope_measurements(struct scope *sc);
+int update_scope_status(struct scope *sc);
Impressum, Datenschutz