37#ifndef MockOscilloscope_h
38#define MockOscilloscope_h
48 const std::string& name,
53 const std::string&
args
57 Unit::UnitType units[7] = {
74 virtual std::string
IDPing()
override;
96 virtual void Start()
override;
98 virtual void Stop()
override;
106 virtual std::set<InterleaveConflict> GetInterleaveConflicts()
override;
131 std::map<size_t, bool> m_channelsEnabled;
132 std::map<size_t, OscilloscopeChannel::CouplingType> m_channelCoupling;
133 std::map<size_t, double> m_channelAttenuation;
134 std::map<size_t, unsigned int> m_channelBandwidth;
135 std::map<std::pair<size_t, size_t>,
float> m_channelVoltageRange;
136 std::map<std::pair<size_t, size_t>,
float> m_channelOffset;
Definition AcceleratorBuffer.h:204
All warnings generated by a configuration we're in the process of loading.
Definition ConfigWarningList.h:90
Bidirectional table mapping integer IDs in scopesession files to object pointers.
Definition IDTable.h:49
std::vector< InstrumentChannel * > m_channels
Set of all channels on this instrument.
Definition Instrument.h:294
Base class for simulated instruments.
Definition MockInstrument.h:44
Fake oscilloscope driver used for offline waveform analysis.
Definition MockOscilloscope.h:45
virtual std::vector< uint64_t > GetSampleRatesInterleaved() override
Get the legal sampling rates (in Hz) for this scope in combined-channels mode.
Definition MockOscilloscope.cpp:295
virtual void SetChannelVoltageRange(size_t i, size_t stream, float range) override
Sets the range of the current channel configuration.
Definition MockOscilloscope.cpp:268
virtual std::vector< OscilloscopeChannel::CouplingType > GetAvailableCouplings(size_t i) override
Gets the set of legal coupling values for an input channel.
Definition MockOscilloscope.cpp:222
virtual uint64_t GetSampleRate() override
Gets the current sampling rate (in Hz) of this scope.
Definition MockOscilloscope.cpp:323
virtual void SetChannelAttenuation(size_t i, double atten) override
Sets the probe attenuation used for an input channel.
Definition MockOscilloscope.cpp:248
virtual int64_t GetTriggerOffset() override
Gets the trigger offset.
Definition MockOscilloscope.cpp:348
virtual std::vector< uint64_t > GetSampleRatesNonInterleaved() override
Get the legal sampling rates (in Hz) for this scope in all-channels mode.
Definition MockOscilloscope.cpp:288
virtual float GetChannelOffset(size_t i, size_t stream) override
Gets the offset, in volts, for a given channel.
Definition MockOscilloscope.cpp:278
virtual uint32_t GetInstrumentTypesForChannel(size_t i) const override
Returns a bitfield describing the set of instrument types that a given channel supports.
Definition MockOscilloscope.cpp:81
virtual void DisableChannel(size_t i) override
Turn a channel off, given the index.
Definition MockOscilloscope.cpp:217
virtual bool IsInterleaving() override
Checks if the scope is currently combining channels.
Definition MockOscilloscope.cpp:354
virtual bool AcquireData() override
Pull data from the instrument.
Definition MockOscilloscope.cpp:95
virtual void PushTrigger() override
Pushes changes made to m_trigger to the instrument.
Definition MockOscilloscope.cpp:364
virtual OscilloscopeChannel::CouplingType GetChannelCoupling(size_t i) override
Gets the coupling used for an input channel.
Definition MockOscilloscope.cpp:233
virtual Oscilloscope::TriggerMode PollTrigger() override
Checks the curent trigger status.
Definition MockOscilloscope.cpp:89
virtual void PullTrigger() override
Updates m_trigger with any changes made from the instrument side.
Definition MockOscilloscope.cpp:369
virtual void Stop() override
Stops triggering.
Definition MockOscilloscope.cpp:116
virtual uint64_t GetSampleDepth() override
Gets the current sample depth of this scope.
Definition MockOscilloscope.cpp:328
virtual bool SetInterleaving(bool combine) override
Configures the scope to combine channels.
Definition MockOscilloscope.cpp:359
void AutoscaleVertical()
Calculate min/max of each channel and adjust gain/offset accordingly.
Definition MockOscilloscope.cpp:377
virtual void SetChannelBandwidthLimit(size_t i, unsigned int limit_mhz) override
Sets the bandwidth limit for an input channel.
Definition MockOscilloscope.cpp:258
virtual std::string IDPing() override
Returns the instrument's identification string.
Definition MockOscilloscope.cpp:71
virtual void EnableChannel(size_t i) override
Turn a channel on, given the index.
Definition MockOscilloscope.cpp:212
virtual unsigned int GetChannelBandwidthLimit(size_t i) override
Gets the bandwidth limit for an input channel.
Definition MockOscilloscope.cpp:253
virtual void SetTriggerOffset(int64_t offset) override
Sets the trigger offset.
Definition MockOscilloscope.cpp:343
virtual bool IsTriggerArmed() override
Checks if the trigger is currently armed.
Definition MockOscilloscope.cpp:126
virtual OscilloscopeChannel * GetExternalTrigger() override
Returns the external trigger input channel, if we have one.
Definition MockOscilloscope.cpp:273
virtual bool IsChannelEnabled(size_t i) override
Checks if a channel is enabled in hardware.
Definition MockOscilloscope.cpp:207
virtual float GetChannelVoltageRange(size_t i, size_t stream) override
Gets the range of the current channel configuration.
Definition MockOscilloscope.cpp:263
virtual void SetChannelOffset(size_t i, size_t stream, float offset) override
Sets the offset for a given channel.
Definition MockOscilloscope.cpp:283
virtual void ForceTrigger() override
Forces a single acquisition as soon as possible.
Definition MockOscilloscope.cpp:121
virtual void StartSingleTrigger() override
Arms the trigger for a single acquistion.
Definition MockOscilloscope.cpp:106
virtual std::vector< uint64_t > GetSampleDepthsNonInterleaved() override
Get the legal memory depths for this scope in all-channels mode.
Definition MockOscilloscope.cpp:309
virtual std::vector< uint64_t > GetSampleDepthsInterleaved() override
Get the legal memory depths for this scope in combined-channels mode.
Definition MockOscilloscope.cpp:316
virtual void SetChannelCoupling(size_t i, OscilloscopeChannel::CouplingType type) override
Sets the coupling used for an input channel.
Definition MockOscilloscope.cpp:238
virtual unsigned int GetInstrumentTypes() const override
Returns a bitfield describing the set of instrument types that this instrument supports.
Definition MockOscilloscope.cpp:76
virtual void SetSampleRate(uint64_t rate) override
Sets the sample rate of the scope, in Hz.
Definition MockOscilloscope.cpp:338
virtual void Start() override
Starts the instrument in continuous trigger mode.
Definition MockOscilloscope.cpp:111
virtual void SetSampleDepth(uint64_t depth) override
Sets the sample depth of the scope.
Definition MockOscilloscope.cpp:333
virtual double GetChannelAttenuation(size_t i) override
Gets the probe attenuation for an input channel.
Definition MockOscilloscope.cpp:243
A single channel on an oscilloscope.
Definition OscilloscopeChannel.h:49
Generic representation of an oscilloscope, logic analyzer, or spectrum analyzer.
Definition Oscilloscope.h:51
TriggerMode
Definition Oscilloscope.h:398