ngscopeclient v0.2
Loading...
Searching...
No Matches
RSRTB2kOscilloscope.h
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
30#ifndef RSRTB2kOscilloscope_h
31#define RSRTB2kOscilloscope_h
32
37class EdgeTrigger;
38class LineTrigger;
39
45
46#define MAX_ANALOG 4
47#define MAX_DIGITAL 16
48#define MAX_DIGITAL_POD 2
49#define LOGICPOD1 51
50#define LOGICPOD2 52
51
52#define c_digiChannelsPerBus 8
53
55 : public virtual SCPIOscilloscope
56 , public virtual SCPIFunctionGenerator
57{
58public:
60 virtual ~RSRTB2kOscilloscope();
61
62 //not copyable or assignable
64 RSRTB2kOscilloscope& operator=(const RSRTB2kOscilloscope& rhs) = delete;
65
66private:
67 std::string converse(const char* fmt, ...);
68 void sendOnly(const char* fmt, ...);
69 bool sendWithAck(const char* fmt, ...);
70 void flush();
71 void protocolError(bool flush, const char* fmt, va_list ap);
72 void protocolError(const char* fmt, ...);
73 void protocolErrorWithFlush(const char* fmt, ...);
74
75protected:
76 void IdentifyHardware();
77 void DetectOptions();
78 virtual void AddAnalogChannels();
79 void AddDigitalChannels();
80 void AddExternalTriggerChannel();
81 void AddLineTriggerChannel();
82 void AddAwgChannel();
83
84public:
85 // Specific 16 bit conversion methods for uint16_t
86 static void Convert16BitSamples(float* pout, const uint16_t* pin, float gain, float offset, size_t count);
87 static void Convert16BitSamplesGeneric(float* pout, const uint16_t* pin, float gain, float offset, size_t count);
88 // Specific 8 bit conversion methods for uint8_t
89 static void Convert8BitSamples(float* pout, const uint8_t* pin, float gain, float offset, size_t count);
90 static void Convert8BitSamplesGeneric(float* pout, const uint8_t* pin, float gain, float offset, size_t count);
91
92 //Device information
93 virtual unsigned int GetInstrumentTypes() const override;
94 virtual uint32_t GetInstrumentTypesForChannel(size_t i) const override;
95
96 virtual void FlushConfigCache() override;
97
98 void ForceHDMode(bool mode);
99
100 //Channel configuration
101 virtual bool IsChannelEnabled(size_t i) override;
102 virtual void EnableChannel(size_t i) override;
103 virtual bool CanEnableChannel(size_t i) override;
104 virtual void DisableChannel(size_t i) override;
105 virtual OscilloscopeChannel::CouplingType GetChannelCoupling(size_t i) override;
106 virtual void SetChannelCoupling(size_t i, OscilloscopeChannel::CouplingType type) override;
107 virtual std::vector<OscilloscopeChannel::CouplingType> GetAvailableCouplings(size_t i) override;
108 virtual double GetChannelAttenuation(size_t i) override;
109 virtual void SetChannelAttenuation(size_t i, double atten) override;
110 virtual unsigned int GetChannelBandwidthLimit(size_t i) override;
111 virtual void SetChannelBandwidthLimit(size_t i, unsigned int limit_mhz) override;
112 virtual float GetChannelVoltageRange(size_t i, size_t stream) override;
113 virtual void SetChannelVoltageRange(size_t i, size_t stream, float range) override;
114 virtual OscilloscopeChannel* GetExternalTrigger() override;
115 virtual float GetChannelOffset(size_t i, size_t stream) override;
116 virtual void SetChannelOffset(size_t i, size_t stream, float offset) override;
117 virtual std::string GetChannelDisplayName(size_t i) override;
118 virtual void SetChannelDisplayName(size_t i, std::string name) override;
119 virtual std::vector<unsigned int> GetChannelBandwidthLimiters(size_t i) override;
120 virtual bool CanInvert(size_t i) override;
121 virtual void Invert(size_t i, bool invert) override;
122 virtual bool IsInverted(size_t i) override;
123
124 //Triggering
125 virtual Oscilloscope::TriggerMode PollTrigger() override;
126 virtual bool AcquireData() override;
127 virtual void Start() override;
128 virtual void StartSingleTrigger() override;
129 virtual void Stop() override;
130 virtual void ForceTrigger() override;
131 virtual bool IsTriggerArmed() override;
132 virtual void PushTrigger() override;
133 virtual void PullTrigger() override;
134 virtual void EnableTriggerOutput() override;
135 virtual std::vector<std::string> GetTriggerTypes() override;
136
137 //Timebase
138 virtual std::vector<uint64_t> GetSampleRatesNonInterleaved() override;
139 virtual std::vector<uint64_t> GetSampleRatesInterleaved() override;
140 virtual std::set<InterleaveConflict> GetInterleaveConflicts() override;
141 virtual std::vector<uint64_t> GetSampleDepthsNonInterleaved() override;
142 virtual std::vector<uint64_t> GetSampleDepthsInterleaved() override;
143 virtual uint64_t GetSampleRate() override;
144 virtual uint64_t GetSampleDepth() override;
145 virtual void SetSampleDepth(uint64_t depth) override;
146 virtual void SetSampleRate(uint64_t rate) override;
147 virtual bool IsInterleaving() override;
148 virtual bool SetInterleaving(bool combine) override;
149
150 virtual void SetTriggerOffset(int64_t offset) override;
151 virtual int64_t GetTriggerOffset() override;
152
154 // Function generator
155
156 virtual std::vector<WaveShape> GetAvailableWaveformShapes(int chan) override;
157
158 //Configuration
159 virtual bool GetFunctionChannelActive(int chan) override;
160 virtual void SetFunctionChannelActive(int chan, bool on) override;
161
162 virtual float GetFunctionChannelDutyCycle(int chan) override;
163 virtual void SetFunctionChannelDutyCycle(int chan, float duty) override;
164
165 virtual float GetFunctionChannelAmplitude(int chan) override;
166 virtual void SetFunctionChannelAmplitude(int chan, float amplitude) override;
167
168 virtual float GetFunctionChannelOffset(int chan) override;
169 virtual void SetFunctionChannelOffset(int chan, float offset) override;
170
171 virtual float GetFunctionChannelFrequency(int chan) override;
172 virtual void SetFunctionChannelFrequency(int chan, float hz) override;
173
174 virtual WaveShape GetFunctionChannelShape(int chan) override;
175 virtual void SetFunctionChannelShape(int chan, WaveShape shape) override;
176
177 virtual bool HasFunctionRiseFallTimeControls(int chan) override;
178
180 virtual void SetFunctionChannelOutputImpedance(int chan, OutputImpedance z) override;
181
182 virtual float GetFunctionChannelRiseTime(int) override;
183
184 virtual void SetFunctionChannelRiseTime(int, float) override;
185
186 virtual void SetFunctionChannelFallTime(int, float) override;
187
188 virtual float GetFunctionChannelFallTime(int chan) override;
189
190
192 // Logic analyzer configuration
193
194 virtual std::vector<DigitalBank> GetDigitalBanks() override;
195 virtual DigitalBank GetDigitalBank(size_t channel) override;
196 virtual bool IsDigitalHysteresisConfigurable() override;
197 virtual bool IsDigitalThresholdConfigurable() override;
198 virtual float GetDigitalHysteresis(size_t channel) override;
199 virtual float GetDigitalThreshold(size_t channel) override;
200 virtual void SetDigitalHysteresis(size_t channel, float level) override;
201 virtual void SetDigitalThreshold(size_t channel, float level) override;
202
203protected:
204 struct Metadata {
205 uint32_t sampleCount;
206 uint32_t bytesPerSample;
207 float verticalStart;
208 float verticalStep;
209 float interval;
210 };
211
212 struct Logicpod {
213 bool enabled;
214 unsigned int progressChannel;
215 };
216
217 std::string PullTriggerSourceNumber(bool noDigital);
218
219 void PullTriggerSource(Trigger* trig, std::string triggerModeName, bool isUart);
220 void PullEdgeTrigger();
221 void PullLineTrigger();
222 void PullRiseTimeTrigger();
223 void PullRuntTrigger();
224 void PullTimeoutTrigger();
225 void PullVideoTrigger();
226 void PullWidthTrigger();
227
228 void GetTriggerHysteresis(Trigger* trig, std::string reply);
229 void GetTriggerSlope(Trigger* trig, std::string reply);
230 void GetTriggerCoupling(Trigger* trig, std::string reply);
232
233 void PushCondition(const std::string& path, Trigger::Condition cond);
234 void PushFloat(const std::string& path, float f);
235 void PushEdgeTrigger(EdgeTrigger* trig, const std::string& trigType);
242
244 void PrepareAcquisition();
245 void SetupForAcquisition();
246
247 std::string GetDigitalChannelBankName(size_t channel);
248 std::string GetChannelName(size_t channel);
249 bool GetActiveChannels(bool* pod1, bool* pod2, bool* chan1, bool* chan2, bool* chan3, bool* chan4);
250
251 size_t ReadWaveformBlock(std::vector<uint8_t>* data, Metadata* metadata, std::function<void(float)> progress = nullptr);
252
253 std::vector<WaveformBase*> ProcessAnalogWaveform(
254 const std::vector<uint8_t>& data,
255 size_t dataLen,
257 uint32_t sampleCount,
259 float verticalStep,
260 float verticalStart,
261 float interval,
262 int i);
263
264 //hardware analog channel count, independent of LA option etc
265 unsigned int m_analogChannelCount;
266 unsigned int m_digitalChannelCount;
267 unsigned int m_analogAndDigitalChannelCount;
268 size_t m_digitalChannelBase;
269
270 //set of SW/HW options we have
271 bool m_hasLA;
272 bool m_hasDVM;
273 bool m_hasFunctionGen;
274 bool m_hasI2cTrigger;
275 bool m_hasSpiTrigger;
276 bool m_hasUartTrigger;
277 bool m_hasCanTrigger;
278 bool m_hasLinTrigger;
279
280 //Maximum bandwidth we support, in MHz
281 unsigned int m_maxBandwidth;
282
283 bool m_triggerForced;
284
285 //Cached configuration
286 std::map<size_t, float> m_channelVoltageRanges;
287 std::map<size_t, float> m_channelOffsets;
288 std::map<std::string, float> m_channelDigitalHysteresis;
289 std::map<std::string, float> m_channelDigitalThresholds;
290 std::map<int, bool> m_channelsEnabled;
291 bool m_sampleRateValid;
292 int64_t m_sampleRate;
293 bool m_memoryDepthValid;
294 int64_t m_memoryDepth;
295 bool m_memoryDepthAuto;
296 bool m_triggerOffsetValid;
297 int64_t m_triggerOffset;
298 int64_t m_triggerReference;
299 //~ std::map<size_t, int64_t> m_channelDeskew;
300 //~ Multimeter::MeasurementTypes m_meterMode;
301 //~ bool m_meterModeValid;
302 std::map<size_t, bool> m_awgEnabled;
303 std::map<size_t, float> m_awgDutyCycle;
304 std::map<size_t, float> m_awgRange;
305 std::map<size_t, float> m_awgOffset;
306 std::map<size_t, float> m_awgFrequency;
307 std::map<size_t, float> m_awgRiseTime;
308 std::map<size_t, float> m_awgFallTime;
309 std::map<size_t, FunctionGenerator::WaveShape> m_awgShape;
310 std::map<size_t, FunctionGenerator::OutputImpedance> m_awgImpedance;
311
312 //True if we have >8 bit capture depth
313 bool m_highDefinition;
314
315 //Other channels
316 OscilloscopeChannel* m_extTrigChannel;
317 OscilloscopeChannel* m_lineTrigChannel;
318 FunctionGeneratorChannel* m_awgChannel;
319 std::vector<OscilloscopeChannel*> m_digitalChannels;
320
321public:
322 static std::string GetDriverNameInternal();
323 OSCILLOSCOPE_INITPROC(RSRTB2kOscilloscope)
324};
325#endif
Definition AcceleratorBuffer.h:204
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 uses the waveform of the power supply's alternating line voltage
Definition LineTrigger.h:44
A single channel on an oscilloscope.
Definition OscilloscopeChannel.h:49
TriggerMode
Definition Oscilloscope.h:398
Definition RSRTB2kOscilloscope.h:57
virtual float GetFunctionChannelDutyCycle(int chan) override
Gets the duty cycle for a function generator output.
Definition RSRTB2kOscilloscope.cpp:3228
void PullWidthTrigger()
Reads settings for an edge trigger from the instrument.
Definition RSRTB2kOscilloscope.cpp:1575
virtual void SetChannelCoupling(size_t i, OscilloscopeChannel::CouplingType type) override
Sets the coupling used for an input channel.
Definition RSRTB2kOscilloscope.cpp:630
virtual OscilloscopeChannel::CouplingType GetChannelCoupling(size_t i) override
Gets the coupling used for an input channel.
Definition RSRTB2kOscilloscope.cpp:610
virtual OutputImpedance GetFunctionChannelOutputImpedance(int chan) override
Gets the currently selected output impedance for a function generator output (if supported)
Definition RSRTB2kOscilloscope.cpp:3479
virtual void SetFunctionChannelOutputImpedance(int chan, OutputImpedance z) override
Sets the currently selected output impedance for a function generator output (if supported)
Definition RSRTB2kOscilloscope.cpp:3497
virtual bool AcquireData() override
Pull data from the instrument.
Definition RSRTB2kOscilloscope.cpp:2277
virtual void EnableChannel(size_t i) override
Turn a channel on, given the index.
Definition RSRTB2kOscilloscope.cpp:509
virtual float GetDigitalHysteresis(size_t channel) override
Gets the hysteresis for a digital input.
Definition RSRTB2kOscilloscope.cpp:3085
virtual void PullTrigger() override
Updates m_trigger with any changes made from the instrument side.
Definition RSRTB2kOscilloscope.cpp:1342
void PullTimeoutTrigger()
Reads settings for a timeout trigger from the instrument.
Definition RSRTB2kOscilloscope.cpp:1813
virtual void PushTrigger() override
Pushes changes made to m_trigger to the instrument.
Definition RSRTB2kOscilloscope.cpp:1420
void GetTriggerCoupling(Trigger *trig, std::string reply)
Processes the coupling for an edge or edge-derived trigger.
Definition RSRTB2kOscilloscope.cpp:1106
virtual float GetChannelOffset(size_t i, size_t stream) override
Gets the offset, in volts, for a given channel.
Definition RSRTB2kOscilloscope.cpp:975
virtual float GetDigitalThreshold(size_t channel) override
Gets the threshold for a digital input.
Definition RSRTB2kOscilloscope.cpp:3116
virtual void SetChannelBandwidthLimit(size_t i, unsigned int limit_mhz) override
Sets the bandwidth limit for an input channel.
Definition RSRTB2kOscilloscope.cpp:722
virtual WaveShape GetFunctionChannelShape(int chan) override
Gets the waveform shape for a function generator output.
Definition RSRTB2kOscilloscope.cpp:3351
void PushWidthTrigger(RSRTB2kWidthTrigger *trig)
Pushes settings for a pulse width trigger to the instrument.
Definition RSRTB2kOscilloscope.cpp:1630
virtual uint64_t GetSampleDepth() override
Gets the current sample depth of this scope.
Definition RSRTB2kOscilloscope.cpp:2850
void PushVideoTrigger(RSRTB2kVideoTrigger *trig)
Pushes settings for a video trigger to the instrument.
Definition RSRTB2kOscilloscope.cpp:1949
static void Convert8BitSamples(float *pout, const uint8_t *pin, float gain, float offset, size_t count)
Converts 8-bit ADC samples to floating point.
Definition RSRTB2kOscilloscope.cpp:2099
virtual float GetFunctionChannelAmplitude(int chan) override
Gets the amplitude for a function generator output.
Definition RSRTB2kOscilloscope.cpp:3259
virtual bool IsDigitalThresholdConfigurable() override
Checks if digital input threshold is configurable or fixed.
Definition RSRTB2kOscilloscope.cpp:3079
virtual bool SetInterleaving(bool combine) override
Configures the scope to combine channels.
Definition RSRTB2kOscilloscope.cpp:2937
virtual bool GetFunctionChannelActive(int chan) override
Returns true if the function generator channel's output is enabled.
Definition RSRTB2kOscilloscope.cpp:3200
virtual uint32_t GetInstrumentTypesForChannel(size_t i) const override
Returns a bitfield describing the set of instrument types that a given channel supports.
Definition RSRTB2kOscilloscope.cpp:437
virtual void FlushConfigCache() override
Instruments are allowed to cache configuration settings to reduce round trip queries to the device.
Definition RSRTB2kOscilloscope.cpp:307
virtual Oscilloscope::TriggerMode PollTrigger() override
Checks the curent trigger status.
Definition RSRTB2kOscilloscope.cpp:1156
virtual void SetChannelVoltageRange(size_t i, size_t stream, float range) override
Sets the range of the current channel configuration.
Definition RSRTB2kOscilloscope.cpp:958
virtual void SetFunctionChannelActive(int chan, bool on) override
Turns a function generator channel on or off.
Definition RSRTB2kOscilloscope.cpp:3219
virtual unsigned int GetChannelBandwidthLimit(size_t i) override
Gets the bandwidth limit for an input channel.
Definition RSRTB2kOscilloscope.cpp:701
virtual void StartSingleTrigger() override
Arms the trigger for a single acquistion.
Definition RSRTB2kOscilloscope.cpp:2582
virtual int64_t GetTriggerOffset() override
Gets the trigger offset.
Definition RSRTB2kOscilloscope.cpp:2966
virtual float GetChannelVoltageRange(size_t i, size_t stream) override
Gets the range of the current channel configuration.
Definition RSRTB2kOscilloscope.cpp:929
virtual bool IsTriggerArmed() override
Checks if the trigger is currently armed.
Definition RSRTB2kOscilloscope.cpp:1129
virtual void DisableChannel(size_t i) override
Turn a channel off, given the index.
Definition RSRTB2kOscilloscope.cpp:561
virtual bool IsInverted(size_t i) override
Checks if hardware polarity inversion is enabled for a channel.
Definition RSRTB2kOscilloscope.cpp:747
virtual void Stop() override
Stops triggering.
Definition RSRTB2kOscilloscope.cpp:2593
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 RSRTB2kOscilloscope.cpp:759
virtual void SetFunctionChannelOffset(int chan, float offset) override
Sets the DC offset for a function generator output.
Definition RSRTB2kOscilloscope.cpp:3312
virtual void SetDigitalThreshold(size_t channel, float level) override
Gets the threshold for a digital input.
Definition RSRTB2kOscilloscope.cpp:3162
void PullVideoTrigger()
Reads settings for a video trigger from the instrument.
Definition RSRTB2kOscilloscope.cpp:1881
virtual void SetFunctionChannelFallTime(int, float) override
Sets the fall time for a function generator output (if supported)
Definition RSRTB2kOscilloscope.cpp:3554
virtual void SetChannelAttenuation(size_t i, double atten) override
Sets the probe attenuation used for an input channel.
Definition RSRTB2kOscilloscope.cpp:678
virtual void SetSampleRate(uint64_t rate) override
Sets the sample rate of the scope, in Hz.
Definition RSRTB2kOscilloscope.cpp:2884
virtual void SetFunctionChannelRiseTime(int, float) override
Sets the rise time for a function generator output (if supported)
Definition RSRTB2kOscilloscope.cpp:3539
virtual void SetDigitalHysteresis(size_t channel, float level) override
Sets the hysteresis for a digital input.
Definition RSRTB2kOscilloscope.cpp:3143
virtual bool CanEnableChannel(size_t i) override
Determines if a channel can be enabled.
Definition RSRTB2kOscilloscope.cpp:554
virtual OscilloscopeChannel * GetExternalTrigger() override
Returns the external trigger input channel, if we have one.
Definition RSRTB2kOscilloscope.cpp:422
void GetTriggerSlope(Trigger *trig, std::string reply)
Processes the slope for an edge or edge-derived trigger.
Definition RSRTB2kOscilloscope.cpp:1061
virtual float GetFunctionChannelRiseTime(int) override
Gets the rise time for a function generator output (if supported)
Definition RSRTB2kOscilloscope.cpp:3518
void ForceHDMode(bool mode)
Forces 16-bit transfer mode on/off when for HD models.
Definition RSRTB2kOscilloscope.cpp:2040
virtual float GetFunctionChannelOffset(int chan) override
Gets the DC offset for a function generator output.
Definition RSRTB2kOscilloscope.cpp:3291
virtual std::vector< unsigned int > GetChannelBandwidthLimiters(size_t i) override
Gets the set of available bandwidth limiters for an input channel.
Definition RSRTB2kOscilloscope.cpp:690
virtual bool CanInvert(size_t i) override
Checks if a channel is capable of hardware polarity inversion.
Definition RSRTB2kOscilloscope.cpp:731
virtual std::vector< uint64_t > GetSampleDepthsNonInterleaved() override
Get the legal memory depths for this scope in all-channels mode.
Definition RSRTB2kOscilloscope.cpp:2626
static void Convert16BitSamplesGeneric(float *pout, const uint16_t *pin, float gain, float offset, size_t count)
Converts raw ADC samples to floating point.
Definition RSRTB2kOscilloscope.cpp:2089
virtual std::vector< DigitalBank > GetDigitalBanks() override
Gets the digital channel banks for this instrument.
Definition RSRTB2kOscilloscope.cpp:3033
virtual void Invert(size_t i, bool invert) override
Enables hardware polarity inversion for a channel, if supported.
Definition RSRTB2kOscilloscope.cpp:738
virtual void EnableTriggerOutput() override
Enables the trigger output, configuring a shared auxiliary port for this purpose if needed.
Definition RSRTB2kOscilloscope.cpp:2609
void BulkCheckChannelEnableState()
Optimized function for checking channel enable status en masse with less round trips to the scope.
Definition RSRTB2kOscilloscope.cpp:1202
void PushTimeoutTrigger(RSRTB2kTimeoutTrigger *trig)
Pushes settings for a timeout trigger to the instrument.
Definition RSRTB2kOscilloscope.cpp:1852
virtual std::vector< OscilloscopeChannel::CouplingType > GetAvailableCouplings(size_t i) override
Gets the set of legal coupling values for an input channel.
Definition RSRTB2kOscilloscope.cpp:600
virtual void SetFunctionChannelShape(int chan, WaveShape shape) override
Sets the waveform shape for a function generator output.
Definition RSRTB2kOscilloscope.cpp:3403
virtual std::vector< uint64_t > GetSampleRatesInterleaved() override
Get the legal sampling rates (in Hz) for this scope in combined-channels mode.
Definition RSRTB2kOscilloscope.cpp:2709
void PushRiseTimeTrigger(RSRTB2kRiseTimeTrigger *trig)
Pushes settings for a slew rate trigger to the instrument.
Definition RSRTB2kOscilloscope.cpp:1778
virtual void ForceTrigger() override
Forces a single acquisition as soon as possible.
Definition RSRTB2kOscilloscope.cpp:1135
virtual void SetFunctionChannelDutyCycle(int chan, float duty) override
Sets the duty cycle for a function generator output.
Definition RSRTB2kOscilloscope.cpp:3250
virtual void SetFunctionChannelAmplitude(int chan, float amplitude) override
Sets the amplitude for a function generator output.
Definition RSRTB2kOscilloscope.cpp:3282
virtual std::string GetChannelDisplayName(size_t i) override
Gets the hardware display name for a channel. This is an arbitrary user-selected string.
Definition RSRTB2kOscilloscope.cpp:804
virtual void SetTriggerOffset(int64_t offset) override
Sets the trigger offset.
Definition RSRTB2kOscilloscope.cpp:2947
virtual std::vector< uint64_t > GetSampleDepthsInterleaved() override
Get the legal memory depths for this scope in combined-channels mode.
Definition RSRTB2kOscilloscope.cpp:2619
Trigger::Condition GetCondition(std::string reply)
Parses a trigger condition.
Definition RSRTB2kOscilloscope.cpp:1247
void GetTriggerHysteresis(Trigger *trig, std::string reply)
Processes the channel hystersis for an trigger.
Definition RSRTB2kOscilloscope.cpp:1023
virtual bool IsDigitalHysteresisConfigurable() override
Checks if digital input hysteresis is configurable or fixed.
Definition RSRTB2kOscilloscope.cpp:3074
virtual void SetSampleDepth(uint64_t depth) override
Sets the sample depth of the scope.
Definition RSRTB2kOscilloscope.cpp:2868
void PullTriggerSource(Trigger *trig, std::string triggerModeName, bool isUart)
Reads the source of a trigger from the instrument.
Definition RSRTB2kOscilloscope.cpp:1379
virtual std::vector< uint64_t > GetSampleRatesNonInterleaved() override
Get the legal sampling rates (in Hz) for this scope in all-channels mode.
Definition RSRTB2kOscilloscope.cpp:2716
virtual bool HasFunctionRiseFallTimeControls(int chan) override
Determines if the function generator allows control over rise/fall times.
Definition RSRTB2kOscilloscope.cpp:3512
virtual bool IsChannelEnabled(size_t i) override
Checks if a channel is enabled in hardware.
Definition RSRTB2kOscilloscope.cpp:450
void PushEdgeTrigger(EdgeTrigger *trig, const std::string &trigType)
Pushes settings for an edge trigger to the instrument.
Definition RSRTB2kOscilloscope.cpp:1520
virtual bool IsInterleaving() override
Checks if the scope is currently combining channels.
Definition RSRTB2kOscilloscope.cpp:2913
virtual uint64_t GetSampleRate() override
Gets the current sampling rate (in Hz) of this scope.
Definition RSRTB2kOscilloscope.cpp:2825
virtual void Start() override
Starts the instrument in continuous trigger mode.
Definition RSRTB2kOscilloscope.cpp:2571
static void Convert16BitSamples(float *pout, const uint16_t *pin, float gain, float offset, size_t count)
Converts 16-bit ADC samples to floating point.
Definition RSRTB2kOscilloscope.cpp:2049
virtual std::vector< std::string > GetTriggerTypes() override
Gets a list of triggers this instrument supports.
Definition RSRTB2kOscilloscope.cpp:1328
virtual void SetFunctionChannelFrequency(int chan, float hz) override
Sets the frequency for a function generator output.
Definition RSRTB2kOscilloscope.cpp:3342
void PushRuntTrigger(RSRTB2kRuntTrigger *trig)
Pushes settings for a runt trigger to the instrument.
Definition RSRTB2kOscilloscope.cpp:1703
void PullLineTrigger()
Reads settings for a line trigger from the instrument.
Definition RSRTB2kOscilloscope.cpp:2003
void PushCondition(const std::string &path, Trigger::Condition cond)
Pushes settings for a trigger condition under a .Condition field.
Definition RSRTB2kOscilloscope.cpp:1269
virtual float GetFunctionChannelFrequency(int chan) override
Gets the frequency for a function generator output.
Definition RSRTB2kOscilloscope.cpp:3321
virtual void SetChannelOffset(size_t i, size_t stream, float offset) override
Sets the offset for a given channel.
Definition RSRTB2kOscilloscope.cpp:1004
void PullEdgeTrigger()
Reads settings for an edge trigger from the instrument.
Definition RSRTB2kOscilloscope.cpp:1480
virtual float GetFunctionChannelFallTime(int chan) override
Gets the fall time for a function generator output (if supported)
Definition RSRTB2kOscilloscope.cpp:3548
virtual double GetChannelAttenuation(size_t i) override
Gets the probe attenuation for an input channel.
Definition RSRTB2kOscilloscope.cpp:654
void PullRuntTrigger()
Reads settings for a runt-pulse trigger from the instrument.
Definition RSRTB2kOscilloscope.cpp:1667
void PushLineTrigger(LineTrigger *trig)
Pushes settings for a line trigger to the instrument.
Definition RSRTB2kOscilloscope.cpp:2029
virtual DigitalBank GetDigitalBank(size_t channel) override
Gets the bank containing a given channel.
Definition RSRTB2kOscilloscope.cpp:3054
static void Convert8BitSamplesGeneric(float *pout, const uint8_t *pin, float gain, float offset, size_t count)
Generic backend for Convert8BitSamples()
Definition RSRTB2kOscilloscope.cpp:2142
virtual std::vector< WaveShape > GetAvailableWaveformShapes(int chan) override
Query the set of available pre-defined waveforms for this generator.
Definition RSRTB2kOscilloscope.cpp:3178
virtual unsigned int GetInstrumentTypes() const override
Returns a bitfield describing the set of instrument types that this instrument supports.
Definition RSRTB2kOscilloscope.cpp:428
void PullRiseTimeTrigger()
Reads settings for a rise time trigger from the instrument.
Definition RSRTB2kOscilloscope.cpp:1733
Slew rate trigger - trigger when an edge rate meets the specified conditions.
Definition RSRTB2kRiseTimeTrigger.h:44
Runt trigger - trigger when a pulse of a given width crosses one threshold but not the second.
Definition RSRTB2kRuntTrigger.h:44
Trigger when a signal stops toggling for some amount of time.
Definition RSRTB2kTimeoutTrigger.h:44
Video or TV trigger is used to analyze analog baseband video signals.
Definition RSRTB2kVideoTrigger.h:44
Trigger on a pulse meeting certain width criteria.
Definition RSRTB2kWidthTrigger.h:42
An SCPI-based function generator.
Definition SCPIFunctionGenerator.h:38
An SCPI-based oscilloscope.
Definition SCPIOscilloscope.h:38
Abstraction of a transport layer for moving SCPI data between endpoints.
Definition SCPITransport.h:53
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
Definition RSRTB2kOscilloscope.h:212
Definition RSRTB2kOscilloscope.h:204