X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhardware%2Frigol-ds%2Fprotocol.h;h=e2efffa227bd0c9f254b0505fd739f6543551354;hp=3b17299114bb244e16685662174b1b5a4e496353;hb=HEAD;hpb=ca314e060f653e6a0b5ec0f58914bac4d426217f diff --git a/src/hardware/rigol-ds/protocol.h b/src/hardware/rigol-ds/protocol.h index 3b172991..e2efffa2 100644 --- a/src/hardware/rigol-ds/protocol.h +++ b/src/hardware/rigol-ds/protocol.h @@ -42,6 +42,7 @@ enum protocol_version { PROTOCOL_V2, /* DS1000 */ PROTOCOL_V3, /* DS2000, DSO1000 */ PROTOCOL_V4, /* DS1000Z */ + PROTOCOL_V5, /* MSO5000 */ }; enum data_format { @@ -74,12 +75,25 @@ struct rigol_ds_series { int buffer_samples; }; +enum cmds { + CMD_GET_HORIZ_TRIGGERPOS, + CMD_SET_HORIZ_TRIGGERPOS, +}; + +struct rigol_ds_command { + int cmd; + const char *str; +}; + struct rigol_ds_model { const struct rigol_ds_series *series; const char *name; uint64_t min_timebase[2]; unsigned int analog_channels; bool has_digital; + const char **trigger_sources; + unsigned int num_trigger_sources; + const struct rigol_ds_command *cmds; }; enum wait_events { @@ -115,10 +129,13 @@ struct dev_context { gboolean digital_channels[MAX_DIGITAL_CHANNELS]; gboolean la_enabled; float timebase; + float sample_rate; float attenuation[MAX_ANALOG_CHANNELS]; float vdiv[MAX_ANALOG_CHANNELS]; int vert_reference[MAX_ANALOG_CHANNELS]; + float vert_origin[MAX_ANALOG_CHANNELS]; float vert_offset[MAX_ANALOG_CHANNELS]; + float vert_inc[MAX_ANALOG_CHANNELS]; char *trigger_source; float horiz_triggerpos; char *trigger_slope; @@ -127,6 +144,8 @@ struct dev_context { /* Number of frames received in total. */ uint64_t num_frames; + /* Number of frames available from the Segmented data source */ + uint64_t num_frames_segmented; /* GSList entry for the current channel. */ GSList *channel_entry; /* Number of bytes received for current channel. */