]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/siglent-sds/protocol.h
scpi-pps: Don't block waiting for a value on capture stop.
[libsigrok.git] / src / hardware / siglent-sds / protocol.h
index 0a7e5f3a0fb869433f91806b0280623428b9e11f..b0c926ed0ec9a7cf8a75aebc274419504696a23c 100644 (file)
@@ -32,6 +32,8 @@
 //#define ACQ_BUFFER_SIZE (6000000)
 #define ACQ_BUFFER_SIZE (18000000)
 
+#define SIGLENT_HEADER_SIZE 351
+
 /* Maximum number of samples to retrieve at once. */
 #define ACQ_BLOCK_SIZE (30 * 1000)
 
@@ -55,7 +57,6 @@ enum data_source {
 struct siglent_sds_vendor {
        const char *name;
        const char *full_name;
-       const char *usb_name;
 };
 
 struct siglent_sds_series {
@@ -102,12 +103,15 @@ struct dev_context {
        /* Acquisition settings */
        GSList *enabled_channels;
        uint64_t limit_frames;
+       uint64_t average_samples;
+       gboolean average_enabled;
        enum data_source data_source;
        uint64_t analog_frame_size;
        uint64_t digital_frame_size;
        uint64_t num_samples;
-       long blockHeaderSize;
-       float sampleRate;
+       uint64_t memory_depth;
+       long block_header_size;
+       float samplerate;
 
        /* Device settings */
        gboolean analog_channels[MAX_ANALOG_CHANNELS];
@@ -134,10 +138,10 @@ struct dev_context {
        uint64_t num_channel_bytes;
        /* Number of bytes of block header read. */
        uint64_t num_header_bytes;
-       /* Number of bytes in current data block, if 0 block header expected. */
+       /* Number of data blocks bytes already read. */
        uint64_t num_block_bytes;
-       /* Number of data block bytes already read. */
-       uint64_t num_block_read;
+       /* Number of data blocks read. */
+       int num_block_read;
        /* What to wait for in *_receive. */
        enum wait_events wait_event;
        /* Trigger/block copying/stop waiting status. */