]> git.zerfleddert.de Git - rigol/blobdiff - scope.h
update to libusb-1.0
[rigol] / scope.h
diff --git a/scope.h b/scope.h
index cef5e650e4c5125527b410b046ba80d714f13817..6c4f9549621cdf07219df1a24291629fd5c9bc89 100644 (file)
--- a/scope.h
+++ b/scope.h
@@ -1,6 +1,46 @@
+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 scope {
        struct {
-               struct usb_dev_handle *dev;
+               struct libusb_device_handle *dev;
                int ep_bulk_out;
                int ep_bulk_in;
                unsigned int wMaxPacketSize_in;
                int ep_bulk_out;
                int ep_bulk_in;
                unsigned int wMaxPacketSize_in;
@@ -20,24 +60,36 @@ struct scope {
                } keyboard;
 
                struct {
                } keyboard;
 
                struct {
-                       /* TODO */
+                       struct measure_s ch1;
+                       struct measure_s ch2;
+
+                       int total;
+                       char source[32];
                } measure;
 
                struct {
                        char type[32];
                        char mode[32];
                        int averages;
                } measure;
 
                struct {
                        char type[32];
                        char mode[32];
                        int averages;
-                       double srate_chan1;
-                       double srate_chan2;
+                       double srate_ch1;
+                       double srate_ch2;
                        double srate_digital;
                } acquire;
 
                struct {
                        double srate_digital;
                } acquire;
 
                struct {
-                       /* TODO */
+                       char type[32];
+                       char grid[32];
+                       int persist;
+                       char mnudisplay[32];
+                       int mnustatus;
+                       char screen[32];
+                       int brightness;
+                       int intensity;
                } display;
 
                struct {
                } display;
 
                struct {
-                       /* TODO */
+                       struct channel_s ch1;
+                       struct channel_s ch2;
                } channel;
 
                struct {
                } channel;
 
                struct {
@@ -49,6 +101,8 @@ struct scope {
                } timebase;
 
                struct {
                } timebase;
 
                struct {
+                       char mode[32];
+                       
                        /* TODO */
                } trigger;
 
                        /* TODO */
                } trigger;
 
@@ -57,9 +111,14 @@ struct scope {
                } la;
 
                struct {
                } la;
 
                struct {
-                       /* TODO */
+                       int displayed;
                } math;
                } math;
+
+               struct {
+                       int displayed;
+               } fft;
        } status;
        } status;
+
        char idn[128];
 };
 
        char idn[128];
 };
 
@@ -74,4 +133,6 @@ 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);
 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);
 int update_scope_status(struct scope *sc);
+char *scope_get_data(struct scope *sc, char *source, int *len);
Impressum, Datenschutz