ngscopeclient v0.1
LeCroyOscilloscope.h
Go to the documentation of this file.
1/***********************************************************************************************************************
2* *
3* libscopehal *
4* *
5* Copyright (c) 2012-2025 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
37#ifndef LeCroyOscilloscope_h
38#define LeCroyOscilloscope_h
39
40#include <mutex>
41
42class DropoutTrigger;
43class EdgeTrigger;
44class GlitchTrigger;
46class RuntTrigger;
47class SlewRateTrigger;
48class UartTrigger;
49class WindowTrigger;
50class CDR8B10BTrigger;
52
61 : public virtual SCPIOscilloscope
62 , public virtual SCPIMultimeter
63 , public virtual SCPIFunctionGenerator
64{
65public:
67 virtual ~LeCroyOscilloscope();
68
69 //not copyable or assignable
70 LeCroyOscilloscope(const LeCroyOscilloscope& rhs) =delete;
71 LeCroyOscilloscope& operator=(const LeCroyOscilloscope& rhs) =delete;
72
73protected:
74 void IdentifyHardware();
75 void SharedCtorInit();
76 virtual void DetectAnalogChannels();
77 void AddDigitalChannels(unsigned int count);
78 void DetectOptions();
79
80public:
81 //Device information
82 virtual std::string GetName() const override;
83 virtual std::string GetVendor() const override;
84 virtual std::string GetSerial() const override;
85 virtual unsigned int GetInstrumentTypes() const override;
86 virtual unsigned int GetMeasurementTypes() override;
87 virtual uint32_t GetInstrumentTypesForChannel(size_t i) const override;
88
89 virtual void FlushConfigCache() override;
90
91 void ForceHDMode(bool mode);
92
93 //Channel configuration
94 virtual bool IsChannelEnabled(size_t i) override;
95 virtual void EnableChannel(size_t i) override;
96 virtual bool CanEnableChannel(size_t i) override;
97 virtual void DisableChannel(size_t i) override;
98 virtual OscilloscopeChannel::CouplingType GetChannelCoupling(size_t i) override;
99 virtual void SetChannelCoupling(size_t i, OscilloscopeChannel::CouplingType type) override;
100 virtual std::vector<OscilloscopeChannel::CouplingType> GetAvailableCouplings(size_t i) override;
101 virtual double GetChannelAttenuation(size_t i) override;
102 virtual void SetChannelAttenuation(size_t i, double atten) override;
103 virtual unsigned int GetChannelBandwidthLimit(size_t i) override;
104 virtual void SetChannelBandwidthLimit(size_t i, unsigned int limit_mhz) override;
105 virtual float GetChannelVoltageRange(size_t i, size_t stream) override;
106 virtual void SetChannelVoltageRange(size_t i, size_t stream, float range) override;
107 virtual OscilloscopeChannel* GetExternalTrigger() override;
108 virtual float GetChannelOffset(size_t i, size_t stream) override;
109 virtual void SetChannelOffset(size_t i, size_t stream, float offset) override;
110 virtual std::string GetChannelDisplayName(size_t i) override;
111 virtual void SetChannelDisplayName(size_t i, std::string name) override;
112 virtual std::vector<unsigned int> GetChannelBandwidthLimiters(size_t i) override;
113 virtual bool CanInvert(size_t i) override;
114 virtual void Invert(size_t i, bool invert) override;
115 virtual bool IsInverted(size_t i) override;
116 virtual bool CanAutoZero(size_t i) override;
117 virtual void AutoZero(size_t i) override;
118 virtual std::string GetProbeName(size_t i) override;
119 virtual bool HasInputMux(size_t i) override;
120 virtual size_t GetInputMuxSetting(size_t i) override;
121 virtual std::vector<std::string> GetInputMuxNames(size_t i) override;
122 virtual void SetInputMux(size_t i, size_t select) override;
123 virtual bool CanAverage(size_t i) override;
124 virtual size_t GetNumAverages(size_t i) override;
125 virtual void SetNumAverages(size_t i, size_t navg) override;
126
127 OscilloscopeChannel* GetACLineTrigger()
128 { return m_acLineChannel; }
129
130 OscilloscopeChannel* GetFastEdgeTrigger()
131 { return m_fastEdgeChannel; }
132
133 //Triggering
134 virtual Oscilloscope::TriggerMode PollTrigger() override;
135 virtual bool PeekTriggerArmed() override;
136 virtual bool AcquireData() override;
137 virtual void Start() override;
138 virtual void StartSingleTrigger() override;
139 virtual void Stop() override;
140 virtual void ForceTrigger() override;
141 virtual bool IsTriggerArmed() override;
142 virtual void PushTrigger() override;
143 virtual void PullTrigger() override;
144 virtual void EnableTriggerOutput() override;
145 virtual std::vector<std::string> GetTriggerTypes() override;
146 bool IsCDRLocked();
147
148 //DMM configuration
149 virtual int GetMeterChannelCount();
150 virtual int GetCurrentMeterChannel() override;
151 virtual void SetCurrentMeterChannel(int chan) override;
152 virtual void StartMeter() override;
153 virtual void StopMeter() override;
154 virtual void SetMeterAutoRange(bool enable) override;
155 virtual bool GetMeterAutoRange() override;
156 virtual double GetMeterValue() override;
157 virtual Multimeter::MeasurementTypes GetMeterMode() override;
158 virtual void SetMeterMode(Multimeter::MeasurementTypes type) override;
159 virtual int GetMeterDigits() override;
160
161 //Function generator
162 virtual std::vector<WaveShape> GetAvailableWaveformShapes(int chan) override;
163 virtual bool GetFunctionChannelActive(int chan) override;
164 virtual void SetFunctionChannelActive(int chan, bool on) override;
165 virtual float GetFunctionChannelDutyCycle(int chan) override;
166 virtual void SetFunctionChannelDutyCycle(int chan, float duty) override;
167 virtual float GetFunctionChannelAmplitude(int chan) override;
168 virtual void SetFunctionChannelAmplitude(int chan, float amplitude) override;
169 virtual float GetFunctionChannelOffset(int chan) override;
170 virtual void SetFunctionChannelOffset(int chan, float offset) override;
171 virtual float GetFunctionChannelFrequency(int chan) override;
172 virtual void SetFunctionChannelFrequency(int chan, float hz) override;
173 virtual FunctionGenerator::WaveShape GetFunctionChannelShape(int chan) override;
174 virtual void SetFunctionChannelShape(int chan, WaveShape shape) override;
175 virtual float GetFunctionChannelRiseTime(int chan) override;
176 virtual void SetFunctionChannelRiseTime(int chan, float fs) override;
177 virtual float GetFunctionChannelFallTime(int chan) override;
178 virtual void SetFunctionChannelFallTime(int chan, float fs) override;
179 virtual bool HasFunctionRiseFallTimeControls(int chan) override;
180 virtual OutputImpedance GetFunctionChannelOutputImpedance(int chan) override;
181 virtual void SetFunctionChannelOutputImpedance(int chan, OutputImpedance z) override;
182
183 //Scope models.
184 //We only distinguish down to the series of scope, exact SKU is mostly irrelevant.
185 enum Model
186 {
187 MODEL_DDA_5K,
188
189 MODEL_HDO_4KA,
190 MODEL_HDO_6KA,
191 MODEL_HDO_9K,
192
193 MODEL_LABMASTER_ZI_A,
194
195 MODEL_MDA_800,
196
197 MODEL_SDA_3K,
198
199 MODEL_SDA_7ZI,
200 MODEL_SDA_7ZI_A,
201
202 MODEL_SDA_8ZI,
203 MODEL_SDA_8ZI_A,
204 MODEL_SDA_8ZI_B,
205 MODEL_WAVEMASTER_8ZI,
206 MODEL_WAVEMASTER_8ZI_A,
207 MODEL_WAVEMASTER_8ZI_B,
208
209 MODEL_WAVEPRO_HD,
210
211 MODEL_WAVERUNNER_8K,
212 MODEL_WAVERUNNER_8K_HD,
213 MODEL_WAVERUNNER_9K,
214
215 MODEL_WAVESURFER_3K,
216
217 MODEL_UNKNOWN
218 };
219
220 Model GetModelID()
221 { return m_modelid; }
222
223 //Timebase
224 virtual std::vector<uint64_t> GetSampleRatesNonInterleaved() override;
225 virtual std::vector<uint64_t> GetSampleRatesInterleaved() override;
226 virtual std::set<InterleaveConflict> GetInterleaveConflicts() override;
227 virtual std::vector<uint64_t> GetSampleDepthsNonInterleaved() override;
228 virtual std::vector<uint64_t> GetSampleDepthsInterleaved() override;
229 virtual uint64_t GetSampleRate() override;
230 virtual uint64_t GetSampleDepth() override;
231 virtual void SetSampleDepth(uint64_t depth) override;
232 virtual void SetSampleRate(uint64_t rate) override;
233 virtual void SetUseExternalRefclk(bool external) override;
234 virtual bool IsInterleaving() override;
235 virtual bool SetInterleaving(bool combine) override;
236 virtual bool IsSamplingModeAvailable(SamplingMode mode) override;
237 virtual SamplingMode GetSamplingMode() override;
238 virtual void SetSamplingMode(SamplingMode mode) override;
239
240 //DBI mode
241 bool HasDBICapability();
242 bool IsDBIEnabled(size_t channel);
243
244 virtual void SetTriggerOffset(int64_t offset) override;
245 virtual int64_t GetTriggerOffset() override;
246 virtual void SetDeskewForChannel(size_t channel, int64_t skew) override;
247 virtual int64_t GetDeskewForChannel(size_t channel) override;
248
250 // Logic analyzer configuration
251
252 virtual std::vector<DigitalBank> GetDigitalBanks() override;
253 virtual DigitalBank GetDigitalBank(size_t channel) override;
254 virtual bool IsDigitalHysteresisConfigurable() override;
255 virtual bool IsDigitalThresholdConfigurable() override;
256 virtual float GetDigitalHysteresis(size_t channel) override;
257 virtual float GetDigitalThreshold(size_t channel) override;
258 virtual void SetDigitalHysteresis(size_t channel, float level) override;
259 virtual void SetDigitalThreshold(size_t channel, float level) override;
260
262 // ADC bit depth configuration
263
264 //All currently supported LeCroy scopes have only one analog bank (same ADC config for all channels)
265 //so no need to override those
266
267 virtual bool IsADCModeConfigurable() override;
268 virtual std::vector<std::string> GetADCModeNames(size_t channel) override;
269 virtual size_t GetADCMode(size_t channel) override;
270 virtual void SetADCMode(size_t channel, size_t mode) override;
271
272 //public so it can be called by TRCImportFilter
273 static time_t ExtractTimestamp(unsigned char* wavedesc, double& basetime);
274
275protected:
276
277 //Trigger config
278 void Pull8b10bTrigger();
279 void Pull64b66bTrigger();
280 void PullNRZTrigger();
281 void PullDropoutTrigger();
282 void PullEdgeTrigger();
283 void PullGlitchTrigger();
285 void PullRuntTrigger();
286 void PullSlewRateTrigger();
287 void PullUartTrigger();
288 void PullWindowTrigger();
289 void PullTriggerSource(Trigger* trig);
290
291 void GetTriggerSlope(EdgeTrigger* trig, std::string reply);
292 Trigger::Condition GetCondition(std::string reply);
293
297 void PushEdgeTrigger(EdgeTrigger* trig, const std::string& tree);
299 void PushCondition(const std::string& path, Trigger::Condition cond);
300 void PushPatternCondition(const std::string& path, Trigger::Condition cond);
301 void PushFloat(std::string path, float f);
303 void PushRuntTrigger(RuntTrigger* trig);
305 void PushUartTrigger(UartTrigger* trig);
307
308 bool IsValid8B10BKCharacter(int code5, int code3);
309
311
313
314 std::string GetPossiblyEmptyString(const std::string& property);
315
316 bool ReadWaveformBlock(std::string& data);
317 bool ReadWavedescs(
318 std::vector<std::string>& wavedescs,
319 bool* enabled,
320 unsigned int& firstEnabledChannel,
321 bool& any_enabled);
322 void RequestWaveforms(bool* enabled, uint32_t num_sequences, bool denabled);
323 std::vector<WaveformBase*> ProcessAnalogWaveform(
324 const char* data,
325 size_t datalen,
326 std::string& wavedesc,
327 uint32_t num_sequences,
328 time_t ttime,
329 double basetime,
330 double* wavetime
331 );
332 std::map<int, SparseDigitalWaveform*> ProcessDigitalWaveform(std::string& data, int64_t analog_hoff);
333
334 //hardware analog channel count, independent of LA option etc
335 unsigned int m_analogChannelCount;
336 unsigned int m_digitalChannelCount;
337 size_t m_digitalChannelBase;
338
339 Model m_modelid;
340
341 //set of SW/HW options we have
342 bool m_hasLA;
343 bool m_hasDVM;
344 bool m_hasFunctionGen;
345 bool m_hasFastSampleRate; //-M models
346 int m_memoryDepthOption; //0 = base, after that number is max sample count in millions
347 bool m_hasI2cTrigger;
348 bool m_hasSpiTrigger;
349 bool m_hasUartTrigger;
350 bool m_has8b10bTrigger;
351 bool m_hasNrzTrigger;
352 bool m_hasXdev;
353
355 unsigned int m_maxBandwidth;
356
359
362
365
366 //Cached configuration
367 std::map<size_t, float> m_channelVoltageRanges;
368 std::map<size_t, float> m_channelOffsets;
369 std::map<size_t, float> m_channelDigitalThresholds;
370 std::map<size_t, size_t> m_channelNavg;
371 std::map<int, bool> m_channelsEnabled;
372 bool m_sampleRateValid;
373 int64_t m_sampleRate;
374 bool m_memoryDepthValid;
375 int64_t m_memoryDepth;
376 bool m_triggerOffsetValid;
377 int64_t m_triggerOffset;
378 std::map<size_t, int64_t> m_channelDeskew;
379 bool m_interleaving;
380 bool m_interleavingValid;
381 Multimeter::MeasurementTypes m_meterMode;
382 bool m_meterModeValid;
383 std::map<size_t, bool> m_probeIsActive;
384 std::map<size_t, bool> m_channelIsInverted;
386
387 //True if we have >8 bit capture depth
388 bool m_highDefinition;
389
392
395
398
399 FunctionGeneratorChannel* m_awgChannel;
400 std::vector<OscilloscopeChannel*> m_digitalChannels;
401
402public:
403 static std::string GetDriverNameInternal();
404 OSCILLOSCOPE_INITPROC(LeCroyOscilloscope)
405};
406#endif
A hardware 8B/10B pattern trigger.
Definition: CDR8B10BTrigger.h:46
A hardware NRZ pattern trigger.
Definition: CDRNRZPatternTrigger.h:49
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 Teledyne LeCroy oscilloscope using the MAUI/XStream command set.
Definition: LeCroyOscilloscope.h:64
virtual void SetFunctionChannelAmplitude(int chan, float amplitude) override
Sets the amplitude for a function generator output.
Definition: LeCroyOscilloscope.cpp:2131
virtual void SetADCMode(size_t channel, size_t mode) override
Sets the ADC mode for a channel.
Definition: LeCroyOscilloscope.cpp:4096
virtual std::vector< std::string > GetInputMuxNames(size_t i) override
Gets names for the input mux ports of a channel.
Definition: LeCroyOscilloscope.cpp:1830
void PullDropoutTrigger()
Reads settings for a dropout trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4570
virtual Oscilloscope::TriggerMode PollTrigger() override
Checks the curent trigger status.
Definition: LeCroyOscilloscope.cpp:2274
virtual void SetSampleRate(uint64_t rate) override
Sets the sample rate of the scope, in Hz.
Definition: LeCroyOscilloscope.cpp:3700
virtual void SetInputMux(size_t i, size_t select) override
Sets the input mux for a channel.
Definition: LeCroyOscilloscope.cpp:1842
virtual void SetTriggerOffset(int64_t offset) override
Sets the trigger offset.
Definition: LeCroyOscilloscope.cpp:3779
bool m_triggerOneShot
True if current trigger is a single-shot and should not re-arm.
Definition: LeCroyOscilloscope.h:364
virtual double GetChannelAttenuation(size_t i) override
Gets the probe attenuation for an input channel.
Definition: LeCroyOscilloscope.cpp:1444
virtual bool IsDigitalThresholdConfigurable() override
Checks if digital input threshold is configurable or fixed.
Definition: LeCroyOscilloscope.cpp:4163
virtual uint64_t GetSampleDepth() override
Gets the current sample depth of this scope.
Definition: LeCroyOscilloscope.cpp:3659
virtual void PushTrigger() override
Pushes changes made to m_trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:5008
virtual size_t GetNumAverages(size_t i) override
Returns the number of averages the channel is configured for.
Definition: LeCroyOscilloscope.cpp:3714
void PushGlitchTrigger(GlitchTrigger *trig)
Pushes settings for a glitch trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:5434
virtual DigitalBank GetDigitalBank(size_t channel) override
Gets the bank containing a given channel.
Definition: LeCroyOscilloscope.cpp:4139
virtual void EnableTriggerOutput() override
Enables the trigger output, configuring a shared auxiliary port for this purpose if needed.
Definition: LeCroyOscilloscope.cpp:3749
Trigger::Condition GetCondition(std::string reply)
Parses a trigger condition.
Definition: LeCroyOscilloscope.cpp:4991
virtual void SetFunctionChannelRiseTime(int chan, float fs) override
Sets the rise time for a function generator output (if supported)
Definition: LeCroyOscilloscope.cpp:2227
virtual std::vector< uint64_t > GetSampleDepthsNonInterleaved() override
Get the legal memory depths for this scope in all-channels mode.
Definition: LeCroyOscilloscope.cpp:3384
virtual SamplingMode GetSamplingMode() override
Gets the current sampling mode of the instrument.
Definition: LeCroyOscilloscope.cpp:3961
virtual void DetectAnalogChannels()
Figures out how many analog channels we have, and add them to the device.
Definition: LeCroyOscilloscope.cpp:910
void Pull8b10bTrigger()
Reads settings for an 8B/10B trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4357
virtual void StartSingleTrigger() override
Arms the trigger for a single acquistion.
Definition: LeCroyOscilloscope.cpp:3053
virtual int GetMeterDigits() override
Returns the digit resolution of the meter.
Definition: LeCroyOscilloscope.cpp:1934
OscilloscopeChannel * m_extTrigChannel
External trigger input.
Definition: LeCroyOscilloscope.h:391
virtual void Start() override
Starts the instrument in continuous trigger mode.
Definition: LeCroyOscilloscope.cpp:3045
virtual bool IsInterleaving() override
Checks if the scope is currently combining channels.
Definition: LeCroyOscilloscope.cpp:3873
virtual void ForceTrigger() override
Forces a single acquisition as soon as possible.
Definition: LeCroyOscilloscope.cpp:3072
virtual void SetChannelAttenuation(size_t i, double atten) override
Sets the probe attenuation used for an input channel.
Definition: LeCroyOscilloscope.cpp:1460
virtual double GetMeterValue() override
Get the value of the primary measurement.
Definition: LeCroyOscilloscope.cpp:1965
virtual std::vector< OscilloscopeChannel::CouplingType > GetAvailableCouplings(size_t i) override
Gets the set of legal coupling values for an input channel.
Definition: LeCroyOscilloscope.cpp:1352
virtual void SetSamplingMode(SamplingMode mode) override
Sets the current sampling mode of the instrument.
Definition: LeCroyOscilloscope.cpp:3975
virtual unsigned int GetInstrumentTypes() const override
See what features we have.
Definition: LeCroyOscilloscope.cpp:1113
bool IsCDRLocked()
Checks if the hardware CDR trigger is locked.
Definition: LeCroyOscilloscope.cpp:5696
virtual void Stop() override
Stops triggering.
Definition: LeCroyOscilloscope.cpp:3061
void AddDigitalChannels(unsigned int count)
Creates digital channels for the oscilloscope.
Definition: LeCroyOscilloscope.cpp:866
virtual bool IsChannelEnabled(size_t i) override
Checks if a channel is enabled in hardware.
Definition: LeCroyOscilloscope.cpp:1155
virtual void SetFunctionChannelOffset(int chan, float offset) override
Sets the DC offset for a function generator output.
Definition: LeCroyOscilloscope.cpp:2143
virtual std::vector< DigitalBank > GetDigitalBanks() override
Gets the digital channel banks for this instrument.
Definition: LeCroyOscilloscope.cpp:4119
virtual bool IsTriggerArmed() override
Checks if the trigger is currently armed.
Definition: LeCroyOscilloscope.cpp:2269
virtual float GetFunctionChannelFrequency(int chan) override
Gets the frequency for a function generator output.
Definition: LeCroyOscilloscope.cpp:2149
virtual int64_t GetTriggerOffset() override
Gets the trigger offset.
Definition: LeCroyOscilloscope.cpp:3797
void PushSlewRateTrigger(SlewRateTrigger *trig)
Pushes settings for a slew rate trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:5463
void OnCDRTriggerAutoBaud()
Automatic baud rate configuration.
Definition: LeCroyOscilloscope.cpp:4550
virtual std::vector< uint64_t > GetSampleRatesNonInterleaved() override
Get the legal sampling rates (in Hz) for this scope in all-channels mode.
Definition: LeCroyOscilloscope.cpp:3158
virtual void SetFunctionChannelDutyCycle(int chan, float duty) override
Sets the duty cycle for a function generator output.
Definition: LeCroyOscilloscope.cpp:2119
virtual float GetDigitalHysteresis(size_t channel) override
Gets the hysteresis for a digital input.
Definition: LeCroyOscilloscope.cpp:4168
virtual bool SetInterleaving(bool combine) override
Configures the scope to combine channels.
Definition: LeCroyOscilloscope.cpp:3903
virtual void SetFunctionChannelFallTime(int chan, float fs) override
Sets the fall time for a function generator output (if supported)
Definition: LeCroyOscilloscope.cpp:2241
virtual void Invert(size_t i, bool invert) override
Enables hardware polarity inversion for a channel, if supported.
Definition: LeCroyOscilloscope.cpp:1669
OscilloscopeChannel * m_fastEdgeChannel
Internal "fast edge" trigger source.
Definition: LeCroyOscilloscope.h:397
void PullPulseWidthTrigger()
Reads settings for an edge trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4691
virtual FunctionGenerator::WaveShape GetFunctionChannelShape(int chan) override
Gets the waveform shape for a function generator output.
Definition: LeCroyOscilloscope.cpp:2161
OscilloscopeChannel * m_acLineChannel
Internal "AC line" trigger source.
Definition: LeCroyOscilloscope.h:394
virtual float GetChannelOffset(size_t i, size_t stream) override
Gets the offset, in volts, for a given channel.
Definition: LeCroyOscilloscope.cpp:3081
virtual void SetChannelOffset(size_t i, size_t stream, float offset) override
Sets the offset for a given channel.
Definition: LeCroyOscilloscope.cpp:3108
virtual void SetChannelCoupling(size_t i, OscilloscopeChannel::CouplingType type) override
Sets the coupling used for an input channel.
Definition: LeCroyOscilloscope.cpp:1409
virtual void SetNumAverages(size_t i, size_t navg) override
Sets the number of hardware averages to use.
Definition: LeCroyOscilloscope.cpp:3735
virtual bool IsADCModeConfigurable() override
Returns true if the ADC is configurable, false if it can only run in one mode.
Definition: LeCroyOscilloscope.cpp:4068
void PullNRZTrigger()
Reads settings for an NRZ pattern trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4304
void PullEdgeTrigger()
Reads settings for an edge trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4611
virtual float GetDigitalThreshold(size_t channel) override
Gets the threshold for a digital input.
Definition: LeCroyOscilloscope.cpp:4182
void BulkCheckChannelEnableState()
Optimized function for checking channel enable status en masse with less round trips to the scope.
Definition: LeCroyOscilloscope.cpp:2376
virtual void AutoZero(size_t i) override
Performs an "auto zero" cycle on the attached active probe, if supported by the hardware.
Definition: LeCroyOscilloscope.cpp:1775
virtual OutputImpedance GetFunctionChannelOutputImpedance(int chan) override
Gets the currently selected output impedance for a function generator output (if supported)
Definition: LeCroyOscilloscope.cpp:2249
virtual void SetDeskewForChannel(size_t channel, int64_t skew) override
Sets the deskew setting for a channel.
Definition: LeCroyOscilloscope.cpp:3826
void PushWindowTrigger(WindowTrigger *trig)
Pushes settings for a window trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:5577
virtual int64_t GetDeskewForChannel(size_t channel) override
Gets the deskew setting for a channel.
Definition: LeCroyOscilloscope.cpp:3844
void Push8b10bTrigger(CDR8B10BTrigger *trig)
Pushes settings for an 8B/10B trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:5134
virtual std::vector< uint64_t > GetSampleDepthsInterleaved() override
Get the legal memory depths for this scope in combined-channels mode.
Definition: LeCroyOscilloscope.cpp:3567
void Pull64b66bTrigger()
Reads settings for a 64b66b pattern trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4329
bool m_triggerReallyArmed
True if the scope has reported it is in fact in the arm state.
Definition: LeCroyOscilloscope.h:361
virtual size_t GetADCMode(size_t channel) override
Gets the ADC mode for a channel.
Definition: LeCroyOscilloscope.cpp:4082
virtual float GetFunctionChannelOffset(int chan) override
Gets the DC offset for a function generator output.
Definition: LeCroyOscilloscope.cpp:2137
void PushPulseWidthTrigger(PulseWidthTrigger *trig)
Pushes settings for a pulse width trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:5423
void GetTriggerSlope(EdgeTrigger *trig, std::string reply)
Processes the slope for an edge or edge-derived trigger.
Definition: LeCroyOscilloscope.cpp:4974
void PullGlitchTrigger()
Reads settings for a glitch trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4652
virtual unsigned int GetChannelBandwidthLimit(size_t i) override
Gets the bandwidth limit for an input channel.
Definition: LeCroyOscilloscope.cpp:1606
unsigned int m_maxBandwidth
Maximum bandwidth we support, in MHz.
Definition: LeCroyOscilloscope.h:355
void PushRuntTrigger(RuntTrigger *trig)
Pushes settings for a runt trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:5445
virtual bool AcquireData() override
Pull data from the instrument.
Definition: LeCroyOscilloscope.cpp:2817
void PullSlewRateTrigger()
Reads settings for a slew rate trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4778
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: LeCroyOscilloscope.cpp:1862
virtual OscilloscopeChannel * GetExternalTrigger() override
Returns the external trigger input channel, if we have one.
Definition: LeCroyOscilloscope.cpp:1059
virtual float GetFunctionChannelRiseTime(int chan) override
Gets the rise time for a function generator output (if supported)
Definition: LeCroyOscilloscope.cpp:2221
virtual void SetFunctionChannelOutputImpedance(int chan, OutputImpedance z) override
Sets the currently selected output impedance for a function generator output (if supported)
Definition: LeCroyOscilloscope.cpp:2258
virtual void SetDigitalThreshold(size_t channel, float level) override
Gets the threshold for a digital input.
Definition: LeCroyOscilloscope.cpp:4220
void PushEdgeTrigger(EdgeTrigger *trig, const std::string &tree)
Pushes settings for an edge trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:5381
virtual void SetChannelBandwidthLimit(size_t i, unsigned int limit_mhz) override
Sets the bandwidth limit for an input channel.
Definition: LeCroyOscilloscope.cpp:1650
virtual uint32_t GetInstrumentTypesForChannel(size_t i) const override
Returns a bitfield describing the set of instrument types that a given channel supports.
Definition: LeCroyOscilloscope.cpp:1123
std::string GetPossiblyEmptyString(const std::string &property)
Get an.
Definition: LeCroyOscilloscope.cpp:1921
virtual bool GetFunctionChannelActive(int chan) override
Returns true if the function generator channel's output is enabled.
Definition: LeCroyOscilloscope.cpp:2096
virtual void DisableChannel(size_t i) override
Turn a channel off, given the index.
Definition: LeCroyOscilloscope.cpp:1321
void PushDropoutTrigger(DropoutTrigger *trig)
Pushes settings for a dropout trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:5362
virtual void SetFunctionChannelActive(int chan, bool on) override
Turns a function generator channel on or off.
Definition: LeCroyOscilloscope.cpp:2105
virtual bool CanAutoZero(size_t i) override
Determines if a channel has a probe connected which supports the "auto zero" feature.
Definition: LeCroyOscilloscope.cpp:1733
virtual bool HasInputMux(size_t i) override
Checks if a channel has an input multiplexer.
Definition: LeCroyOscilloscope.cpp:1789
virtual float GetFunctionChannelAmplitude(int chan) override
Gets the amplitude for a function generator output.
Definition: LeCroyOscilloscope.cpp:2125
virtual bool IsSamplingModeAvailable(SamplingMode mode) override
Returns true if the requested sampling mode is available with the current instrument configuration.
Definition: LeCroyOscilloscope.cpp:3940
virtual void PullTrigger() override
Updates m_trigger with any changes made from the instrument side.
Definition: LeCroyOscilloscope.cpp:4236
virtual void SetChannelVoltageRange(size_t i, size_t stream, float range) override
Sets the range of the current channel configuration.
Definition: LeCroyOscilloscope.cpp:3148
bool m_triggerArmed
True if we have sent an arm command to the scope (may not have executed yet)
Definition: LeCroyOscilloscope.h:358
virtual void FlushConfigCache() override
Instruments are allowed to cache configuration settings to reduce round trip queries to the device.
Definition: LeCroyOscilloscope.cpp:1064
virtual void EnableChannel(size_t i) override
Turn a channel on, given the index.
Definition: LeCroyOscilloscope.cpp:1216
virtual bool CanInvert(size_t i) override
Checks if a channel is capable of hardware polarity inversion.
Definition: LeCroyOscilloscope.cpp:1663
void PushUartTrigger(UartTrigger *trig)
Pushes settings for a UART trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:5481
virtual void SetUseExternalRefclk(bool external) override
Configures the instrument's clock source.
Definition: LeCroyOscilloscope.cpp:3771
virtual unsigned int GetMeasurementTypes() override
See what measurement capabilities we have.
Definition: LeCroyOscilloscope.cpp:1097
void PushCondition(const std::string &path, Trigger::Condition cond)
Pushes settings for a trigger condition under a .Condition field.
Definition: LeCroyOscilloscope.cpp:5587
virtual float GetFunctionChannelFallTime(int chan) override
Gets the fall time for a function generator output (if supported)
Definition: LeCroyOscilloscope.cpp:2235
virtual std::vector< std::string > GetTriggerTypes() override
Gets a list of triggers this instrument supports.
Definition: LeCroyOscilloscope.cpp:5672
void PushNRZTrigger(CDRNRZPatternTrigger *trig)
Pushes settings for a NRZ pattern trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:5104
virtual bool IsDigitalHysteresisConfigurable() override
Checks if digital input hysteresis is configurable or fixed.
Definition: LeCroyOscilloscope.cpp:4158
virtual uint64_t GetSampleRate() override
Gets the current sampling rate (in Hz) of this scope.
Definition: LeCroyOscilloscope.cpp:3645
virtual std::vector< WaveShape > GetAvailableWaveformShapes(int chan) override
Query the set of available pre-defined waveforms for this generator.
Definition: LeCroyOscilloscope.cpp:2084
virtual bool HasFunctionRiseFallTimeControls(int chan) override
Determines if the function generator allows control over rise/fall times.
Definition: LeCroyOscilloscope.cpp:2216
virtual float GetChannelVoltageRange(size_t i, size_t stream) override
Gets the range of the current channel configuration.
Definition: LeCroyOscilloscope.cpp:3125
virtual float GetFunctionChannelDutyCycle(int chan) override
Gets the duty cycle for a function generator output.
Definition: LeCroyOscilloscope.cpp:2113
void PullWindowTrigger()
Reads settings for a window trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4946
virtual size_t GetInputMuxSetting(size_t i) override
Gets the setting for a channel's input mux (if it has one)
Definition: LeCroyOscilloscope.cpp:1810
virtual void SetSampleDepth(uint64_t depth) override
Sets the sample depth of the scope.
Definition: LeCroyOscilloscope.cpp:3680
float GetTriggerLevelWithInversion(Trigger *trig)
Returns the trigger level after correcting for optional frontend inversion.
Definition: LeCroyOscilloscope.cpp:5350
virtual void SetFunctionChannelFrequency(int chan, float hz) override
Sets the frequency for a function generator output.
Definition: LeCroyOscilloscope.cpp:2155
virtual std::string GetChannelDisplayName(size_t i) override
Gets the hardware display name for a channel. This is an arbitrary user-selected string.
Definition: LeCroyOscilloscope.cpp:1884
virtual bool CanAverage(size_t i) override
Determines if the channel supports hardware averaging.
Definition: LeCroyOscilloscope.cpp:3709
void ForceHDMode(bool mode)
Forces 16-bit transfer mode on/off when connecting to a scope regardless of ADC resolution.
Definition: LeCroyOscilloscope.cpp:5717
void PullTriggerSource(Trigger *trig)
Reads the source of a trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4290
virtual bool CanEnableChannel(size_t i) override
Determines if a channel can be enabled.
Definition: LeCroyOscilloscope.cpp:1270
bool IsValid8B10BKCharacter(int code5, int code3)
Check if a candidate 8b10b character is a valid K code point.
Definition: LeCroyOscilloscope.cpp:5113
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: LeCroyOscilloscope.cpp:4074
void PullRuntTrigger()
Reads settings for a runt-pulse trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4730
virtual std::string GetProbeName(size_t i) override
Returns the name of the probe connected to the scope, if possible.
Definition: LeCroyOscilloscope.cpp:1712
virtual std::vector< uint64_t > GetSampleRatesInterleaved() override
Get the legal sampling rates (in Hz) for this scope in combined-channels mode.
Definition: LeCroyOscilloscope.cpp:3359
virtual std::vector< unsigned int > GetChannelBandwidthLimiters(size_t i) override
Gets the set of available bandwidth limiters for an input channel.
Definition: LeCroyOscilloscope.cpp:1481
virtual void SetFunctionChannelShape(int chan, WaveShape shape) override
Sets the waveform shape for a function generator output.
Definition: LeCroyOscilloscope.cpp:2183
virtual OscilloscopeChannel::CouplingType GetChannelCoupling(size_t i) override
Gets the coupling used for an input channel.
Definition: LeCroyOscilloscope.cpp:1375
virtual bool IsInverted(size_t i) override
Checks if hardware polarity inversion is enabled for a channel.
Definition: LeCroyOscilloscope.cpp:1688
void PushPatternCondition(const std::string &path, Trigger::Condition cond)
Pushes settings for a trigger condition under a .PatternOperator field.
Definition: LeCroyOscilloscope.cpp:5616
void PullUartTrigger()
Reads settings for a UART trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4825
virtual bool PeekTriggerArmed() override
Checks if the trigger is armed directly on the instrument, without altering internal state or touchin...
Definition: LeCroyOscilloscope.cpp:2310
virtual void SetDigitalHysteresis(size_t channel, float level) override
Sets the hysteresis for a digital input.
Definition: LeCroyOscilloscope.cpp:4207
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 multimeter.
Definition: SCPIMultimeter.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
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