]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/yokogawa-dlm/protocol.h
input: Add debug output.
[libsigrok.git] / src / hardware / yokogawa-dlm / protocol.h
index 54b087cdccc8d7104a129cb25496084cd37d7ceb..0950267a3a0065a90df5cb7806bb829e066553a1 100644 (file)
@@ -33,6 +33,8 @@
 #define LOG_PREFIX "yokogawa-dlm"
 #define MAX_INSTRUMENT_VERSIONS 4
 
+#define RECEIVE_BUFFER_SIZE (4096)
+
 /* See Communication Interface User's Manual on p. 268 (:WAVeform:ALL:SEND?). */
 #define DLM_MAX_FRAME_LENGTH (12500)
 /* See Communication Interface User's Manual on p. 269 (:WAVeform:SEND?). */
@@ -77,8 +79,6 @@ struct scope_config {
 
        const uint8_t num_xdivs;
        const uint8_t num_ydivs;
-
-       const char *(*scpi_dialect)[];
 };
 
 struct analog_channel_state {
@@ -101,6 +101,7 @@ struct scope_state {
        int trigger_source;
        int trigger_slope;
        uint64_t sample_rate;
+       uint32_t samples_per_frame;
 };
 
 /** Private, per-device-instance driver context. */
@@ -116,6 +117,9 @@ struct dev_context {
        uint64_t num_frames;
 
        uint64_t frame_limit;
+
+       char receive_buffer[RECEIVE_BUFFER_SIZE];
+       gboolean data_pending;
 };
 
 /*--- api.c -----------------------------------------------------------------*/
@@ -130,4 +134,6 @@ SR_PRIV void dlm_scope_state_destroy(struct scope_state *state);
 SR_PRIV int dlm_scope_state_query(struct sr_dev_inst *sdi);
 SR_PRIV int dlm_sample_rate_query(const struct sr_dev_inst *sdi);
 
+SR_PRIV int dlm_channel_data_request(const struct sr_dev_inst *sdi);
+
 #endif