ngscopeclient 0.1-dev+51fbda87c
SiglentSCPIOscilloscope.h
1/***********************************************************************************************************************
2* *
3* libscopehal *
4* *
5* Copyright (c) 2012-2024 Andrew D. Zonenberg and contributors *
6* All rights reserved. *
7* *
8* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
9* following conditions are met: *
10* *
11* * Redistributions of source code must retain the above copyright notice, this list of conditions, and the *
12* following disclaimer. *
13* *
14* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the *
15* following disclaimer in the documentation and/or other materials provided with the distribution. *
16* *
17* * Neither the name of the author nor the names of any contributors may be used to endorse or promote products *
18* derived from this software without specific prior written permission. *
19* *
20* THIS SOFTWARE IS PROVIDED BY THE AUTHORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
21* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL *
22* THE AUTHORS BE HELD LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
23* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR *
24* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
25* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
26* POSSIBILITY OF SUCH DAMAGE. *
27* *
28***********************************************************************************************************************/
29
30#ifndef SiglentSCPIOscilloscope_h
31#define SiglentSCPIOscilloscope_h
32
33#include <mutex>
34#include <chrono>
35
36class DropoutTrigger;
37class EdgeTrigger;
38class GlitchTrigger;
40class RuntTrigger;
41class SlewRateTrigger;
42class UartTrigger;
43class WindowTrigger;
44
50#define MAX_ANALOG 4
51#define MAX_DIGITAL 16
52#define WAVEDESC_SIZE 346
53
54// These SDS2000/SDS5000 scopes will actually sample 200MPoints, but the maximum it can transfer in one
55// chunk is 10MPoints
56// TODO(dannas): Can the Siglent SDS1104x-e really transfer 14MPoints? Update comment and constant
57#define WAVEFORM_SIZE (14 * 1000 * 1000)
58
59#define c_digiChannelsPerBus 8
60
62 , public virtual SCPIFunctionGenerator
63{
64public:
67
68 //not copyable or assignable
70 SiglentSCPIOscilloscope& operator=(const SiglentSCPIOscilloscope& rhs) = delete;
71
72private:
73 std::string converse(const char* fmt, ...);
74 void sendOnly(const char* fmt, ...);
75
76protected:
77 void IdentifyHardware();
78 void DetectBandwidth();
79 void SharedCtorInit();
80 virtual void DetectAnalogChannels();
81 void AddDigitalChannels(unsigned int count);
82 void DetectOptions();
83 void ParseFirmwareVersion();
84 uint64_t GetMaxPoints();
85 uint64_t GetAcqPoints();
86 uint64_t GetDigitalAcqPoints();
87
88public:
89 //Device information
90 virtual unsigned int GetInstrumentTypes() const override;
91 virtual unsigned int GetMeasurementTypes();
92 virtual uint32_t GetInstrumentTypesForChannel(size_t i) const override;
93
94 virtual void FlushConfigCache() override;
95
96 void ForceHDMode(bool mode);
97
98 //Channel configuration
99 virtual bool IsChannelEnabled(size_t i) override;
100 virtual void EnableChannel(size_t i) override;
101 virtual bool CanEnableChannel(size_t i) override;
102 virtual void DisableChannel(size_t i) override;
103 virtual OscilloscopeChannel::CouplingType GetChannelCoupling(size_t i) override;
104 virtual void SetChannelCoupling(size_t i, OscilloscopeChannel::CouplingType type) override;
105 virtual std::vector<OscilloscopeChannel::CouplingType> GetAvailableCouplings(size_t i) override;
106 virtual double GetChannelAttenuation(size_t i) override;
107 virtual void SetChannelAttenuation(size_t i, double atten) override;
108 virtual unsigned int GetChannelBandwidthLimit(size_t i) override;
109 virtual void SetChannelBandwidthLimit(size_t i, unsigned int limit_mhz) override;
110 virtual float GetChannelVoltageRange(size_t i, size_t stream) override;
111 virtual void SetChannelVoltageRange(size_t i, size_t stream, float range) override;
112 virtual OscilloscopeChannel* GetExternalTrigger() override;
113 virtual float GetChannelOffset(size_t i, size_t stream) override;
114 virtual void SetChannelOffset(size_t i, size_t stream, float offset) override;
115 virtual std::string GetChannelDisplayName(size_t i) override;
116 virtual void SetChannelDisplayName(size_t i, std::string name) override;
117 virtual std::vector<unsigned int> GetChannelBandwidthLimiters(size_t i) override;
118 virtual bool CanInvert(size_t i) override;
119 virtual void Invert(size_t i, bool invert) override;
120 virtual bool IsInverted(size_t i) override;
121
122 //Triggering
123 virtual Oscilloscope::TriggerMode PollTrigger() override;
124 virtual bool AcquireData() override;
125 virtual void Start() override;
126 virtual void StartSingleTrigger() override;
127 virtual void Stop() override;
128 virtual void ForceTrigger() override;
129 virtual bool IsTriggerArmed() override;
130 virtual void PushTrigger() override;
131 virtual void PullTrigger() override;
132 virtual void EnableTriggerOutput() override;
133 virtual std::vector<std::string> GetTriggerTypes() override;
134
135 //Scope communication protocol.
136 enum Protocol
137 {
138 PROTOCOL_SPO,
139 PROTOCOL_ESERIES,
140 // Refers to E11 Siglent Programming Guide :
141 // https://www.siglenteu.com/wp-content/uploads/dlm_uploads/2024/03/ProgrammingGuide_EN11F.pdf
142 PROTOCOL_E11,
143 PROTOCOL_UNKNOWN
144 };
145
146 //Scope models.
147 //We only distinguish down to the series of scope, exact SKU is mostly irrelevant.
148 enum Model
149 {
150 MODEL_SIGLENT_SDS800X_HD,
151 MODEL_SIGLENT_SDS1000,
152 MODEL_SIGLENT_SDS1000X_HD,
153 MODEL_SIGLENT_SDS2000XE,
154 MODEL_SIGLENT_SDS2000XP,
155 MODEL_SIGLENT_SDS2000X_HD,
156 MODEL_SIGLENT_SDS3000X_HD,
157 MODEL_SIGLENT_SDS5000X,
158 MODEL_SIGLENT_SDS6000L,
159 MODEL_SIGLENT_SDS6000A,
160 MODEL_SIGLENT_SDS6000PRO,
161 MODEL_SIGLENT_SDS7000A,
162 MODEL_UNKNOWN
163 };
164
165 //Scope channel mode (only relevant for E11 models).
166 enum ChannelMode
167 {
168 CHANNEL_MODE_SINGLE,
169 CHANNEL_MODE_DUAL,
170 CHANNEL_MODE_MULTI
171 };
172
173 Model GetModelID() { return m_modelid; }
174
175 //Timebase
176 virtual std::vector<uint64_t> GetSampleRatesNonInterleaved() override;
177 virtual std::vector<uint64_t> GetSampleRatesInterleaved() override;
178 virtual std::set<InterleaveConflict> GetInterleaveConflicts() override;
179 virtual std::vector<uint64_t> GetSampleDepthsNonInterleaved() override;
180 virtual std::vector<uint64_t> GetSampleDepthsInterleaved() override;
181 virtual uint64_t GetSampleRate() override;
182 virtual uint64_t GetSampleDepth() override;
183 virtual void SetSampleDepth(uint64_t depth) override;
184 virtual void SetSampleRate(uint64_t rate) override;
185 virtual void SetUseExternalRefclk(bool external) override;
186 virtual bool IsInterleaving() override;
187 virtual bool SetInterleaving(bool combine) override;
188
189 virtual void SetTriggerOffset(int64_t offset) override;
190 virtual int64_t GetTriggerOffset() override;
191 virtual void SetDeskewForChannel(size_t channel, int64_t skew) override;
192 virtual int64_t GetDeskewForChannel(size_t channel) override;
193
195 // Function generator
196
197 virtual std::vector<WaveShape> GetAvailableWaveformShapes(int chan) override;
198
199 //Configuration
200 virtual bool GetFunctionChannelActive(int chan) override;
201 virtual void SetFunctionChannelActive(int chan, bool on) override;
202
203 virtual float GetFunctionChannelDutyCycle(int chan) override;
204 virtual void SetFunctionChannelDutyCycle(int chan, float duty) override;
205
206 virtual float GetFunctionChannelAmplitude(int chan) override;
207 virtual void SetFunctionChannelAmplitude(int chan, float amplitude) override;
208
209 virtual float GetFunctionChannelOffset(int chan) override;
210 virtual void SetFunctionChannelOffset(int chan, float offset) override;
211
212 virtual float GetFunctionChannelFrequency(int chan) override;
213 virtual void SetFunctionChannelFrequency(int chan, float hz) override;
214
215 virtual WaveShape GetFunctionChannelShape(int chan) override;
216 virtual void SetFunctionChannelShape(int chan, WaveShape shape) override;
217
218 virtual bool HasFunctionRiseFallTimeControls(int chan) override;
219
220 virtual OutputImpedance GetFunctionChannelOutputImpedance(int chan) override;
221 virtual void SetFunctionChannelOutputImpedance(int chan, OutputImpedance z) override;
222
224 // Logic analyzer configuration
225
226 virtual std::vector<DigitalBank> GetDigitalBanks() override;
227 virtual DigitalBank GetDigitalBank(size_t channel) override;
228 virtual bool IsDigitalHysteresisConfigurable() override;
229 virtual bool IsDigitalThresholdConfigurable() override;
230 virtual float GetDigitalHysteresis(size_t channel) override;
231 virtual float GetDigitalThreshold(size_t channel) override;
232 virtual void SetDigitalHysteresis(size_t channel, float level) override;
233 virtual void SetDigitalThreshold(size_t channel, float level) override;
234
236 // ADC bit depth configuration
237
238 //All currently supported Sig2 scopes have only one analog bank (same ADC config for all channels)
239 //so no need to override those
240
241 enum ADCMode
242 {
243 ADC_MODE_8BIT = 0,
244 ADC_MODE_10BIT = 1
245 };
246
247 virtual bool IsADCModeConfigurable() override;
248 virtual std::vector<std::string> GetADCModeNames(size_t channel) override;
249 virtual size_t GetADCMode(size_t channel) override;
250 virtual void SetADCMode(size_t channel, size_t mode) override;
251
252protected:
253 void PullDropoutTrigger();
254 void PullEdgeTrigger();
256 void PullRuntTrigger();
257 void PullSlewRateTrigger();
258 void PullUartTrigger();
259 void PullWindowTrigger();
260 void PullTriggerSource(Trigger* trig, std::string triggerModeName, bool isUart);
261
262 void GetTriggerSlope(EdgeTrigger* trig, std::string reply);
263 Trigger::Condition GetCondition(std::string reply);
264
266 void PushEdgeTrigger(EdgeTrigger* trig, const std::string trigType);
267 void PushGlitchTrigger(GlitchTrigger* trig);
268 void PushCondition(const std::string& path, Trigger::Condition cond);
269 void PushPatternCondition(const std::string& path, Trigger::Condition cond);
270 void PushFloat(std::string path, float f);
272 void PushRuntTrigger(RuntTrigger* trig);
274 void PushUartTrigger(UartTrigger* trig);
276
278
279 ChannelMode GetChannelMode();
280
281 void PrepareAcquisition();
282
283 std::string GetPossiblyEmptyString(const std::string& property);
284
285 int ReadWaveformBlock(uint32_t maxsize, char* data, bool hdSizeWorkaround = false, std::function<void(float)> progress = nullptr);
286 bool ReadWavedescs(
287 char wavedescs[MAX_ANALOG][WAVEDESC_SIZE], bool* analogEnabled, bool* digitalEnabled, bool& anyAnalogEnabled, bool& anyDigitalEnabled);
288
289 void RequestWaveforms(bool* enabled, uint32_t num_sequences, bool denabled);
290 time_t ExtractTimestamp(unsigned char* wavedesc, double& basetime);
291
292 std::vector<WaveformBase*> ProcessAnalogWaveform(const char* data,
293 size_t datalen,
294 char* wavedesc,
295 uint32_t num_sequences,
296 time_t ttime,
297 double basetime,
298 double* wavetime,
299 int i);
300
301 std::vector<SparseDigitalWaveform*> ProcessDigitalWaveform(const char* data,
302 size_t datalen,
303 char* wavedesc,
304 uint32_t num_sequences,
305 time_t ttime,
306 double basetime,
307 double* wavetime,
308 int i);
309
310 //hardware analog channel count, independent of LA option etc
311 unsigned int m_analogChannelCount;
312 unsigned int m_digitalChannelCount;
313 unsigned int m_analogAndDigitalChannelCount;
314 size_t m_digitalChannelBase;
315
316 Model m_modelid;
317 Protocol m_protocolId;
318
319 // Firmware version
320 int m_ubootMajorVersion;
321 int m_ubootMinorVersion;
322 int m_fwMajorVersion;
323 int m_fwMinorVersion;
324 int m_fwPatchVersion;
325 int m_fwPatchRevision;
326
327 //set of SW/HW options we have
328 bool m_hasLA;
329 bool m_hasDVM;
330 bool m_hasFunctionGen;
331 bool m_hasFastSampleRate; //-M models
332 int m_memoryDepthOption; //0 = base, after that number is max sample count in millions
333 bool m_hasI2cTrigger;
334 bool m_hasSpiTrigger;
335 bool m_hasUartTrigger;
336
337 //SDS2000XP firmware <=1.3.6R6 has data size bug while in 10 bit mode
338 bool m_requireSizeWorkaround;
339
341 unsigned int m_maxBandwidth;
342
343 bool m_triggerArmed;
344 bool m_triggerOneShot;
345 bool m_triggerForced;
346
347 //Cached configuration
348 std::map<size_t, float> m_channelVoltageRanges;
349 std::map<size_t, float> m_channelOffsets;
350 std::map<size_t, float> m_channelDigitalThresholds;
351 std::map<int, bool> m_channelsEnabled;
352 bool m_sampleRateValid;
353 int64_t m_sampleRate;
354 bool m_memoryDepthValid;
355 int64_t m_memoryDepth;
356 bool m_triggerOffsetValid;
357 int64_t m_triggerOffset;
358 bool m_maxPointsValid;
359 uint64_t m_maxPoints;
360 bool m_acqPointsValid;
361 uint64_t m_acqPoints;
362 bool m_digitalAcqPointsValid;
363 uint64_t m_digitalAcqPoints;
364 std::map<size_t, int64_t> m_channelDeskew;
365 Multimeter::MeasurementTypes m_meterMode;
366 bool m_meterModeValid;
367 std::map<size_t, bool> m_probeIsActive;
368 std::map<size_t, bool> m_awgEnabled;
369 std::map<size_t, float> m_awgDutyCycle;
370 std::map<size_t, float> m_awgRange;
371 std::map<size_t, float> m_awgOffset;
372 std::map<size_t, float> m_awgFrequency;
373 std::map<size_t, FunctionGenerator::WaveShape> m_awgShape;
374 std::map<size_t, FunctionGenerator::OutputImpedance> m_awgImpedance;
375 ADCMode m_adcMode;
376 bool m_adcModeValid;
377
378 std::map<std::string, std::string> ParseCommaSeparatedNameValueList(std::string str, bool forwardMap = true);
379
380 int64_t m_timeDiv;
381
382 //True if we have >8 bit capture depth
383 bool m_highDefinition;
384
385 //Other channels
386 OscilloscopeChannel* m_extTrigChannel;
387 FunctionGeneratorChannel* m_awgChannel;
388 std::vector<OscilloscopeChannel*> m_digitalChannels;
389
390public:
391 static std::string GetDriverNameInternal();
392 OSCILLOSCOPE_INITPROC(SiglentSCPIOscilloscope)
393};
394#endif
Trigger when a signal stops toggling for some amount of time.
Definition: DropoutTrigger.h:44
Simple edge trigger.
Definition: EdgeTrigger.h:44
A single channel of a function generator.
Definition: FunctionGeneratorChannel.h:45
WaveShape
Predefined waveform shapes.
Definition: FunctionGenerator.h:55
OutputImpedance
Nominal output impedance for a function generator channel.
Definition: FunctionGenerator.h:259
Trigger on a glitch meeting certain width criteria.
Definition: GlitchTrigger.h:46
A single channel on an oscilloscope.
Definition: OscilloscopeChannel.h:49
TriggerMode
Definition: Oscilloscope.h:411
Trigger on a pulse meeting certain width criteria.
Definition: PulseWidthTrigger.h:44
Runt trigger - trigger when a pulse of a given width crosses one threshold but not the second.
Definition: RuntTrigger.h:46
An SCPI-based function generator.
Definition: SCPIFunctionGenerator.h:38
An SCPI-based oscilloscope.
Definition: SCPIOscilloscope.h:38
Abstraction of a transport layer for moving SCPI data between endpoints.
Definition: SCPITransport.h:47
Definition: SiglentSCPIOscilloscope.h:63
virtual int64_t GetTriggerOffset() override
Gets the trigger offset.
Definition: SiglentSCPIOscilloscope.cpp:3382
virtual OutputImpedance GetFunctionChannelOutputImpedance(int chan) override
Gets the currently selected output impedance for a function generator output (if supported)
Definition: SiglentSCPIOscilloscope.cpp:5515
void PullSlewRateTrigger()
Reads settings for a slew rate trigger from the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4118
virtual void SetFunctionChannelOffset(int chan, float offset) override
Sets the DC offset for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:5038
virtual void SetDigitalThreshold(size_t channel, float level) override
Gets the threshold for a digital input.
Definition: SiglentSCPIOscilloscope.cpp:3770
virtual unsigned int GetInstrumentTypes() const override
See what features we have.
Definition: SiglentSCPIOscilloscope.cpp:691
virtual bool SetInterleaving(bool combine) override
Configures the scope to combine channels.
Definition: SiglentSCPIOscilloscope.cpp:3557
void PushWindowTrigger(WindowTrigger *trig)
Pushes settings for a window trigger to the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4765
virtual void SetChannelVoltageRange(size_t i, size_t stream, float range) override
Sets the range of the current channel configuration.
Definition: SiglentSCPIOscilloscope.cpp:2565
virtual DigitalBank GetDigitalBank(size_t channel) override
Gets the bank containing a given channel.
Definition: SiglentSCPIOscilloscope.cpp:3689
virtual std::vector< uint64_t > GetSampleDepthsNonInterleaved() override
Get the legal memory depths for this scope in all-channels mode.
Definition: SiglentSCPIOscilloscope.cpp:2668
virtual void PullTrigger() override
Updates m_trigger with any changes made from the instrument side.
Definition: SiglentSCPIOscilloscope.cpp:3795
virtual void SetFunctionChannelShape(int chan, WaveShape shape) override
Sets the waveform shape for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:5272
virtual void SetSampleDepth(uint64_t depth) override
Sets the sample depth of the scope.
Definition: SiglentSCPIOscilloscope.cpp:2908
virtual void SetFunctionChannelOutputImpedance(int chan, OutputImpedance z) override
Sets the currently selected output impedance for a function generator output (if supported)
Definition: SiglentSCPIOscilloscope.cpp:5530
void PullTriggerSource(Trigger *trig, std::string triggerModeName, bool isUart)
Reads the source of a trigger from the instrument.
Definition: SiglentSCPIOscilloscope.cpp:3884
void GetTriggerSlope(EdgeTrigger *trig, std::string reply)
Processes the slope for an edge or edge-derived trigger.
Definition: SiglentSCPIOscilloscope.cpp:4312
void PushDropoutTrigger(DropoutTrigger *trig)
Pushes settings for a dropout trigger to the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4484
virtual int64_t GetDeskewForChannel(size_t channel) override
Gets the deskew setting for a channel.
Definition: SiglentSCPIOscilloscope.cpp:3458
virtual unsigned int GetMeasurementTypes()
See what measurement capabilities we have.
Definition: SiglentSCPIOscilloscope.cpp:682
virtual bool IsDigitalThresholdConfigurable() override
Checks if digital input threshold is configurable or fixed.
Definition: SiglentSCPIOscilloscope.cpp:3713
virtual void SetChannelDisplayName(size_t i, std::string name) override
Sets the hardware display name for a channel. This is an arbitrary user-selected string.
Definition: SiglentSCPIOscilloscope.cpp:1391
virtual void SetChannelBandwidthLimit(size_t i, unsigned int limit_mhz) override
Sets the bandwidth limit for an input channel.
Definition: SiglentSCPIOscilloscope.cpp:1284
void PushRuntTrigger(RuntTrigger *trig)
Pushes settings for a runt trigger to the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4615
virtual bool CanInvert(size_t i) override
Checks if a channel is capable of hardware polarity inversion.
Definition: SiglentSCPIOscilloscope.cpp:1333
virtual void Stop() override
Stops triggering.
Definition: SiglentSCPIOscilloscope.cpp:2388
virtual void SetFunctionChannelActive(int chan, bool on) override
Turns a function generator channel on or off.
Definition: SiglentSCPIOscilloscope.cpp:4956
virtual std::vector< WaveShape > GetAvailableWaveformShapes(int chan) override
Query the set of available pre-defined waveforms for this generator.
Definition: SiglentSCPIOscilloscope.cpp:4861
virtual float GetDigitalThreshold(size_t channel) override
Gets the threshold for a digital input.
Definition: SiglentSCPIOscilloscope.cpp:3724
virtual void SetChannelOffset(size_t i, size_t stream, float offset) override
Sets the offset for a given channel.
Definition: SiglentSCPIOscilloscope.cpp:2494
virtual float GetFunctionChannelDutyCycle(int chan) override
Gets the duty cycle for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:4977
virtual bool IsADCModeConfigurable() override
Returns true if the ADC is configurable, false if it can only run in one mode.
Definition: SiglentSCPIOscilloscope.cpp:3570
virtual std::string GetChannelDisplayName(size_t i) override
Gets the hardware display name for a channel. This is an arbitrary user-selected string.
Definition: SiglentSCPIOscilloscope.cpp:1429
void PullDropoutTrigger()
Reads settings for a dropout trigger from the instrument.
Definition: SiglentSCPIOscilloscope.cpp:3896
virtual void DetectAnalogChannels()
Figures out how many analog channels we have, and add them to the device.
Definition: SiglentSCPIOscilloscope.cpp:560
virtual void ForceTrigger() override
Forces a single acquisition as soon as possible.
Definition: SiglentSCPIOscilloscope.cpp:2418
virtual uint32_t GetInstrumentTypesForChannel(size_t i) const override
Returns a bitfield describing the set of instrument types that a given channel supports.
Definition: SiglentSCPIOscilloscope.cpp:699
virtual Oscilloscope::TriggerMode PollTrigger() override
Checks the curent trigger status.
Definition: SiglentSCPIOscilloscope.cpp:1491
virtual void SetADCMode(size_t channel, size_t mode) override
Sets the ADC mode for a channel.
Definition: SiglentSCPIOscilloscope.cpp:3616
virtual void EnableTriggerOutput() override
Enables the trigger output, configuring a shared auxiliary port for this purpose if needed.
Definition: SiglentSCPIOscilloscope.cpp:3316
void PushCondition(const std::string &path, Trigger::Condition cond)
Pushes settings for a trigger condition under a .Condition field.
Definition: SiglentSCPIOscilloscope.cpp:4790
std::map< std::string, std::string > ParseCommaSeparatedNameValueList(std::string str, bool forwardMap=true)
Parses a name-value set expressed as pairs of comma separated values.
Definition: SiglentSCPIOscilloscope.cpp:5076
virtual void PushTrigger() override
Pushes changes made to m_trigger to the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4371
virtual float GetChannelOffset(size_t i, size_t stream) override
Gets the offset, in volts, for a given channel.
Definition: SiglentSCPIOscilloscope.cpp:2453
void PushSlewRateTrigger(SlewRateTrigger *trig)
Pushes settings for a slew rate trigger to the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4646
virtual uint64_t GetSampleRate() override
Gets the current sampling rate (in Hz) of this scope.
Definition: SiglentSCPIOscilloscope.cpp:2772
virtual std::vector< uint64_t > GetSampleRatesInterleaved() override
Get the legal sampling rates (in Hz) for this scope in combined-channels mode.
Definition: SiglentSCPIOscilloscope.cpp:2656
virtual void Invert(size_t i, bool invert) override
Enables hardware polarity inversion for a channel, if supported.
Definition: SiglentSCPIOscilloscope.cpp:1339
virtual float GetFunctionChannelFrequency(int chan) override
Gets the frequency for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:5046
virtual std::vector< uint64_t > GetSampleDepthsInterleaved() override
Get the legal memory depths for this scope in combined-channels mode.
Definition: SiglentSCPIOscilloscope.cpp:2747
virtual void Start() override
Starts the instrument in continuous trigger mode.
Definition: SiglentSCPIOscilloscope.cpp:2328
virtual double GetChannelAttenuation(size_t i) override
Gets the probe attenuation for an input channel.
Definition: SiglentSCPIOscilloscope.cpp:1119
virtual void EnableChannel(size_t i) override
Turn a channel on, given the index.
Definition: SiglentSCPIOscilloscope.cpp:774
virtual void SetFunctionChannelDutyCycle(int chan, float duty) override
Sets the duty cycle for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:4992
virtual float GetFunctionChannelAmplitude(int chan) override
Gets the amplitude for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:5000
virtual bool IsChannelEnabled(size_t i) override
Checks if a channel is enabled in hardware.
Definition: SiglentSCPIOscilloscope.cpp:711
virtual void StartSingleTrigger() override
Arms the trigger for a single acquistion.
Definition: SiglentSCPIOscilloscope.cpp:2357
virtual unsigned int GetChannelBandwidthLimit(size_t i) override
Gets the bandwidth limit for an input channel.
Definition: SiglentSCPIOscilloscope.cpp:1245
void PullWindowTrigger()
Reads settings for a window trigger from the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4269
virtual size_t GetADCMode(size_t channel) override
Gets the ADC mode for a channel.
Definition: SiglentSCPIOscilloscope.cpp:3584
Trigger::Condition GetCondition(std::string reply)
Parses a trigger condition.
Definition: SiglentSCPIOscilloscope.cpp:4353
void PullRuntTrigger()
Reads settings for a runt-pulse trigger from the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4057
virtual void SetUseExternalRefclk(bool external) override
Configures the instrument's clock source.
Definition: SiglentSCPIOscilloscope.cpp:3321
virtual bool CanEnableChannel(size_t i) override
Determines if a channel can be enabled.
Definition: SiglentSCPIOscilloscope.cpp:822
virtual void DisableChannel(size_t i) override
Turn a channel off, given the index.
Definition: SiglentSCPIOscilloscope.cpp:828
virtual void SetFunctionChannelAmplitude(int chan, float amplitude) override
Sets the amplitude for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:5015
void PushEdgeTrigger(EdgeTrigger *trig, const std::string trigType)
Pushes settings for an edge trigger to the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4512
virtual bool AcquireData() override
Pull data from the instrument.
Definition: SiglentSCPIOscilloscope.cpp:1941
virtual float GetFunctionChannelOffset(int chan) override
Gets the DC offset for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:5023
virtual std::vector< std::string > GetTriggerTypes() override
Gets a list of triggers this instrument supports.
Definition: SiglentSCPIOscilloscope.cpp:4821
virtual std::vector< OscilloscopeChannel::CouplingType > GetAvailableCouplings(size_t i) override
Gets the set of legal coupling values for an input channel.
Definition: SiglentSCPIOscilloscope.cpp:937
virtual bool IsTriggerArmed() override
Checks if the trigger is currently armed.
Definition: SiglentSCPIOscilloscope.cpp:1486
virtual std::vector< DigitalBank > GetDigitalBanks() override
Gets the digital channel banks for this instrument.
Definition: SiglentSCPIOscilloscope.cpp:3669
virtual std::vector< uint64_t > GetSampleRatesNonInterleaved() override
Get the legal sampling rates (in Hz) for this scope in all-channels mode.
Definition: SiglentSCPIOscilloscope.cpp:2593
virtual float GetDigitalHysteresis(size_t channel) override
Gets the hysteresis for a digital input.
Definition: SiglentSCPIOscilloscope.cpp:3718
void PullEdgeTrigger()
Reads settings for an edge trigger from the instrument.
Definition: SiglentSCPIOscilloscope.cpp:3950
virtual bool IsInverted(size_t i) override
Checks if hardware polarity inversion is enabled for a channel.
Definition: SiglentSCPIOscilloscope.cpp:1363
virtual bool IsInterleaving() override
Checks if the scope is currently combining channels.
Definition: SiglentSCPIOscilloscope.cpp:3503
void BulkCheckChannelEnableState()
Optimized function for checking channel enable status en masse with less round trips to the scope.
Definition: SiglentSCPIOscilloscope.cpp:1590
virtual bool HasFunctionRiseFallTimeControls(int chan) override
Determines if the function generator allows control over rise/fall times.
Definition: SiglentSCPIOscilloscope.cpp:5510
unsigned int m_maxBandwidth
Maximum bandwidth we support, in MHz.
Definition: SiglentSCPIOscilloscope.h:341
virtual bool GetFunctionChannelActive(int chan) override
Returns true if the function generator channel's output is enabled.
Definition: SiglentSCPIOscilloscope.cpp:4926
virtual void SetSampleRate(uint64_t rate) override
Sets the sample rate of the scope, in Hz.
Definition: SiglentSCPIOscilloscope.cpp:3268
void ForceHDMode(bool mode)
Forces 16-bit transfer mode on/off when for HD models.
Definition: SiglentSCPIOscilloscope.cpp:5554
virtual bool IsDigitalHysteresisConfigurable() override
Checks if digital input hysteresis is configurable or fixed.
Definition: SiglentSCPIOscilloscope.cpp:3708
void PullPulseWidthTrigger()
Reads settings for an edge trigger from the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4000
virtual WaveShape GetFunctionChannelShape(int chan) override
Gets the waveform shape for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:5119
virtual std::vector< std::string > GetADCModeNames(size_t channel) override
Gets the names of the ADC modes for the bank a given channel is located in.
Definition: SiglentSCPIOscilloscope.cpp:3575
virtual float GetChannelVoltageRange(size_t i, size_t stream) override
Gets the range of the current channel configuration.
Definition: SiglentSCPIOscilloscope.cpp:2524
virtual void SetFunctionChannelFrequency(int chan, float hz) override
Sets the frequency for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:5061
virtual void SetChannelAttenuation(size_t i, double atten) override
Sets the probe attenuation used for an input channel.
Definition: SiglentSCPIOscilloscope.cpp:1153
virtual void SetTriggerOffset(int64_t offset) override
Sets the trigger offset.
Definition: SiglentSCPIOscilloscope.cpp:3350
virtual void SetChannelCoupling(size_t i, OscilloscopeChannel::CouplingType type) override
Sets the coupling used for an input channel.
Definition: SiglentSCPIOscilloscope.cpp:1037
virtual uint64_t GetSampleDepth() override
Gets the current sample depth of this scope.
Definition: SiglentSCPIOscilloscope.cpp:2874
void AddDigitalChannels(unsigned int count)
Creates digital channels for the oscilloscope.
Definition: SiglentSCPIOscilloscope.cpp:533
virtual OscilloscopeChannel::CouplingType GetChannelCoupling(size_t i) override
Gets the coupling used for an input channel.
Definition: SiglentSCPIOscilloscope.cpp:984
virtual void FlushConfigCache() override
Instruments are allowed to cache configuration settings to reduce round trip queries to the device.
Definition: SiglentSCPIOscilloscope.cpp:641
void PushUartTrigger(UartTrigger *trig)
Pushes settings for a UART trigger to the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4663
virtual OscilloscopeChannel * GetExternalTrigger() override
Returns the external trigger input channel, if we have one.
Definition: SiglentSCPIOscilloscope.cpp:636
void PushPulseWidthTrigger(PulseWidthTrigger *trig)
Pushes settings for a pulse width trigger to the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4587
virtual std::vector< unsigned int > GetChannelBandwidthLimiters(size_t i) override
Gets the set of available bandwidth limiters for an input channel.
Definition: SiglentSCPIOscilloscope.cpp:1199
virtual void SetDigitalHysteresis(size_t channel, float level) override
Sets the hysteresis for a digital input.
Definition: SiglentSCPIOscilloscope.cpp:3765
virtual void SetDeskewForChannel(size_t channel, int64_t skew) override
Sets the deskew setting for a channel.
Definition: SiglentSCPIOscilloscope.cpp:3429
void PullUartTrigger()
Reads settings for a UART trigger from the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4181
Slew rate trigger - trigger when an edge rate meets the specified conditions.
Definition: SlewRateTrigger.h:46
Abstract base class for oscilloscope / logic analyzer trigger inputs.
Definition: Trigger.h:46
Condition
Conditions for triggers that perform logical comparisons of values.
Definition: Trigger.h:69
Trigger when a UART sees a certain data pattern.
Definition: UartTrigger.h:56
Window trigger - detect when the signal leaves a specified range.
Definition: WindowTrigger.h:46