36#ifndef DSLabsOscilloscope_h
37#define DSLabsOscilloscope_h
39#include "RemoteBridgeOscilloscope.h"
40#include "../xptools/HzClock.h"
77 virtual void Start()
override;
84 virtual std::set<InterleaveConflict> GetInterleaveConflicts()
override;
94 virtual std::vector<std::string>
GetADCModeNames(
size_t channel)
override;
95 virtual size_t GetADCMode(
size_t channel)
override;
96 virtual void SetADCMode(
size_t channel,
size_t mode)
override;
119 void IdentifyHardware();
120 void ResetPerCaptureDiagnostics();
124 size_t m_analogChannelCount;
125 size_t m_digitalChannelBase;
126 size_t m_digitalChannelCount;
130 std::map<size_t, double> m_channelAttenuations;
133 float m_digitalThreshold;
135 void SendDataSocket(
size_t n,
const uint8_t* p);
136 bool ReadDataSocket(
size_t n, uint8_t* p);
149 static std::string GetDriverNameInternal();
DSLabsOscilloscope - driver for talking to the scopehal-dslabs-bridge daemons.
Definition: DSLabsOscilloscope.h:47
virtual bool IsInterleaving() override
Checks if the scope is currently combining channels.
Definition: DSLabsOscilloscope.cpp:644
virtual std::vector< uint64_t > GetSampleDepthsNonInterleaved() override
Get the legal memory depths for this scope in all-channels mode.
Definition: DSLabsOscilloscope.cpp:603
virtual void SetDigitalThreshold(size_t channel, float level) override
Gets the threshold for a digital input.
Definition: DSLabsOscilloscope.cpp:741
virtual std::vector< DigitalBank > GetDigitalBanks() override
Gets the digital channel banks for this instrument.
Definition: DSLabsOscilloscope.cpp:703
virtual DigitalBank GetDigitalBank(size_t channel) override
Gets the bank containing a given channel.
Definition: DSLabsOscilloscope.cpp:709
virtual bool IsDigitalThresholdConfigurable() override
Checks if digital input threshold is configurable or fixed.
Definition: DSLabsOscilloscope.cpp:720
virtual bool IsADCModeConfigurable() override
Returns true if the ADC is configurable, false if it can only run in one mode.
Definition: DSLabsOscilloscope.cpp:677
virtual std::vector< uint64_t > GetSampleRatesInterleaved() override
Get the legal sampling rates (in Hz) for this scope in combined-channels mode.
Definition: DSLabsOscilloscope.cpp:585
virtual double GetChannelAttenuation(size_t i) override
Gets the probe attenuation for an input channel.
Definition: DSLabsOscilloscope.cpp:264
virtual OscilloscopeChannel * GetExternalTrigger() override
Returns the external trigger input channel, if we have one.
Definition: DSLabsOscilloscope.cpp:291
virtual void SetChannelAttenuation(size_t i, double atten) override
Sets the probe attenuation used for an input channel.
Definition: DSLabsOscilloscope.cpp:270
virtual Oscilloscope::TriggerMode PollTrigger() override
Checks the curent trigger status.
Definition: DSLabsOscilloscope.cpp:297
virtual bool AcquireData() override
Pull data from the instrument.
Definition: DSLabsOscilloscope.cpp:304
virtual std::vector< OscilloscopeChannel::CouplingType > GetAvailableCouplings(size_t i) override
Gets the set of legal coupling values for an input channel.
Definition: DSLabsOscilloscope.cpp:656
virtual void SetADCMode(size_t channel, size_t mode) override
Sets the ADC mode for a channel.
Definition: DSLabsOscilloscope.cpp:695
virtual bool CanEnableChannel(size_t i) override
Determines if a channel can be enabled.
Definition: DSLabsOscilloscope.cpp:757
virtual size_t GetADCMode(size_t channel) override
Gets the ADC mode for a channel.
Definition: DSLabsOscilloscope.cpp:690
virtual bool IsDigitalHysteresisConfigurable() override
Checks if digital input hysteresis is configurable or fixed.
Definition: DSLabsOscilloscope.cpp:715
virtual void SetChannelBandwidthLimit(size_t i, unsigned int limit_mhz) override
Sets the bandwidth limit for an input channel.
Definition: DSLabsOscilloscope.cpp:287
virtual std::vector< AnalogBank > GetAnalogBanks() override
Gets the analog banks for this instrument.
Definition: DSLabsOscilloscope.cpp:664
virtual AnalogBank GetAnalogBank(size_t channel) override
Gets the bank containing a given channel.
Definition: DSLabsOscilloscope.cpp:671
virtual void Start() override
Starts the instrument in continuous trigger mode.
Definition: DSLabsOscilloscope.cpp:536
virtual void StartSingleTrigger() override
Arms the trigger for a single acquistion.
Definition: DSLabsOscilloscope.cpp:542
virtual unsigned int GetInstrumentTypes() const override
Returns a bitfield describing the set of instrument types that this instrument supports.
Definition: DSLabsOscilloscope.cpp:241
virtual std::vector< uint64_t > GetSampleDepthsInterleaved() override
Get the legal memory depths for this scope in combined-channels mode.
Definition: DSLabsOscilloscope.cpp:637
std::string GetChannelColor(size_t i)
Get a channel color based on DreamSource's standard color sequence.
Definition: DSLabsOscilloscope.cpp:171
virtual void SetDigitalHysteresis(size_t channel, float level) override
Sets the hysteresis for a digital input.
Definition: DSLabsOscilloscope.cpp:736
virtual void FlushConfigCache() override
Instruments are allowed to cache configuration settings to reduce round trip queries to the device.
Definition: DSLabsOscilloscope.cpp:259
virtual bool SetInterleaving(bool combine) override
Configures the scope to combine channels.
Definition: DSLabsOscilloscope.cpp:650
virtual float GetDigitalHysteresis(size_t channel) override
Gets the hysteresis for a digital input.
Definition: DSLabsOscilloscope.cpp:725
virtual unsigned int GetChannelBandwidthLimit(size_t i) override
Gets the bandwidth limit for an input channel.
Definition: DSLabsOscilloscope.cpp:282
virtual float GetDigitalThreshold(size_t channel) override
Gets the threshold for a digital input.
Definition: DSLabsOscilloscope.cpp:730
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: DSLabsOscilloscope.cpp:682
virtual void ForceTrigger() override
Forces a single acquisition as soon as possible.
Definition: DSLabsOscilloscope.cpp:548
virtual std::vector< uint64_t > GetSampleRatesNonInterleaved() override
Get the legal sampling rates (in Hz) for this scope in all-channels mode.
Definition: DSLabsOscilloscope.cpp:554
virtual uint32_t GetInstrumentTypesForChannel(size_t i) const override
Returns a bitfield describing the set of instrument types that a given channel supports.
Definition: DSLabsOscilloscope.cpp:246
DSLabsOscilloscope(SCPITransport *transport)
Initialize the driver.
Definition: DSLabsOscilloscope.cpp:60
A parameter to a filter.
Definition: FilterParameter.h:86
Clock that measures rate at which it is called; windowed average.
Definition: HzClock.h:52
A single channel on an oscilloscope.
Definition: OscilloscopeChannel.h:49
TriggerMode
Definition: Oscilloscope.h:411
An oscilloscope connected over a SDK-to-SCPI bridge that follows our pattern (i.e....
Definition: RemoteBridgeOscilloscope.h:40
Abstraction of a transport layer for moving SCPI data between endpoints.
Definition: SCPITransport.h:47