ngscopeclient v0.1.1
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 void flush();
76 void flushWaveformData();
77 void protocolError(std::string message = "");
78
79protected:
80 void IdentifyHardware();
81 void DetectBandwidth();
82 void SharedCtorInit();
83 virtual void DetectAnalogChannels();
84 void AddDigitalChannels(unsigned int count);
85 void DetectOptions();
86 void ParseFirmwareVersion();
87 uint64_t GetMaxPoints();
88 uint64_t GetAcqPoints();
89 uint64_t GetDigitalAcqPoints();
90
91public:
92 //Device information
93 virtual unsigned int GetInstrumentTypes() const override;
94 virtual unsigned int GetMeasurementTypes();
95 virtual uint32_t GetInstrumentTypesForChannel(size_t i) const override;
96
97 virtual void FlushConfigCache() override;
98
99 void ForceHDMode(bool mode);
100
101 //Channel configuration
102 virtual bool IsChannelEnabled(size_t i) override;
103 virtual void EnableChannel(size_t i) override;
104 virtual bool CanEnableChannel(size_t i) override;
105 virtual void DisableChannel(size_t i) override;
106 virtual OscilloscopeChannel::CouplingType GetChannelCoupling(size_t i) override;
107 virtual void SetChannelCoupling(size_t i, OscilloscopeChannel::CouplingType type) override;
108 virtual std::vector<OscilloscopeChannel::CouplingType> GetAvailableCouplings(size_t i) override;
109 virtual double GetChannelAttenuation(size_t i) override;
110 virtual void SetChannelAttenuation(size_t i, double atten) override;
111 virtual unsigned int GetChannelBandwidthLimit(size_t i) override;
112 virtual void SetChannelBandwidthLimit(size_t i, unsigned int limit_mhz) override;
113 virtual float GetChannelVoltageRange(size_t i, size_t stream) override;
114 virtual void SetChannelVoltageRange(size_t i, size_t stream, float range) override;
115 virtual OscilloscopeChannel* GetExternalTrigger() override;
116 virtual float GetChannelOffset(size_t i, size_t stream) override;
117 virtual void SetChannelOffset(size_t i, size_t stream, float offset) override;
118 virtual std::string GetChannelDisplayName(size_t i) override;
119 virtual void SetChannelDisplayName(size_t i, std::string name) override;
120 virtual std::vector<unsigned int> GetChannelBandwidthLimiters(size_t i) override;
121 virtual bool CanInvert(size_t i) override;
122 virtual void Invert(size_t i, bool invert) override;
123 virtual bool IsInverted(size_t i) override;
124
125 //Triggering
126 virtual Oscilloscope::TriggerMode PollTrigger() override;
127 virtual bool AcquireData() override;
128 virtual void Start() override;
129 virtual void StartSingleTrigger() override;
130 virtual void Stop() override;
131 virtual void ForceTrigger() override;
132 virtual bool IsTriggerArmed() override;
133 virtual void PushTrigger() override;
134 virtual void PullTrigger() override;
135 virtual void EnableTriggerOutput() override;
136 virtual std::vector<std::string> GetTriggerTypes() override;
137
138 //Scope communication protocol.
139 enum Protocol
140 {
141 PROTOCOL_SPO,
142 PROTOCOL_ESERIES,
143 // Refers to E11 Siglent Programming Guide :
144 // https://www.siglenteu.com/wp-content/uploads/dlm_uploads/2024/03/ProgrammingGuide_EN11F.pdf
145 PROTOCOL_E11,
146 PROTOCOL_UNKNOWN
147 };
148
149 //Scope models.
150 //We only distinguish down to the series of scope, exact SKU is mostly irrelevant.
151 enum Model
152 {
153 MODEL_SIGLENT_SDS800X_HD,
154 MODEL_SIGLENT_SDS1000,
155 MODEL_SIGLENT_SDS1000X_HD,
156 MODEL_SIGLENT_SDS2000XE,
157 MODEL_SIGLENT_SDS2000XP,
158 MODEL_SIGLENT_SDS2000X_HD,
159 MODEL_SIGLENT_SDS3000X_HD,
160 MODEL_SIGLENT_SDS5000X,
161 MODEL_SIGLENT_SDS6000L,
162 MODEL_SIGLENT_SDS6000A,
163 MODEL_SIGLENT_SDS6000PRO,
164 MODEL_SIGLENT_SDS7000A,
165 MODEL_UNKNOWN
166 };
167
168 //Scope channel mode (only relevant for E11 models).
169 enum ChannelMode
170 {
171 CHANNEL_MODE_SINGLE,
172 CHANNEL_MODE_DUAL,
173 CHANNEL_MODE_MULTI
174 };
175
176 Model GetModelID() { return m_modelid; }
177
178 std::string GetModelString() const
179 {
180 switch(m_modelid)
181 {
182 case MODEL_SIGLENT_SDS800X_HD: return "SIGLENT_SDS800X_HD";
183 case MODEL_SIGLENT_SDS1000: return "SIGLENT_SDS1000";
184 case MODEL_SIGLENT_SDS1000X_HD: return "SIGLENT_SDS1000X_HD";
185 case MODEL_SIGLENT_SDS2000XE: return "SIGLENT_SDS2000XE";
186 case MODEL_SIGLENT_SDS2000XP: return "SIGLENT_SDS2000XP";
187 case MODEL_SIGLENT_SDS2000X_HD: return "SIGLENT_SDS2000X_HD";
188 case MODEL_SIGLENT_SDS3000X_HD: return "SIGLENT_SDS3000X_HD";
189 case MODEL_SIGLENT_SDS5000X: return "SIGLENT_SDS5000X";
190 case MODEL_SIGLENT_SDS6000L: return "SIGLENT_SDS6000L";
191 case MODEL_SIGLENT_SDS6000A: return "SIGLENT_SDS6000A";
192 case MODEL_SIGLENT_SDS6000PRO: return "SIGLENT_SDS6000PRO";
193 case MODEL_SIGLENT_SDS7000A: return "SIGLENT_SDS7000A";
194 default:
195 case MODEL_UNKNOWN: return "UNKNOWN";
196 }
197 }
198
199 //Timebase
200 virtual std::vector<uint64_t> GetSampleRatesNonInterleaved() override;
201 virtual std::vector<uint64_t> GetSampleRatesInterleaved() override;
202 virtual std::set<InterleaveConflict> GetInterleaveConflicts() override;
203 virtual std::vector<uint64_t> GetSampleDepthsNonInterleaved() override;
204 virtual std::vector<uint64_t> GetSampleDepthsInterleaved() override;
205 virtual uint64_t GetSampleRate() override;
206 virtual uint64_t GetSampleDepth() override;
207 virtual void SetSampleDepth(uint64_t depth) override;
208 virtual void SetSampleRate(uint64_t rate) override;
209 virtual void SetUseExternalRefclk(bool external) override;
210 virtual bool IsInterleaving() override;
211 virtual bool SetInterleaving(bool combine) override;
212
213 virtual void SetTriggerOffset(int64_t offset) override;
214 virtual int64_t GetTriggerOffset() override;
215 virtual void SetDeskewForChannel(size_t channel, int64_t skew) override;
216 virtual int64_t GetDeskewForChannel(size_t channel) override;
217
219 // Function generator
220
221 virtual std::vector<WaveShape> GetAvailableWaveformShapes(int chan) override;
222
223 //Configuration
224 virtual bool GetFunctionChannelActive(int chan) override;
225 virtual void SetFunctionChannelActive(int chan, bool on) override;
226
227 virtual float GetFunctionChannelDutyCycle(int chan) override;
228 virtual void SetFunctionChannelDutyCycle(int chan, float duty) override;
229
230 virtual float GetFunctionChannelAmplitude(int chan) override;
231 virtual void SetFunctionChannelAmplitude(int chan, float amplitude) override;
232
233 virtual float GetFunctionChannelOffset(int chan) override;
234 virtual void SetFunctionChannelOffset(int chan, float offset) override;
235
236 virtual float GetFunctionChannelFrequency(int chan) override;
237 virtual void SetFunctionChannelFrequency(int chan, float hz) override;
238
239 virtual WaveShape GetFunctionChannelShape(int chan) override;
240 virtual void SetFunctionChannelShape(int chan, WaveShape shape) override;
241
242 virtual bool HasFunctionRiseFallTimeControls(int chan) override;
243
244 virtual OutputImpedance GetFunctionChannelOutputImpedance(int chan) override;
245 virtual void SetFunctionChannelOutputImpedance(int chan, OutputImpedance z) override;
246
248 // Logic analyzer configuration
249
250 virtual std::vector<DigitalBank> GetDigitalBanks() override;
251 virtual DigitalBank GetDigitalBank(size_t channel) override;
252 virtual bool IsDigitalHysteresisConfigurable() override;
253 virtual bool IsDigitalThresholdConfigurable() override;
254 virtual float GetDigitalHysteresis(size_t channel) override;
255 virtual float GetDigitalThreshold(size_t channel) override;
256 virtual void SetDigitalHysteresis(size_t channel, float level) override;
257 virtual void SetDigitalThreshold(size_t channel, float level) override;
258
260 // ADC bit depth configuration
261
262 //All currently supported Sig2 scopes have only one analog bank (same ADC config for all channels)
263 //so no need to override those
264
265 enum ADCMode
266 {
267 ADC_MODE_8BIT = 0,
268 ADC_MODE_10BIT = 1
269 };
270
271 virtual bool IsADCModeConfigurable() override;
272 virtual std::vector<std::string> GetADCModeNames(size_t channel) override;
273 virtual size_t GetADCMode(size_t channel) override;
274 virtual void SetADCMode(size_t channel, size_t mode) override;
275
276protected:
277 void PullDropoutTrigger();
278 void PullEdgeTrigger();
280 void PullRuntTrigger();
281 void PullSlewRateTrigger();
282 void PullUartTrigger();
283 void PullWindowTrigger();
284 void PullTriggerSource(Trigger* trig, std::string triggerModeName, bool isUart);
285
286 void GetTriggerSlope(EdgeTrigger* trig, std::string reply);
287 Trigger::Condition GetCondition(std::string reply);
288
290 void PushEdgeTrigger(EdgeTrigger* trig, const std::string trigType);
291 void PushGlitchTrigger(GlitchTrigger* trig);
292 void PushCondition(const std::string& path, Trigger::Condition cond);
293 void PushPatternCondition(const std::string& path, Trigger::Condition cond);
294 void PushFloat(std::string path, float f);
296 void PushRuntTrigger(RuntTrigger* trig);
298 void PushUartTrigger(UartTrigger* trig);
300
302
303 ChannelMode GetChannelMode();
304
305 void PrepareAcquisition();
306
307 std::string GetPossiblyEmptyString(const std::string& property);
308
309 int ReadWaveformBlock(uint32_t maxsize, size_t& readBytes, char* data, bool hdSizeWorkaround = false, std::function<void(float)> progress = nullptr);
310 bool ReadWavedescs(
311 char wavedescs[MAX_ANALOG][WAVEDESC_SIZE], bool* analogEnabled, bool* digitalEnabled, bool& anyAnalogEnabled, bool& anyDigitalEnabled);
312
313 time_t ExtractTimestamp(unsigned char* wavedesc, double& basetime);
314
315 std::vector<WaveformBase*> ProcessAnalogWaveform(const char* data,
316 size_t datalen,
317 char* wavedesc,
318 uint32_t num_sequences,
319 time_t ttime,
320 double basetime,
321 double* wavetime,
322 int i);
323
324 std::vector<SparseDigitalWaveform*> ProcessDigitalWaveform(const char* data,
325 size_t datalen,
326 char* wavedesc,
327 uint32_t num_sequences,
328 time_t ttime,
329 double basetime,
330 double* wavetime,
331 int i);
332
333 //hardware analog channel count, independent of LA option etc
334 unsigned int m_analogChannelCount;
335 unsigned int m_digitalChannelCount;
336 unsigned int m_analogAndDigitalChannelCount;
337 size_t m_digitalChannelBase;
338
339 Model m_modelid;
340 Protocol m_protocolId;
341
342 // Firmware version
343 int m_ubootMajorVersion;
344 int m_ubootMinorVersion;
345 int m_ubootPatchVersion;
346 int m_fwMajorVersion;
347 int m_fwMinorVersion;
348 int m_fwPatchVersion;
349 int m_fwPatchRevision;
350
351 //set of SW/HW options we have
352 bool m_hasLA;
353 bool m_hasDVM;
354 bool m_hasFunctionGen;
355 bool m_hasFastSampleRate; //-M models
356 int m_memoryDepthOption; //0 = base, after that number is max sample count in millions
357 bool m_hasI2cTrigger;
358 bool m_hasSpiTrigger;
359 bool m_hasUartTrigger;
360
361 //SDS2000XP firmware <=1.3.6R6 has data size bug while in 10 bit mode
362 bool m_requireSizeWorkaround;
363
365 unsigned int m_maxBandwidth;
366
367 bool m_triggerArmed;
368 bool m_triggerOneShot;
369 bool m_triggerForced;
370
371 // Pagination state
372 bool m_paginated;
373
374 //Cached configuration
375 std::map<size_t, float> m_channelVoltageRanges;
376 std::map<size_t, float> m_channelOffsets;
377 std::map<size_t, float> m_channelDigitalThresholds;
378 std::map<int, bool> m_channelsEnabled;
379 bool m_sampleRateValid;
380 int64_t m_sampleRate;
381 bool m_memoryDepthValid;
382 int64_t m_memoryDepth;
383 bool m_triggerOffsetValid;
384 int64_t m_triggerOffset;
385 bool m_maxPointsValid;
386 uint64_t m_maxPoints;
387 bool m_acqPointsValid;
388 uint64_t m_acqPoints;
389 bool m_digitalAcqPointsValid;
390 uint64_t m_digitalAcqPoints;
391 std::map<size_t, int64_t> m_channelDeskew;
392 Multimeter::MeasurementTypes m_meterMode;
393 bool m_meterModeValid;
394 std::map<size_t, bool> m_probeIsActive;
395 std::map<size_t, bool> m_awgEnabled;
396 std::map<size_t, float> m_awgDutyCycle;
397 std::map<size_t, float> m_awgRange;
398 std::map<size_t, float> m_awgOffset;
399 std::map<size_t, float> m_awgFrequency;
400 std::map<size_t, FunctionGenerator::WaveShape> m_awgShape;
401 std::map<size_t, FunctionGenerator::OutputImpedance> m_awgImpedance;
402 ADCMode m_adcMode;
403 bool m_adcModeValid;
404
405 std::map<std::string, std::string> ParseCommaSeparatedNameValueList(std::string str, bool forwardMap = true);
406
407 int64_t m_timeDiv;
408
409 //True if we have >8 bit capture depth
410 bool m_highDefinition;
411
412 //Other channels
413 OscilloscopeChannel* m_extTrigChannel;
414 FunctionGeneratorChannel* m_awgChannel;
415 std::vector<OscilloscopeChannel*> m_digitalChannels;
416
417public:
418 static std::string GetDriverNameInternal();
419 OSCILLOSCOPE_INITPROC(SiglentSCPIOscilloscope)
420};
421#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:396
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:3618
virtual OutputImpedance GetFunctionChannelOutputImpedance(int chan) override
Gets the currently selected output impedance for a function generator output (if supported)
Definition: SiglentSCPIOscilloscope.cpp:5759
void PullSlewRateTrigger()
Reads settings for a slew rate trigger from the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4362
virtual void SetFunctionChannelOffset(int chan, float offset) override
Sets the DC offset for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:5282
virtual void SetDigitalThreshold(size_t channel, float level) override
Gets the threshold for a digital input.
Definition: SiglentSCPIOscilloscope.cpp:4014
virtual unsigned int GetInstrumentTypes() const override
See what features we have.
Definition: SiglentSCPIOscilloscope.cpp:743
virtual bool SetInterleaving(bool combine) override
Configures the scope to combine channels.
Definition: SiglentSCPIOscilloscope.cpp:3801
void PushWindowTrigger(WindowTrigger *trig)
Pushes settings for a window trigger to the instrument.
Definition: SiglentSCPIOscilloscope.cpp:5009
virtual void SetChannelVoltageRange(size_t i, size_t stream, float range) override
Sets the range of the current channel configuration.
Definition: SiglentSCPIOscilloscope.cpp:2728
virtual DigitalBank GetDigitalBank(size_t channel) override
Gets the bank containing a given channel.
Definition: SiglentSCPIOscilloscope.cpp:3933
virtual std::vector< uint64_t > GetSampleDepthsNonInterleaved() override
Get the legal memory depths for this scope in all-channels mode.
Definition: SiglentSCPIOscilloscope.cpp:2831
virtual void PullTrigger() override
Updates m_trigger with any changes made from the instrument side.
Definition: SiglentSCPIOscilloscope.cpp:4039
virtual void SetFunctionChannelShape(int chan, WaveShape shape) override
Sets the waveform shape for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:5516
virtual void SetSampleDepth(uint64_t depth) override
Sets the sample depth of the scope.
Definition: SiglentSCPIOscilloscope.cpp:3095
virtual void SetFunctionChannelOutputImpedance(int chan, OutputImpedance z) override
Sets the currently selected output impedance for a function generator output (if supported)
Definition: SiglentSCPIOscilloscope.cpp:5774
void PullTriggerSource(Trigger *trig, std::string triggerModeName, bool isUart)
Reads the source of a trigger from the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4128
void GetTriggerSlope(EdgeTrigger *trig, std::string reply)
Processes the slope for an edge or edge-derived trigger.
Definition: SiglentSCPIOscilloscope.cpp:4556
void PushDropoutTrigger(DropoutTrigger *trig)
Pushes settings for a dropout trigger to the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4728
virtual int64_t GetDeskewForChannel(size_t channel) override
Gets the deskew setting for a channel.
Definition: SiglentSCPIOscilloscope.cpp:3698
virtual unsigned int GetMeasurementTypes()
See what measurement capabilities we have.
Definition: SiglentSCPIOscilloscope.cpp:734
virtual bool IsDigitalThresholdConfigurable() override
Checks if digital input threshold is configurable or fixed.
Definition: SiglentSCPIOscilloscope.cpp:3957
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:1446
virtual void SetChannelBandwidthLimit(size_t i, unsigned int limit_mhz) override
Sets the bandwidth limit for an input channel.
Definition: SiglentSCPIOscilloscope.cpp:1339
void PushRuntTrigger(RuntTrigger *trig)
Pushes settings for a runt trigger to the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4859
virtual bool CanInvert(size_t i) override
Checks if a channel is capable of hardware polarity inversion.
Definition: SiglentSCPIOscilloscope.cpp:1388
virtual void Stop() override
Stops triggering.
Definition: SiglentSCPIOscilloscope.cpp:2543
virtual void SetFunctionChannelActive(int chan, bool on) override
Turns a function generator channel on or off.
Definition: SiglentSCPIOscilloscope.cpp:5200
virtual std::vector< WaveShape > GetAvailableWaveformShapes(int chan) override
Query the set of available pre-defined waveforms for this generator.
Definition: SiglentSCPIOscilloscope.cpp:5105
virtual float GetDigitalThreshold(size_t channel) override
Gets the threshold for a digital input.
Definition: SiglentSCPIOscilloscope.cpp:3968
virtual void SetChannelOffset(size_t i, size_t stream, float offset) override
Sets the offset for a given channel.
Definition: SiglentSCPIOscilloscope.cpp:2653
virtual float GetFunctionChannelDutyCycle(int chan) override
Gets the duty cycle for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:5221
virtual bool IsADCModeConfigurable() override
Returns true if the ADC is configurable, false if it can only run in one mode.
Definition: SiglentSCPIOscilloscope.cpp:3814
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:1484
void PullDropoutTrigger()
Reads settings for a dropout trigger from the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4140
virtual void DetectAnalogChannels()
Figures out how many analog channels we have, and add them to the device.
Definition: SiglentSCPIOscilloscope.cpp:612
virtual void ForceTrigger() override
Forces a single acquisition as soon as possible.
Definition: SiglentSCPIOscilloscope.cpp:2573
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:751
virtual Oscilloscope::TriggerMode PollTrigger() override
Checks the curent trigger status.
Definition: SiglentSCPIOscilloscope.cpp:1546
virtual void SetADCMode(size_t channel, size_t mode) override
Sets the ADC mode for a channel.
Definition: SiglentSCPIOscilloscope.cpp:3860
virtual void EnableTriggerOutput() override
Enables the trigger output, configuring a shared auxiliary port for this purpose if needed.
Definition: SiglentSCPIOscilloscope.cpp:3552
void PushCondition(const std::string &path, Trigger::Condition cond)
Pushes settings for a trigger condition under a .Condition field.
Definition: SiglentSCPIOscilloscope.cpp:5034
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:5320
virtual void PushTrigger() override
Pushes changes made to m_trigger to the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4615
virtual float GetChannelOffset(size_t i, size_t stream) override
Gets the offset, in volts, for a given channel.
Definition: SiglentSCPIOscilloscope.cpp:2608
void PushSlewRateTrigger(SlewRateTrigger *trig)
Pushes settings for a slew rate trigger to the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4890
virtual uint64_t GetSampleRate() override
Gets the current sampling rate (in Hz) of this scope.
Definition: SiglentSCPIOscilloscope.cpp:2935
virtual std::vector< uint64_t > GetSampleRatesInterleaved() override
Get the legal sampling rates (in Hz) for this scope in combined-channels mode.
Definition: SiglentSCPIOscilloscope.cpp:2819
virtual void Invert(size_t i, bool invert) override
Enables hardware polarity inversion for a channel, if supported.
Definition: SiglentSCPIOscilloscope.cpp:1394
virtual float GetFunctionChannelFrequency(int chan) override
Gets the frequency for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:5290
virtual std::vector< uint64_t > GetSampleDepthsInterleaved() override
Get the legal memory depths for this scope in combined-channels mode.
Definition: SiglentSCPIOscilloscope.cpp:2910
virtual void Start() override
Starts the instrument in continuous trigger mode.
Definition: SiglentSCPIOscilloscope.cpp:2483
virtual double GetChannelAttenuation(size_t i) override
Gets the probe attenuation for an input channel.
Definition: SiglentSCPIOscilloscope.cpp:1171
virtual void EnableChannel(size_t i) override
Turn a channel on, given the index.
Definition: SiglentSCPIOscilloscope.cpp:826
virtual void SetFunctionChannelDutyCycle(int chan, float duty) override
Sets the duty cycle for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:5236
virtual float GetFunctionChannelAmplitude(int chan) override
Gets the amplitude for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:5244
virtual bool IsChannelEnabled(size_t i) override
Checks if a channel is enabled in hardware.
Definition: SiglentSCPIOscilloscope.cpp:763
virtual void StartSingleTrigger() override
Arms the trigger for a single acquistion.
Definition: SiglentSCPIOscilloscope.cpp:2512
virtual unsigned int GetChannelBandwidthLimit(size_t i) override
Gets the bandwidth limit for an input channel.
Definition: SiglentSCPIOscilloscope.cpp:1300
void PullWindowTrigger()
Reads settings for a window trigger from the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4513
virtual size_t GetADCMode(size_t channel) override
Gets the ADC mode for a channel.
Definition: SiglentSCPIOscilloscope.cpp:3828
Trigger::Condition GetCondition(std::string reply)
Parses a trigger condition.
Definition: SiglentSCPIOscilloscope.cpp:4597
void PullRuntTrigger()
Reads settings for a runt-pulse trigger from the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4301
virtual void SetUseExternalRefclk(bool external) override
Configures the instrument's clock source.
Definition: SiglentSCPIOscilloscope.cpp:3557
virtual bool CanEnableChannel(size_t i) override
Determines if a channel can be enabled.
Definition: SiglentSCPIOscilloscope.cpp:874
virtual void DisableChannel(size_t i) override
Turn a channel off, given the index.
Definition: SiglentSCPIOscilloscope.cpp:880
virtual void SetFunctionChannelAmplitude(int chan, float amplitude) override
Sets the amplitude for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:5259
void PushEdgeTrigger(EdgeTrigger *trig, const std::string trigType)
Pushes settings for an edge trigger to the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4756
virtual bool AcquireData() override
Pull data from the instrument.
Definition: SiglentSCPIOscilloscope.cpp:2021
virtual float GetFunctionChannelOffset(int chan) override
Gets the DC offset for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:5267
virtual std::vector< std::string > GetTriggerTypes() override
Gets a list of triggers this instrument supports.
Definition: SiglentSCPIOscilloscope.cpp:5065
virtual std::vector< OscilloscopeChannel::CouplingType > GetAvailableCouplings(size_t i) override
Gets the set of legal coupling values for an input channel.
Definition: SiglentSCPIOscilloscope.cpp:989
virtual bool IsTriggerArmed() override
Checks if the trigger is currently armed.
Definition: SiglentSCPIOscilloscope.cpp:1541
virtual std::vector< DigitalBank > GetDigitalBanks() override
Gets the digital channel banks for this instrument.
Definition: SiglentSCPIOscilloscope.cpp:3913
virtual std::vector< uint64_t > GetSampleRatesNonInterleaved() override
Get the legal sampling rates (in Hz) for this scope in all-channels mode.
Definition: SiglentSCPIOscilloscope.cpp:2756
virtual float GetDigitalHysteresis(size_t channel) override
Gets the hysteresis for a digital input.
Definition: SiglentSCPIOscilloscope.cpp:3962
void PullEdgeTrigger()
Reads settings for an edge trigger from the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4194
virtual bool IsInverted(size_t i) override
Checks if hardware polarity inversion is enabled for a channel.
Definition: SiglentSCPIOscilloscope.cpp:1418
virtual bool IsInterleaving() override
Checks if the scope is currently combining channels.
Definition: SiglentSCPIOscilloscope.cpp:3747
void BulkCheckChannelEnableState()
Optimized function for checking channel enable status en masse with less round trips to the scope.
Definition: SiglentSCPIOscilloscope.cpp:1670
virtual bool HasFunctionRiseFallTimeControls(int chan) override
Determines if the function generator allows control over rise/fall times.
Definition: SiglentSCPIOscilloscope.cpp:5754
unsigned int m_maxBandwidth
Maximum bandwidth we support, in MHz.
Definition: SiglentSCPIOscilloscope.h:365
virtual bool GetFunctionChannelActive(int chan) override
Returns true if the function generator channel's output is enabled.
Definition: SiglentSCPIOscilloscope.cpp:5170
virtual void SetSampleRate(uint64_t rate) override
Sets the sample rate of the scope, in Hz.
Definition: SiglentSCPIOscilloscope.cpp:3459
void ForceHDMode(bool mode)
Forces 16-bit transfer mode on/off when for HD models.
Definition: SiglentSCPIOscilloscope.cpp:5798
virtual bool IsDigitalHysteresisConfigurable() override
Checks if digital input hysteresis is configurable or fixed.
Definition: SiglentSCPIOscilloscope.cpp:3952
void PullPulseWidthTrigger()
Reads settings for an edge trigger from the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4244
virtual WaveShape GetFunctionChannelShape(int chan) override
Gets the waveform shape for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:5363
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:3819
virtual float GetChannelVoltageRange(size_t i, size_t stream) override
Gets the range of the current channel configuration.
Definition: SiglentSCPIOscilloscope.cpp:2683
virtual void SetFunctionChannelFrequency(int chan, float hz) override
Sets the frequency for a function generator output.
Definition: SiglentSCPIOscilloscope.cpp:5305
virtual void SetChannelAttenuation(size_t i, double atten) override
Sets the probe attenuation used for an input channel.
Definition: SiglentSCPIOscilloscope.cpp:1208
virtual void SetTriggerOffset(int64_t offset) override
Sets the trigger offset.
Definition: SiglentSCPIOscilloscope.cpp:3586
virtual void SetChannelCoupling(size_t i, OscilloscopeChannel::CouplingType type) override
Sets the coupling used for an input channel.
Definition: SiglentSCPIOscilloscope.cpp:1089
virtual uint64_t GetSampleDepth() override
Gets the current sample depth of this scope.
Definition: SiglentSCPIOscilloscope.cpp:3061
void AddDigitalChannels(unsigned int count)
Creates digital channels for the oscilloscope.
Definition: SiglentSCPIOscilloscope.cpp:585
virtual OscilloscopeChannel::CouplingType GetChannelCoupling(size_t i) override
Gets the coupling used for an input channel.
Definition: SiglentSCPIOscilloscope.cpp:1036
virtual void FlushConfigCache() override
Instruments are allowed to cache configuration settings to reduce round trip queries to the device.
Definition: SiglentSCPIOscilloscope.cpp:693
void PushUartTrigger(UartTrigger *trig)
Pushes settings for a UART trigger to the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4907
virtual OscilloscopeChannel * GetExternalTrigger() override
Returns the external trigger input channel, if we have one.
Definition: SiglentSCPIOscilloscope.cpp:688
void PushPulseWidthTrigger(PulseWidthTrigger *trig)
Pushes settings for a pulse width trigger to the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4831
virtual std::vector< unsigned int > GetChannelBandwidthLimiters(size_t i) override
Gets the set of available bandwidth limiters for an input channel.
Definition: SiglentSCPIOscilloscope.cpp:1254
virtual void SetDigitalHysteresis(size_t channel, float level) override
Sets the hysteresis for a digital input.
Definition: SiglentSCPIOscilloscope.cpp:4009
virtual void SetDeskewForChannel(size_t channel, int64_t skew) override
Sets the deskew setting for a channel.
Definition: SiglentSCPIOscilloscope.cpp:3669
void PullUartTrigger()
Reads settings for a UART trigger from the instrument.
Definition: SiglentSCPIOscilloscope.cpp:4425
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