ngscopeclient v0.2.1
Loading...
Searching...
No Matches
LeCroyOscilloscope.h
Go to the documentation of this file.
1/***********************************************************************************************************************
2* *
3* libscopehal *
4* *
5* Copyright (c) 2012-2026 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
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;
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;
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 MODEL_SDA_6K,
199
200 MODEL_SDA_7ZI,
201 MODEL_SDA_7ZI_A,
202
203 MODEL_SDA_8ZI,
204 MODEL_SDA_8ZI_A,
205 MODEL_SDA_8ZI_B,
206 MODEL_WAVEMASTER_8ZI,
207 MODEL_WAVEMASTER_8ZI_A,
208 MODEL_WAVEMASTER_8ZI_B,
209
210 MODEL_WAVEPRO_HD,
211
212 MODEL_WAVERUNNER_8K,
213 MODEL_WAVERUNNER_8K_HD,
214 MODEL_WAVERUNNER_9K,
215
216 MODEL_WAVESURFER_3K,
217
218 MODEL_UNKNOWN
219 };
220
221 Model GetModelID()
222 { return m_modelid; }
223
224 //Timebase
225 virtual std::vector<uint64_t> GetSampleRatesNonInterleaved() override;
226 virtual std::vector<uint64_t> GetSampleRatesInterleaved() override;
227 virtual std::set<InterleaveConflict> GetInterleaveConflicts() override;
228 virtual std::vector<uint64_t> GetSampleDepthsNonInterleaved() override;
229 virtual std::vector<uint64_t> GetSampleDepthsInterleaved() override;
230 virtual uint64_t GetSampleRate() override;
231 virtual uint64_t GetSampleDepth() override;
232 virtual void SetSampleDepth(uint64_t depth) override;
233 virtual void SetSampleRate(uint64_t rate) override;
234 virtual void SetUseExternalRefclk(bool external) override;
235 virtual bool IsInterleaving() override;
236 virtual bool SetInterleaving(bool combine) override;
237 virtual bool IsSamplingModeAvailable(SamplingMode mode) override;
238 virtual SamplingMode GetSamplingMode() override;
239 virtual void SetSamplingMode(SamplingMode mode) override;
240
241 //DBI mode
242 bool HasDBICapability();
243 bool IsDBIEnabled(size_t channel);
244
245 virtual void SetTriggerOffset(int64_t offset) override;
246 virtual int64_t GetTriggerOffset() override;
247 virtual void SetDeskewForChannel(size_t channel, int64_t skew) override;
248 virtual int64_t GetDeskewForChannel(size_t channel) override;
249
251 // Logic analyzer configuration
252
253 virtual std::vector<DigitalBank> GetDigitalBanks() override;
254 virtual DigitalBank GetDigitalBank(size_t channel) override;
255 virtual bool IsDigitalHysteresisConfigurable() override;
256 virtual bool IsDigitalThresholdConfigurable() override;
257 virtual float GetDigitalHysteresis(size_t channel) override;
258 virtual float GetDigitalThreshold(size_t channel) override;
259 virtual void SetDigitalHysteresis(size_t channel, float level) override;
260 virtual void SetDigitalThreshold(size_t channel, float level) override;
261
263 // ADC bit depth configuration
264
265 //All currently supported LeCroy scopes have only one analog bank (same ADC config for all channels)
266 //so no need to override those
267
268 virtual bool IsADCModeConfigurable() override;
269 virtual std::vector<std::string> GetADCModeNames(size_t channel) override;
270 virtual size_t GetADCMode(size_t channel) override;
271 virtual void SetADCMode(size_t channel, size_t mode) override;
272
273 //public so it can be called by TRCImportFilter
274 static time_t ExtractTimestamp(unsigned char* wavedesc, double& basetime);
275
276protected:
277
278 //Trigger config
279 void Pull8b10bTrigger();
280 void Pull64b66bTrigger();
281 void PullNRZTrigger();
282 void PullDropoutTrigger();
283 void PullEdgeTrigger();
284 void PullGlitchTrigger();
286 void PullRuntTrigger();
287 void PullSlewRateTrigger();
288 void PullUartTrigger();
289 void PullWindowTrigger();
291
292 void GetTriggerSlope(EdgeTrigger* trig, std::string reply);
294
298 void PushEdgeTrigger(EdgeTrigger* trig, const std::string& tree);
300 void PushCondition(const std::string& path, Trigger::Condition cond);
301 void PushPatternCondition(const std::string& path, Trigger::Condition cond);
302 void PushFloat(const std::string& path, float f);
308
309 bool IsValid8B10BKCharacter(int code5, int code3);
310
312
314
315 std::string GetPossiblyEmptyString(const std::string& property);
316
317 bool ReadWaveformBlock(std::string& data);
318 bool ReadWavedescs(
319 std::vector<std::string>& wavedescs,
320 bool* enabled,
321 unsigned int& firstEnabledChannel,
322 bool& any_enabled);
323 void RequestWaveforms(bool* enabled, uint32_t num_sequences, bool denabled);
324 std::vector<WaveformBase*> ProcessAnalogWaveform(
326 size_t datalen,
327 std::string& wavedesc,
330 double basetime,
331 double* wavetime
332 );
333 std::map<int, SparseDigitalWaveform*> ProcessDigitalWaveform(std::string& data, int64_t analog_hoff);
334
335 //hardware analog channel count, independent of LA option etc
336 unsigned int m_analogChannelCount;
337 unsigned int m_digitalChannelCount;
338 size_t m_digitalChannelBase;
339
340 Model m_modelid;
341
342 //set of SW/HW options we have
343 bool m_hasLA;
344 bool m_hasDVM;
345 bool m_hasFunctionGen;
346 bool m_hasFastSampleRate; //-M models
347 int m_memoryDepthOption; //0 = base, after that number is max sample count in millions
348 bool m_hasI2cTrigger;
349 bool m_hasSpiTrigger;
350 bool m_hasUartTrigger;
351 bool m_has8b10bTrigger;
352 bool m_hasNrzTrigger;
353 bool m_hasXdev;
354
356 unsigned int m_maxBandwidth;
357
360
361 //Cached configuration
362 std::map<size_t, float> m_channelVoltageRanges;
363 std::map<size_t, float> m_channelOffsets;
364 std::map<size_t, float> m_channelDigitalThresholds;
365 std::map<size_t, size_t> m_channelNavg;
366 std::map<int, bool> m_channelsEnabled;
367 bool m_sampleRateValid;
368 int64_t m_sampleRate;
369 bool m_memoryDepthValid;
370 int64_t m_memoryDepth;
371 bool m_triggerOffsetValid;
372 int64_t m_triggerOffset;
373 std::map<size_t, int64_t> m_channelDeskew;
374 bool m_interleaving;
375 bool m_interleavingValid;
376 Multimeter::MeasurementTypes m_meterMode;
377 bool m_meterModeValid;
378 std::map<size_t, bool> m_probeIsActive;
379 std::map<size_t, bool> m_channelIsInverted;
381
382 //True if we have >8 bit capture depth
383 bool m_highDefinition;
384
387
390
393
394 FunctionGeneratorChannel* m_awgChannel;
395 std::vector<OscilloscopeChannel*> m_digitalChannels;
396
398 std::unique_ptr<ComputePipeline> m_conversion8BitPipeline;
399
401 std::unique_ptr<ComputePipeline> m_conversion16BitPipeline;
402
404 std::map<int, AcceleratorBuffer<uint8_t> > m_rawWaveformBuffers;
405
406public:
407 static std::string GetDriverNameInternal();
408 OSCILLOSCOPE_INITPROC(LeCroyOscilloscope)
409};
410#endif
Definition AcceleratorBuffer.h:204
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:2159
virtual void SetADCMode(size_t channel, size_t mode) override
Sets the ADC mode for a channel.
Definition LeCroyOscilloscope.cpp:4199
virtual std::vector< std::string > GetInputMuxNames(size_t i) override
Gets names for the input mux ports of a channel.
Definition LeCroyOscilloscope.cpp:1858
void PullDropoutTrigger()
Reads settings for a dropout trigger from the instrument.
Definition LeCroyOscilloscope.cpp:4673
virtual Oscilloscope::TriggerMode PollTrigger() override
Checks the curent trigger status.
Definition LeCroyOscilloscope.cpp:2302
virtual void SetSampleRate(uint64_t rate) override
Sets the sample rate of the scope, in Hz.
Definition LeCroyOscilloscope.cpp:3790
virtual void SetInputMux(size_t i, size_t select) override
Sets the input mux for a channel.
Definition LeCroyOscilloscope.cpp:1870
virtual void SetTriggerOffset(int64_t offset) override
Sets the trigger offset.
Definition LeCroyOscilloscope.cpp:3882
virtual double GetChannelAttenuation(size_t i) override
Gets the probe attenuation for an input channel.
Definition LeCroyOscilloscope.cpp:1465
virtual bool IsDigitalThresholdConfigurable() override
Checks if digital input threshold is configurable or fixed.
Definition LeCroyOscilloscope.cpp:4266
virtual uint64_t GetSampleDepth() override
Gets the current sample depth of this scope.
Definition LeCroyOscilloscope.cpp:3749
virtual void PushTrigger() override
Pushes changes made to m_trigger to the instrument.
Definition LeCroyOscilloscope.cpp:5111
virtual size_t GetNumAverages(size_t i) override
Returns the number of averages the channel is configured for.
Definition LeCroyOscilloscope.cpp:3808
void PushGlitchTrigger(GlitchTrigger *trig)
Pushes settings for a glitch trigger to the instrument.
Definition LeCroyOscilloscope.cpp:5537
virtual DigitalBank GetDigitalBank(size_t channel) override
Gets the bank containing a given channel.
Definition LeCroyOscilloscope.cpp:4242
virtual void EnableTriggerOutput() override
Enables the trigger output, configuring a shared auxiliary port for this purpose if needed.
Definition LeCroyOscilloscope.cpp:3851
Trigger::Condition GetCondition(std::string reply)
Parses a trigger condition.
Definition LeCroyOscilloscope.cpp:5094
virtual void SetFunctionChannelRiseTime(int chan, float fs) override
Sets the rise time for a function generator output (if supported)
Definition LeCroyOscilloscope.cpp:2255
virtual std::vector< uint64_t > GetSampleDepthsNonInterleaved() override
Get the legal memory depths for this scope in all-channels mode.
Definition LeCroyOscilloscope.cpp:3468
virtual SamplingMode GetSamplingMode() override
Gets the current sampling mode of the instrument.
Definition LeCroyOscilloscope.cpp:4064
virtual void DetectAnalogChannels()
Figures out how many analog channels we have, and add them to the device.
Definition LeCroyOscilloscope.cpp:928
void Pull8b10bTrigger()
Reads settings for an 8B/10B trigger from the instrument.
Definition LeCroyOscilloscope.cpp:4460
virtual void StartSingleTrigger() override
Arms the trigger for a single acquistion.
Definition LeCroyOscilloscope.cpp:3127
virtual int GetMeterDigits() override
Returns the digit resolution of the meter.
Definition LeCroyOscilloscope.cpp:1962
OscilloscopeChannel * m_extTrigChannel
External trigger input.
Definition LeCroyOscilloscope.h:386
virtual void Start() override
Starts the instrument in continuous trigger mode.
Definition LeCroyOscilloscope.cpp:3119
virtual bool IsInterleaving() override
Checks if the scope is currently combining channels.
Definition LeCroyOscilloscope.cpp:3976
virtual void ForceTrigger() override
Forces a single acquisition as soon as possible.
Definition LeCroyOscilloscope.cpp:3146
virtual void SetChannelAttenuation(size_t i, double atten) override
Sets the probe attenuation used for an input channel.
Definition LeCroyOscilloscope.cpp:1481
virtual double GetMeterValue() override
Get the value of the primary measurement.
Definition LeCroyOscilloscope.cpp:1993
virtual std::vector< OscilloscopeChannel::CouplingType > GetAvailableCouplings(size_t i) override
Gets the set of legal coupling values for an input channel.
Definition LeCroyOscilloscope.cpp:1373
virtual void SetSamplingMode(SamplingMode mode) override
Sets the current sampling mode of the instrument.
Definition LeCroyOscilloscope.cpp:4078
virtual unsigned int GetInstrumentTypes() const override
See what features we have.
Definition LeCroyOscilloscope.cpp:1132
std::unique_ptr< ComputePipeline > m_conversion16BitPipeline
Compute pipeline for converting raw ADC codes to float32 samples.
Definition LeCroyOscilloscope.h:401
bool IsCDRLocked()
Checks if the hardware CDR trigger is locked.
Definition LeCroyOscilloscope.cpp:5799
virtual void Stop() override
Stops triggering.
Definition LeCroyOscilloscope.cpp:3135
void AddDigitalChannels(unsigned int count)
Creates digital channels for the oscilloscope.
Definition LeCroyOscilloscope.cpp:884
virtual bool IsChannelEnabled(size_t i) override
Checks if a channel is enabled in hardware.
Definition LeCroyOscilloscope.cpp:1174
virtual void SetFunctionChannelOffset(int chan, float offset) override
Sets the DC offset for a function generator output.
Definition LeCroyOscilloscope.cpp:2171
virtual std::vector< DigitalBank > GetDigitalBanks() override
Gets the digital channel banks for this instrument.
Definition LeCroyOscilloscope.cpp:4222
virtual bool IsTriggerArmed() override
Checks if the trigger is currently armed.
Definition LeCroyOscilloscope.cpp:2297
virtual float GetFunctionChannelFrequency(int chan) override
Gets the frequency for a function generator output.
Definition LeCroyOscilloscope.cpp:2177
virtual int64_t GetTriggerOffset() override
Gets the trigger offset.
Definition LeCroyOscilloscope.cpp:3900
void PushSlewRateTrigger(SlewRateTrigger *trig)
Pushes settings for a slew rate trigger to the instrument.
Definition LeCroyOscilloscope.cpp:5566
void OnCDRTriggerAutoBaud()
Automatic baud rate configuration.
Definition LeCroyOscilloscope.cpp:4653
virtual std::vector< uint64_t > GetSampleRatesNonInterleaved() override
Get the legal sampling rates (in Hz) for this scope in all-channels mode.
Definition LeCroyOscilloscope.cpp:3232
virtual void SetFunctionChannelDutyCycle(int chan, float duty) override
Sets the duty cycle for a function generator output.
Definition LeCroyOscilloscope.cpp:2147
virtual float GetDigitalHysteresis(size_t channel) override
Gets the hysteresis for a digital input.
Definition LeCroyOscilloscope.cpp:4271
virtual bool SetInterleaving(bool combine) override
Configures the scope to combine channels.
Definition LeCroyOscilloscope.cpp:4006
virtual void SetFunctionChannelFallTime(int chan, float fs) override
Sets the fall time for a function generator output (if supported)
Definition LeCroyOscilloscope.cpp:2269
virtual void Invert(size_t i, bool invert) override
Enables hardware polarity inversion for a channel, if supported.
Definition LeCroyOscilloscope.cpp:1697
OscilloscopeChannel * m_fastEdgeChannel
Internal "fast edge" trigger source.
Definition LeCroyOscilloscope.h:392
void PullPulseWidthTrigger()
Reads settings for an edge trigger from the instrument.
Definition LeCroyOscilloscope.cpp:4794
virtual FunctionGenerator::WaveShape GetFunctionChannelShape(int chan) override
Gets the waveform shape for a function generator output.
Definition LeCroyOscilloscope.cpp:2189
OscilloscopeChannel * m_acLineChannel
Internal "AC line" trigger source.
Definition LeCroyOscilloscope.h:389
virtual float GetChannelOffset(size_t i, size_t stream) override
Gets the offset, in volts, for a given channel.
Definition LeCroyOscilloscope.cpp:3155
virtual void SetChannelOffset(size_t i, size_t stream, float offset) override
Sets the offset for a given channel.
Definition LeCroyOscilloscope.cpp:3182
virtual void SetChannelCoupling(size_t i, OscilloscopeChannel::CouplingType type) override
Sets the coupling used for an input channel.
Definition LeCroyOscilloscope.cpp:1430
virtual void SetNumAverages(size_t i, size_t navg) override
Sets the number of hardware averages to use.
Definition LeCroyOscilloscope.cpp:3833
virtual bool IsADCModeConfigurable() override
Returns true if the ADC is configurable, false if it can only run in one mode.
Definition LeCroyOscilloscope.cpp:4171
void PullNRZTrigger()
Reads settings for an NRZ pattern trigger from the instrument.
Definition LeCroyOscilloscope.cpp:4407
void PullEdgeTrigger()
Reads settings for an edge trigger from the instrument.
Definition LeCroyOscilloscope.cpp:4714
virtual float GetDigitalThreshold(size_t channel) override
Gets the threshold for a digital input.
Definition LeCroyOscilloscope.cpp:4285
void BulkCheckChannelEnableState()
Optimized function for checking channel enable status en masse with less round trips to the scope.
Definition LeCroyOscilloscope.cpp:2404
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:1803
virtual OutputImpedance GetFunctionChannelOutputImpedance(int chan) override
Gets the currently selected output impedance for a function generator output (if supported)
Definition LeCroyOscilloscope.cpp:2277
virtual void SetDeskewForChannel(size_t channel, int64_t skew) override
Sets the deskew setting for a channel.
Definition LeCroyOscilloscope.cpp:3929
void PushWindowTrigger(WindowTrigger *trig)
Pushes settings for a window trigger to the instrument.
Definition LeCroyOscilloscope.cpp:5680
virtual int64_t GetDeskewForChannel(size_t channel) override
Gets the deskew setting for a channel.
Definition LeCroyOscilloscope.cpp:3947
void Push8b10bTrigger(CDR8B10BTrigger *trig)
Pushes settings for an 8B/10B trigger to the instrument.
Definition LeCroyOscilloscope.cpp:5237
virtual std::vector< uint64_t > GetSampleDepthsInterleaved() override
Get the legal memory depths for this scope in combined-channels mode.
Definition LeCroyOscilloscope.cpp:3655
void Pull64b66bTrigger()
Reads settings for a 64b66b pattern trigger from the instrument.
Definition LeCroyOscilloscope.cpp:4432
bool m_triggerReallyArmed
True if the scope has reported it is in fact in the arm state.
Definition LeCroyOscilloscope.h:359
virtual size_t GetADCMode(size_t channel) override
Gets the ADC mode for a channel.
Definition LeCroyOscilloscope.cpp:4185
virtual float GetFunctionChannelOffset(int chan) override
Gets the DC offset for a function generator output.
Definition LeCroyOscilloscope.cpp:2165
void PushPulseWidthTrigger(PulseWidthTrigger *trig)
Pushes settings for a pulse width trigger to the instrument.
Definition LeCroyOscilloscope.cpp:5526
void GetTriggerSlope(EdgeTrigger *trig, std::string reply)
Processes the slope for an edge or edge-derived trigger.
Definition LeCroyOscilloscope.cpp:5077
void PullGlitchTrigger()
Reads settings for a glitch trigger from the instrument.
Definition LeCroyOscilloscope.cpp:4755
virtual unsigned int GetChannelBandwidthLimit(size_t i) override
Gets the bandwidth limit for an input channel.
Definition LeCroyOscilloscope.cpp:1634
unsigned int m_maxBandwidth
Maximum bandwidth we support, in MHz.
Definition LeCroyOscilloscope.h:356
void PushRuntTrigger(RuntTrigger *trig)
Pushes settings for a runt trigger to the instrument.
Definition LeCroyOscilloscope.cpp:5548
virtual bool AcquireData() override
Pull data from the instrument.
Definition LeCroyOscilloscope.cpp:2881
void PullSlewRateTrigger()
Reads settings for a slew rate trigger from the instrument.
Definition LeCroyOscilloscope.cpp:4881
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:1890
virtual OscilloscopeChannel * GetExternalTrigger() override
Returns the external trigger input channel, if we have one.
Definition LeCroyOscilloscope.cpp:1078
virtual float GetFunctionChannelRiseTime(int chan) override
Gets the rise time for a function generator output (if supported)
Definition LeCroyOscilloscope.cpp:2249
virtual void SetFunctionChannelOutputImpedance(int chan, OutputImpedance z) override
Sets the currently selected output impedance for a function generator output (if supported)
Definition LeCroyOscilloscope.cpp:2286
virtual void SetDigitalThreshold(size_t channel, float level) override
Gets the threshold for a digital input.
Definition LeCroyOscilloscope.cpp:4323
void PushEdgeTrigger(EdgeTrigger *trig, const std::string &tree)
Pushes settings for an edge trigger to the instrument.
Definition LeCroyOscilloscope.cpp:5484
virtual void SetChannelBandwidthLimit(size_t i, unsigned int limit_mhz) override
Sets the bandwidth limit for an input channel.
Definition LeCroyOscilloscope.cpp:1678
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:1142
std::unique_ptr< ComputePipeline > m_conversion8BitPipeline
Compute pipeline for converting raw ADC codes to float32 samples.
Definition LeCroyOscilloscope.h:398
std::string GetPossiblyEmptyString(const std::string &property)
Get an.
Definition LeCroyOscilloscope.cpp:1949
virtual bool GetFunctionChannelActive(int chan) override
Returns true if the function generator channel's output is enabled.
Definition LeCroyOscilloscope.cpp:2124
virtual void DisableChannel(size_t i) override
Turn a channel off, given the index.
Definition LeCroyOscilloscope.cpp:1342
void PushDropoutTrigger(DropoutTrigger *trig)
Pushes settings for a dropout trigger to the instrument.
Definition LeCroyOscilloscope.cpp:5465
virtual void SetFunctionChannelActive(int chan, bool on) override
Turns a function generator channel on or off.
Definition LeCroyOscilloscope.cpp:2133
virtual bool CanAutoZero(size_t i) override
Determines if a channel has a probe connected which supports the "auto zero" feature.
Definition LeCroyOscilloscope.cpp:1761
virtual bool HasInputMux(size_t i) override
Checks if a channel has an input multiplexer.
Definition LeCroyOscilloscope.cpp:1817
virtual float GetFunctionChannelAmplitude(int chan) override
Gets the amplitude for a function generator output.
Definition LeCroyOscilloscope.cpp:2153
virtual bool IsSamplingModeAvailable(SamplingMode mode) override
Returns true if the requested sampling mode is available with the current instrument configuration.
Definition LeCroyOscilloscope.cpp:4043
virtual void PullTrigger() override
Updates m_trigger with any changes made from the instrument side.
Definition LeCroyOscilloscope.cpp:4339
virtual void SetChannelVoltageRange(size_t i, size_t stream, float range) override
Sets the range of the current channel configuration.
Definition LeCroyOscilloscope.cpp:3222
virtual void FlushConfigCache() override
Instruments are allowed to cache configuration settings to reduce round trip queries to the device.
Definition LeCroyOscilloscope.cpp:1083
virtual void EnableChannel(size_t i) override
Turn a channel on, given the index.
Definition LeCroyOscilloscope.cpp:1236
virtual bool CanInvert(size_t i) override
Checks if a channel is capable of hardware polarity inversion.
Definition LeCroyOscilloscope.cpp:1691
void PushUartTrigger(UartTrigger *trig)
Pushes settings for a UART trigger to the instrument.
Definition LeCroyOscilloscope.cpp:5584
virtual void SetUseExternalRefclk(bool external) override
Configures the instrument's clock source.
Definition LeCroyOscilloscope.cpp:3874
virtual unsigned int GetMeasurementTypes() override
See what measurement capabilities we have.
Definition LeCroyOscilloscope.cpp:1116
void PushCondition(const std::string &path, Trigger::Condition cond)
Pushes settings for a trigger condition under a .Condition field.
Definition LeCroyOscilloscope.cpp:5690
virtual float GetFunctionChannelFallTime(int chan) override
Gets the fall time for a function generator output (if supported)
Definition LeCroyOscilloscope.cpp:2263
virtual std::vector< std::string > GetTriggerTypes() override
Gets a list of triggers this instrument supports.
Definition LeCroyOscilloscope.cpp:5775
void PushNRZTrigger(CDRNRZPatternTrigger *trig)
Pushes settings for a NRZ pattern trigger to the instrument.
Definition LeCroyOscilloscope.cpp:5207
virtual bool IsDigitalHysteresisConfigurable() override
Checks if digital input hysteresis is configurable or fixed.
Definition LeCroyOscilloscope.cpp:4261
virtual uint64_t GetSampleRate() override
Gets the current sampling rate (in Hz) of this scope.
Definition LeCroyOscilloscope.cpp:3735
virtual std::vector< WaveShape > GetAvailableWaveformShapes(int chan) override
Query the set of available pre-defined waveforms for this generator.
Definition LeCroyOscilloscope.cpp:2112
virtual bool HasFunctionRiseFallTimeControls(int chan) override
Determines if the function generator allows control over rise/fall times.
Definition LeCroyOscilloscope.cpp:2244
virtual float GetChannelVoltageRange(size_t i, size_t stream) override
Gets the range of the current channel configuration.
Definition LeCroyOscilloscope.cpp:3199
virtual float GetFunctionChannelDutyCycle(int chan) override
Gets the duty cycle for a function generator output.
Definition LeCroyOscilloscope.cpp:2141
void PullWindowTrigger()
Reads settings for a window trigger from the instrument.
Definition LeCroyOscilloscope.cpp:5049
virtual size_t GetInputMuxSetting(size_t i) override
Gets the setting for a channel's input mux (if it has one)
Definition LeCroyOscilloscope.cpp:1838
virtual void SetSampleDepth(uint64_t depth) override
Sets the sample depth of the scope.
Definition LeCroyOscilloscope.cpp:3770
float GetTriggerLevelWithInversion(Trigger *trig)
Returns the trigger level after correcting for optional frontend inversion.
Definition LeCroyOscilloscope.cpp:5453
virtual void SetFunctionChannelFrequency(int chan, float hz) override
Sets the frequency for a function generator output.
Definition LeCroyOscilloscope.cpp:2183
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:1912
virtual bool CanAverage(size_t i) override
Determines if the channel supports hardware averaging.
Definition LeCroyOscilloscope.cpp:3799
void ForceHDMode(bool mode)
Forces 16-bit transfer mode on/off when connecting to a scope regardless of ADC resolution.
Definition LeCroyOscilloscope.cpp:5820
void PullTriggerSource(Trigger *trig)
Reads the source of a trigger from the instrument.
Definition LeCroyOscilloscope.cpp:4393
virtual bool CanEnableChannel(size_t i) override
Determines if a channel can be enabled.
Definition LeCroyOscilloscope.cpp:1291
std::map< int, AcceleratorBuffer< uint8_t > > m_rawWaveformBuffers
Buffers for raw waveform data before conversion to float32.
Definition LeCroyOscilloscope.h:404
bool IsValid8B10BKCharacter(int code5, int code3)
Check if a candidate 8b10b character is a valid K code point.
Definition LeCroyOscilloscope.cpp:5216
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:4177
void PullRuntTrigger()
Reads settings for a runt-pulse trigger from the instrument.
Definition LeCroyOscilloscope.cpp:4833
virtual std::string GetProbeName(size_t i) override
Returns the name of the probe connected to the scope, if possible.
Definition LeCroyOscilloscope.cpp:1740
virtual std::vector< uint64_t > GetSampleRatesInterleaved() override
Get the legal sampling rates (in Hz) for this scope in combined-channels mode.
Definition LeCroyOscilloscope.cpp:3443
virtual std::vector< unsigned int > GetChannelBandwidthLimiters(size_t i) override
Gets the set of available bandwidth limiters for an input channel.
Definition LeCroyOscilloscope.cpp:1502
virtual void SetFunctionChannelShape(int chan, WaveShape shape) override
Sets the waveform shape for a function generator output.
Definition LeCroyOscilloscope.cpp:2211
virtual OscilloscopeChannel::CouplingType GetChannelCoupling(size_t i) override
Gets the coupling used for an input channel.
Definition LeCroyOscilloscope.cpp:1396
virtual bool IsInverted(size_t i) override
Checks if hardware polarity inversion is enabled for a channel.
Definition LeCroyOscilloscope.cpp:1716
void PushPatternCondition(const std::string &path, Trigger::Condition cond)
Pushes settings for a trigger condition under a .PatternOperator field.
Definition LeCroyOscilloscope.cpp:5719
void PullUartTrigger()
Reads settings for a UART trigger from the instrument.
Definition LeCroyOscilloscope.cpp:4928
virtual bool PeekTriggerArmed() override
Checks if the trigger is armed directly on the instrument, without altering internal state or touchin...
Definition LeCroyOscilloscope.cpp:2338
virtual void SetDigitalHysteresis(size_t channel, float level) override
Sets the hysteresis for a digital input.
Definition LeCroyOscilloscope.cpp:4310
A single channel on an oscilloscope.
Definition OscilloscopeChannel.h:49
TriggerMode
Definition Oscilloscope.h:398
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:53
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:85
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