ngscopeclient 0.1-dev+51fbda87c
LeCroyOscilloscope.h
Go to the documentation of this file.
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
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_8ZI,
200 MODEL_SDA_8ZI_A,
201 MODEL_SDA_8ZI_B,
202 MODEL_WAVEMASTER_8ZI,
203 MODEL_WAVEMASTER_8ZI_A,
204 MODEL_WAVEMASTER_8ZI_B,
205
206 MODEL_WAVEPRO_HD,
207
208 MODEL_WAVERUNNER_8K,
209 MODEL_WAVERUNNER_8K_HD,
210 MODEL_WAVERUNNER_9K,
211
212 MODEL_WAVESURFER_3K,
213
214 MODEL_UNKNOWN
215 };
216
217 Model GetModelID()
218 { return m_modelid; }
219
220 //Timebase
221 virtual std::vector<uint64_t> GetSampleRatesNonInterleaved() override;
222 virtual std::vector<uint64_t> GetSampleRatesInterleaved() override;
223 virtual std::set<InterleaveConflict> GetInterleaveConflicts() override;
224 virtual std::vector<uint64_t> GetSampleDepthsNonInterleaved() override;
225 virtual std::vector<uint64_t> GetSampleDepthsInterleaved() override;
226 virtual uint64_t GetSampleRate() override;
227 virtual uint64_t GetSampleDepth() override;
228 virtual void SetSampleDepth(uint64_t depth) override;
229 virtual void SetSampleRate(uint64_t rate) override;
230 virtual void SetUseExternalRefclk(bool external) override;
231 virtual bool IsInterleaving() override;
232 virtual bool SetInterleaving(bool combine) override;
233 virtual bool IsSamplingModeAvailable(SamplingMode mode) override;
234 virtual SamplingMode GetSamplingMode() override;
235 virtual void SetSamplingMode(SamplingMode mode) override;
236
237 //DBI mode
238 bool HasDBICapability();
239 bool IsDBIEnabled(size_t channel);
240
241 virtual void SetTriggerOffset(int64_t offset) override;
242 virtual int64_t GetTriggerOffset() override;
243 virtual void SetDeskewForChannel(size_t channel, int64_t skew) override;
244 virtual int64_t GetDeskewForChannel(size_t channel) override;
245
247 // Logic analyzer configuration
248
249 virtual std::vector<DigitalBank> GetDigitalBanks() override;
250 virtual DigitalBank GetDigitalBank(size_t channel) override;
251 virtual bool IsDigitalHysteresisConfigurable() override;
252 virtual bool IsDigitalThresholdConfigurable() override;
253 virtual float GetDigitalHysteresis(size_t channel) override;
254 virtual float GetDigitalThreshold(size_t channel) override;
255 virtual void SetDigitalHysteresis(size_t channel, float level) override;
256 virtual void SetDigitalThreshold(size_t channel, float level) override;
257
259 // ADC bit depth configuration
260
261 //All currently supported LeCroy scopes have only one analog bank (same ADC config for all channels)
262 //so no need to override those
263
264 virtual bool IsADCModeConfigurable() override;
265 virtual std::vector<std::string> GetADCModeNames(size_t channel) override;
266 virtual size_t GetADCMode(size_t channel) override;
267 virtual void SetADCMode(size_t channel, size_t mode) override;
268
269 //public so it can be called by TRCImportFilter
270 static time_t ExtractTimestamp(unsigned char* wavedesc, double& basetime);
271
272protected:
273
274 //Trigger config
275 void Pull8b10bTrigger();
276 void Pull64b66bTrigger();
277 void PullNRZTrigger();
278 void PullDropoutTrigger();
279 void PullEdgeTrigger();
280 void PullGlitchTrigger();
282 void PullRuntTrigger();
283 void PullSlewRateTrigger();
284 void PullUartTrigger();
285 void PullWindowTrigger();
286 void PullTriggerSource(Trigger* trig);
287
288 void GetTriggerSlope(EdgeTrigger* trig, std::string reply);
289 Trigger::Condition GetCondition(std::string reply);
290
294 void PushEdgeTrigger(EdgeTrigger* trig, const std::string& tree);
296 void PushCondition(const std::string& path, Trigger::Condition cond);
297 void PushPatternCondition(const std::string& path, Trigger::Condition cond);
298 void PushFloat(std::string path, float f);
300 void PushRuntTrigger(RuntTrigger* trig);
302 void PushUartTrigger(UartTrigger* trig);
304
306
308
309 std::string GetPossiblyEmptyString(const std::string& property);
310
311 bool ReadWaveformBlock(std::string& data);
312 bool ReadWavedescs(
313 std::vector<std::string>& wavedescs,
314 bool* enabled,
315 unsigned int& firstEnabledChannel,
316 bool& any_enabled);
317 void RequestWaveforms(bool* enabled, uint32_t num_sequences, bool denabled);
318 std::vector<WaveformBase*> ProcessAnalogWaveform(
319 const char* data,
320 size_t datalen,
321 std::string& wavedesc,
322 uint32_t num_sequences,
323 time_t ttime,
324 double basetime,
325 double* wavetime
326 );
327 std::map<int, SparseDigitalWaveform*> ProcessDigitalWaveform(std::string& data, int64_t analog_hoff);
328
329 //hardware analog channel count, independent of LA option etc
330 unsigned int m_analogChannelCount;
331 unsigned int m_digitalChannelCount;
332 size_t m_digitalChannelBase;
333
334 Model m_modelid;
335
336 //set of SW/HW options we have
337 bool m_hasLA;
338 bool m_hasDVM;
339 bool m_hasFunctionGen;
340 bool m_hasFastSampleRate; //-M models
341 int m_memoryDepthOption; //0 = base, after that number is max sample count in millions
342 bool m_hasI2cTrigger;
343 bool m_hasSpiTrigger;
344 bool m_hasUartTrigger;
345 bool m_has8b10bTrigger;
346 bool m_hasNrzTrigger;
347 bool m_hasXdev;
348
350 unsigned int m_maxBandwidth;
351
354
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
380 //True if we have >8 bit capture depth
381 bool m_highDefinition;
382
385
388
391
392 FunctionGeneratorChannel* m_awgChannel;
393 std::vector<OscilloscopeChannel*> m_digitalChannels;
394
395public:
396 static std::string GetDriverNameInternal();
397 OSCILLOSCOPE_INITPROC(LeCroyOscilloscope)
398};
399#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:2084
virtual void SetADCMode(size_t channel, size_t mode) override
Sets the ADC mode for a channel.
Definition: LeCroyOscilloscope.cpp:3988
virtual std::vector< std::string > GetInputMuxNames(size_t i) override
Gets names for the input mux ports of a channel.
Definition: LeCroyOscilloscope.cpp:1783
void PullDropoutTrigger()
Reads settings for a dropout trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4457
virtual Oscilloscope::TriggerMode PollTrigger() override
Checks the curent trigger status.
Definition: LeCroyOscilloscope.cpp:2227
virtual void SetSampleRate(uint64_t rate) override
Sets the sample rate of the scope, in Hz.
Definition: LeCroyOscilloscope.cpp:3592
virtual void SetInputMux(size_t i, size_t select) override
Sets the input mux for a channel.
Definition: LeCroyOscilloscope.cpp:1795
virtual void SetTriggerOffset(int64_t offset) override
Sets the trigger offset.
Definition: LeCroyOscilloscope.cpp:3671
bool m_triggerOneShot
True if current trigger is a single-shot and should not re-arm.
Definition: LeCroyOscilloscope.h:359
virtual double GetChannelAttenuation(size_t i) override
Gets the probe attenuation for an input channel.
Definition: LeCroyOscilloscope.cpp:1430
virtual bool IsDigitalThresholdConfigurable() override
Checks if digital input threshold is configurable or fixed.
Definition: LeCroyOscilloscope.cpp:4055
virtual uint64_t GetSampleDepth() override
Gets the current sample depth of this scope.
Definition: LeCroyOscilloscope.cpp:3551
virtual void PushTrigger() override
Pushes changes made to m_trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:4895
virtual size_t GetNumAverages(size_t i) override
Returns the number of averages the channel is configured for.
Definition: LeCroyOscilloscope.cpp:3606
void PushGlitchTrigger(GlitchTrigger *trig)
Pushes settings for a glitch trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:5271
virtual DigitalBank GetDigitalBank(size_t channel) override
Gets the bank containing a given channel.
Definition: LeCroyOscilloscope.cpp:4031
virtual void EnableTriggerOutput() override
Enables the trigger output, configuring a shared auxiliary port for this purpose if needed.
Definition: LeCroyOscilloscope.cpp:3641
Trigger::Condition GetCondition(std::string reply)
Parses a trigger condition.
Definition: LeCroyOscilloscope.cpp:4878
virtual void SetFunctionChannelRiseTime(int chan, float fs) override
Sets the rise time for a function generator output (if supported)
Definition: LeCroyOscilloscope.cpp:2180
virtual std::vector< uint64_t > GetSampleDepthsNonInterleaved() override
Get the legal memory depths for this scope in all-channels mode.
Definition: LeCroyOscilloscope.cpp:3306
virtual SamplingMode GetSamplingMode() override
Gets the current sampling mode of the instrument.
Definition: LeCroyOscilloscope.cpp:3853
virtual void DetectAnalogChannels()
Figures out how many analog channels we have, and add them to the device.
Definition: LeCroyOscilloscope.cpp:902
void Pull8b10bTrigger()
Reads settings for an 8B/10B trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4244
virtual void StartSingleTrigger() override
Arms the trigger for a single acquistion.
Definition: LeCroyOscilloscope.cpp:3000
virtual int GetMeterDigits() override
Returns the digit resolution of the meter.
Definition: LeCroyOscilloscope.cpp:1887
OscilloscopeChannel * m_extTrigChannel
External trigger input.
Definition: LeCroyOscilloscope.h:384
virtual void Start() override
Starts the instrument in continuous trigger mode.
Definition: LeCroyOscilloscope.cpp:2992
virtual bool IsInterleaving() override
Checks if the scope is currently combining channels.
Definition: LeCroyOscilloscope.cpp:3765
virtual void ForceTrigger() override
Forces a single acquisition as soon as possible.
Definition: LeCroyOscilloscope.cpp:3019
virtual void SetChannelAttenuation(size_t i, double atten) override
Sets the probe attenuation used for an input channel.
Definition: LeCroyOscilloscope.cpp:1446
virtual double GetMeterValue() override
Get the value of the primary measurement.
Definition: LeCroyOscilloscope.cpp:1918
virtual std::vector< OscilloscopeChannel::CouplingType > GetAvailableCouplings(size_t i) override
Gets the set of legal coupling values for an input channel.
Definition: LeCroyOscilloscope.cpp:1338
virtual void SetSamplingMode(SamplingMode mode) override
Sets the current sampling mode of the instrument.
Definition: LeCroyOscilloscope.cpp:3867
virtual unsigned int GetInstrumentTypes() const override
See what features we have.
Definition: LeCroyOscilloscope.cpp:1102
bool IsCDRLocked()
Checks if the hardware CDR trigger is locked.
Definition: LeCroyOscilloscope.cpp:5533
virtual void Stop() override
Stops triggering.
Definition: LeCroyOscilloscope.cpp:3008
void AddDigitalChannels(unsigned int count)
Creates digital channels for the oscilloscope.
Definition: LeCroyOscilloscope.cpp:858
virtual bool IsChannelEnabled(size_t i) override
Checks if a channel is enabled in hardware.
Definition: LeCroyOscilloscope.cpp:1144
virtual void SetFunctionChannelOffset(int chan, float offset) override
Sets the DC offset for a function generator output.
Definition: LeCroyOscilloscope.cpp:2096
virtual std::vector< DigitalBank > GetDigitalBanks() override
Gets the digital channel banks for this instrument.
Definition: LeCroyOscilloscope.cpp:4011
virtual bool IsTriggerArmed() override
Checks if the trigger is currently armed.
Definition: LeCroyOscilloscope.cpp:2222
virtual float GetFunctionChannelFrequency(int chan) override
Gets the frequency for a function generator output.
Definition: LeCroyOscilloscope.cpp:2102
virtual int64_t GetTriggerOffset() override
Gets the trigger offset.
Definition: LeCroyOscilloscope.cpp:3689
void PushSlewRateTrigger(SlewRateTrigger *trig)
Pushes settings for a slew rate trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:5300
void OnCDRTriggerAutoBaud()
Automatic baud rate configuration.
Definition: LeCroyOscilloscope.cpp:4437
virtual std::vector< uint64_t > GetSampleRatesNonInterleaved() override
Get the legal sampling rates (in Hz) for this scope in all-channels mode.
Definition: LeCroyOscilloscope.cpp:3098
virtual void SetFunctionChannelDutyCycle(int chan, float duty) override
Sets the duty cycle for a function generator output.
Definition: LeCroyOscilloscope.cpp:2072
virtual float GetDigitalHysteresis(size_t channel) override
Gets the hysteresis for a digital input.
Definition: LeCroyOscilloscope.cpp:4060
virtual bool SetInterleaving(bool combine) override
Configures the scope to combine channels.
Definition: LeCroyOscilloscope.cpp:3795
virtual void SetFunctionChannelFallTime(int chan, float fs) override
Sets the fall time for a function generator output (if supported)
Definition: LeCroyOscilloscope.cpp:2194
virtual void Invert(size_t i, bool invert) override
Enables hardware polarity inversion for a channel, if supported.
Definition: LeCroyOscilloscope.cpp:1646
OscilloscopeChannel * m_fastEdgeChannel
Internal "fast edge" trigger source.
Definition: LeCroyOscilloscope.h:390
void PullPulseWidthTrigger()
Reads settings for an edge trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4578
virtual FunctionGenerator::WaveShape GetFunctionChannelShape(int chan) override
Gets the waveform shape for a function generator output.
Definition: LeCroyOscilloscope.cpp:2114
OscilloscopeChannel * m_acLineChannel
Internal "AC line" trigger source.
Definition: LeCroyOscilloscope.h:387
virtual float GetChannelOffset(size_t i, size_t stream) override
Gets the offset, in volts, for a given channel.
Definition: LeCroyOscilloscope.cpp:3028
virtual void SetChannelOffset(size_t i, size_t stream, float offset) override
Sets the offset for a given channel.
Definition: LeCroyOscilloscope.cpp:3051
virtual void SetChannelCoupling(size_t i, OscilloscopeChannel::CouplingType type) override
Sets the coupling used for an input channel.
Definition: LeCroyOscilloscope.cpp:1395
virtual void SetNumAverages(size_t i, size_t navg) override
Sets the number of hardware averages to use.
Definition: LeCroyOscilloscope.cpp:3627
virtual bool IsADCModeConfigurable() override
Returns true if the ADC is configurable, false if it can only run in one mode.
Definition: LeCroyOscilloscope.cpp:3960
void PullNRZTrigger()
Reads settings for an NRZ pattern trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4191
void PullEdgeTrigger()
Reads settings for an edge trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4498
virtual float GetDigitalThreshold(size_t channel) override
Gets the threshold for a digital input.
Definition: LeCroyOscilloscope.cpp:4074
void BulkCheckChannelEnableState()
Optimized function for checking channel enable status en masse with less round trips to the scope.
Definition: LeCroyOscilloscope.cpp:2329
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:1730
virtual OutputImpedance GetFunctionChannelOutputImpedance(int chan) override
Gets the currently selected output impedance for a function generator output (if supported)
Definition: LeCroyOscilloscope.cpp:2202
virtual void SetDeskewForChannel(size_t channel, int64_t skew) override
Sets the deskew setting for a channel.
Definition: LeCroyOscilloscope.cpp:3718
void PushWindowTrigger(WindowTrigger *trig)
Pushes settings for a window trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:5414
virtual int64_t GetDeskewForChannel(size_t channel) override
Gets the deskew setting for a channel.
Definition: LeCroyOscilloscope.cpp:3736
void Push8b10bTrigger(CDR8B10BTrigger *trig)
Pushes settings for an 8B/10B trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:4992
virtual std::vector< uint64_t > GetSampleDepthsInterleaved() override
Get the legal memory depths for this scope in combined-channels mode.
Definition: LeCroyOscilloscope.cpp:3459
void Pull64b66bTrigger()
Reads settings for a 64b66b pattern trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4216
bool m_triggerReallyArmed
True if the scope has reported it is in fact in the arm state.
Definition: LeCroyOscilloscope.h:356
virtual size_t GetADCMode(size_t channel) override
Gets the ADC mode for a channel.
Definition: LeCroyOscilloscope.cpp:3974
virtual float GetFunctionChannelOffset(int chan) override
Gets the DC offset for a function generator output.
Definition: LeCroyOscilloscope.cpp:2090
void PushPulseWidthTrigger(PulseWidthTrigger *trig)
Pushes settings for a pulse width trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:5260
void GetTriggerSlope(EdgeTrigger *trig, std::string reply)
Processes the slope for an edge or edge-derived trigger.
Definition: LeCroyOscilloscope.cpp:4861
void PullGlitchTrigger()
Reads settings for a glitch trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4539
virtual unsigned int GetChannelBandwidthLimit(size_t i) override
Gets the bandwidth limit for an input channel.
Definition: LeCroyOscilloscope.cpp:1583
unsigned int m_maxBandwidth
Maximum bandwidth we support, in MHz.
Definition: LeCroyOscilloscope.h:350
void PushRuntTrigger(RuntTrigger *trig)
Pushes settings for a runt trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:5282
virtual bool AcquireData() override
Pull data from the instrument.
Definition: LeCroyOscilloscope.cpp:2770
void PullSlewRateTrigger()
Reads settings for a slew rate trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4665
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:1815
virtual OscilloscopeChannel * GetExternalTrigger() override
Returns the external trigger input channel, if we have one.
Definition: LeCroyOscilloscope.cpp:1049
virtual float GetFunctionChannelRiseTime(int chan) override
Gets the rise time for a function generator output (if supported)
Definition: LeCroyOscilloscope.cpp:2174
virtual void SetFunctionChannelOutputImpedance(int chan, OutputImpedance z) override
Sets the currently selected output impedance for a function generator output (if supported)
Definition: LeCroyOscilloscope.cpp:2211
virtual void SetDigitalThreshold(size_t channel, float level) override
Gets the threshold for a digital input.
Definition: LeCroyOscilloscope.cpp:4112
void PushEdgeTrigger(EdgeTrigger *trig, const std::string &tree)
Pushes settings for an edge trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:5218
virtual void SetChannelBandwidthLimit(size_t i, unsigned int limit_mhz) override
Sets the bandwidth limit for an input channel.
Definition: LeCroyOscilloscope.cpp:1627
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:1112
std::string GetPossiblyEmptyString(const std::string &property)
Get an.
Definition: LeCroyOscilloscope.cpp:1874
virtual bool GetFunctionChannelActive(int chan) override
Returns true if the function generator channel's output is enabled.
Definition: LeCroyOscilloscope.cpp:2049
virtual void DisableChannel(size_t i) override
Turn a channel off, given the index.
Definition: LeCroyOscilloscope.cpp:1307
void PushDropoutTrigger(DropoutTrigger *trig)
Pushes settings for a dropout trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:5199
virtual void SetFunctionChannelActive(int chan, bool on) override
Turns a function generator channel on or off.
Definition: LeCroyOscilloscope.cpp:2058
virtual bool CanAutoZero(size_t i) override
Determines if a channel has a probe connected which supports the "auto zero" feature.
Definition: LeCroyOscilloscope.cpp:1688
virtual bool HasInputMux(size_t i) override
Checks if a channel has an input multiplexer.
Definition: LeCroyOscilloscope.cpp:1744
virtual float GetFunctionChannelAmplitude(int chan) override
Gets the amplitude for a function generator output.
Definition: LeCroyOscilloscope.cpp:2078
virtual bool IsSamplingModeAvailable(SamplingMode mode) override
Returns true if the requested sampling mode is available with the current instrument configuration.
Definition: LeCroyOscilloscope.cpp:3832
virtual void PullTrigger() override
Updates m_trigger with any changes made from the instrument side.
Definition: LeCroyOscilloscope.cpp:4128
virtual void SetChannelVoltageRange(size_t i, size_t stream, float range) override
Sets the range of the current channel configuration.
Definition: LeCroyOscilloscope.cpp:3088
bool m_triggerArmed
True if we have sent an arm command to the scope (may not have executed yet)
Definition: LeCroyOscilloscope.h:353
virtual void FlushConfigCache() override
Instruments are allowed to cache configuration settings to reduce round trip queries to the device.
Definition: LeCroyOscilloscope.cpp:1054
virtual void EnableChannel(size_t i) override
Turn a channel on, given the index.
Definition: LeCroyOscilloscope.cpp:1205
virtual bool CanInvert(size_t i) override
Checks if a channel is capable of hardware polarity inversion.
Definition: LeCroyOscilloscope.cpp:1640
void PushUartTrigger(UartTrigger *trig)
Pushes settings for a UART trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:5318
virtual void SetUseExternalRefclk(bool external) override
Configures the instrument's clock source.
Definition: LeCroyOscilloscope.cpp:3663
virtual unsigned int GetMeasurementTypes() override
See what measurement capabilities we have.
Definition: LeCroyOscilloscope.cpp:1086
void PushCondition(const std::string &path, Trigger::Condition cond)
Pushes settings for a trigger condition under a .Condition field.
Definition: LeCroyOscilloscope.cpp:5424
virtual float GetFunctionChannelFallTime(int chan) override
Gets the fall time for a function generator output (if supported)
Definition: LeCroyOscilloscope.cpp:2188
virtual std::vector< std::string > GetTriggerTypes() override
Gets a list of triggers this instrument supports.
Definition: LeCroyOscilloscope.cpp:5509
void PushNRZTrigger(CDRNRZPatternTrigger *trig)
Pushes settings for a NRZ pattern trigger to the instrument.
Definition: LeCroyOscilloscope.cpp:4983
virtual bool IsDigitalHysteresisConfigurable() override
Checks if digital input hysteresis is configurable or fixed.
Definition: LeCroyOscilloscope.cpp:4050
virtual uint64_t GetSampleRate() override
Gets the current sampling rate (in Hz) of this scope.
Definition: LeCroyOscilloscope.cpp:3537
virtual std::vector< WaveShape > GetAvailableWaveformShapes(int chan) override
Query the set of available pre-defined waveforms for this generator.
Definition: LeCroyOscilloscope.cpp:2037
virtual bool HasFunctionRiseFallTimeControls(int chan) override
Determines if the function generator allows control over rise/fall times.
Definition: LeCroyOscilloscope.cpp:2169
virtual float GetChannelVoltageRange(size_t i, size_t stream) override
Gets the range of the current channel configuration.
Definition: LeCroyOscilloscope.cpp:3065
virtual float GetFunctionChannelDutyCycle(int chan) override
Gets the duty cycle for a function generator output.
Definition: LeCroyOscilloscope.cpp:2066
void PullWindowTrigger()
Reads settings for a window trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4833
virtual size_t GetInputMuxSetting(size_t i) override
Gets the setting for a channel's input mux (if it has one)
Definition: LeCroyOscilloscope.cpp:1763
virtual void SetSampleDepth(uint64_t depth) override
Sets the sample depth of the scope.
Definition: LeCroyOscilloscope.cpp:3572
virtual void SetFunctionChannelFrequency(int chan, float hz) override
Sets the frequency for a function generator output.
Definition: LeCroyOscilloscope.cpp:2108
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:1837
virtual bool CanAverage(size_t i) override
Determines if the channel supports hardware averaging.
Definition: LeCroyOscilloscope.cpp:3601
void ForceHDMode(bool mode)
Forces 16-bit transfer mode on/off when connecting to a scope regardless of ADC resolution.
Definition: LeCroyOscilloscope.cpp:5554
void PullTriggerSource(Trigger *trig)
Reads the source of a trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4177
virtual bool CanEnableChannel(size_t i) override
Determines if a channel can be enabled.
Definition: LeCroyOscilloscope.cpp:1259
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:3966
void PullRuntTrigger()
Reads settings for a runt-pulse trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4617
virtual std::string GetProbeName(size_t i) override
Returns the name of the probe connected to the scope, if possible.
Definition: LeCroyOscilloscope.cpp:1667
virtual std::vector< uint64_t > GetSampleRatesInterleaved() override
Get the legal sampling rates (in Hz) for this scope in combined-channels mode.
Definition: LeCroyOscilloscope.cpp:3282
virtual std::vector< unsigned int > GetChannelBandwidthLimiters(size_t i) override
Gets the set of available bandwidth limiters for an input channel.
Definition: LeCroyOscilloscope.cpp:1467
virtual void SetFunctionChannelShape(int chan, WaveShape shape) override
Sets the waveform shape for a function generator output.
Definition: LeCroyOscilloscope.cpp:2136
virtual OscilloscopeChannel::CouplingType GetChannelCoupling(size_t i) override
Gets the coupling used for an input channel.
Definition: LeCroyOscilloscope.cpp:1361
virtual bool IsInverted(size_t i) override
Checks if hardware polarity inversion is enabled for a channel.
Definition: LeCroyOscilloscope.cpp:1657
void PushPatternCondition(const std::string &path, Trigger::Condition cond)
Pushes settings for a trigger condition under a .PatternOperator field.
Definition: LeCroyOscilloscope.cpp:5453
void PullUartTrigger()
Reads settings for a UART trigger from the instrument.
Definition: LeCroyOscilloscope.cpp:4712
virtual bool PeekTriggerArmed() override
Checks if the trigger is armed directly on the instrument, without altering internal state or touchin...
Definition: LeCroyOscilloscope.cpp:2263
virtual void SetDigitalHysteresis(size_t channel, float level) override
Sets the hysteresis for a digital input.
Definition: LeCroyOscilloscope.cpp:4099
A single channel on an oscilloscope.
Definition: OscilloscopeChannel.h:49
TriggerMode
Definition: Oscilloscope.h:411
Trigger on a pulse meeting certain width criteria.
Definition: PulseWidthTrigger.h:44
Runt trigger - trigger when a pulse of a given width crosses one threshold but not the second.
Definition: RuntTrigger.h:46
An SCPI-based function generator.
Definition: SCPIFunctionGenerator.h:38
An SCPI-based 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