ngscopeclient 0.1-dev+51fbda87c
Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members

Driver for Tektronix oscilloscopes. More...

#include <TektronixOscilloscope.h>

Inheritance diagram for TektronixOscilloscope:
Inheritance graph
[legend]
Collaboration diagram for TektronixOscilloscope:
Collaboration graph
[legend]

Classes

struct  mso56_preamble
 Binary waveform header. More...
 

Public Member Functions

 TektronixOscilloscope (SCPITransport *transport)
 Initialize the driver. More...
 
 TektronixOscilloscope (const TektronixOscilloscope &rhs)=delete
 
TektronixOscilloscopeoperator= (const TektronixOscilloscope &rhs)=delete
 
virtual unsigned int GetInstrumentTypes () const override
 Returns a bitfield describing the set of instrument types that this instrument supports. More...
 
virtual void FlushConfigCache () override
 Instruments are allowed to cache configuration settings to reduce round trip queries to the device. More...
 
virtual uint32_t GetInstrumentTypesForChannel (size_t i) const override
 Returns a bitfield describing the set of instrument types that a given channel supports. More...
 
virtual bool IsChannelEnabled (size_t i) override
 Checks if a channel is enabled in hardware. More...
 
virtual void EnableChannel (size_t i) override
 Turn a channel on, given the index. More...
 
virtual bool CanEnableChannel (size_t i) override
 Determines if a channel can be enabled. More...
 
virtual void DisableChannel (size_t i) override
 Turn a channel off, given the index. More...
 
virtual OscilloscopeChannel::CouplingType GetChannelCoupling (size_t i) override
 Gets the coupling used for an input channel. More...
 
virtual void SetChannelCoupling (size_t i, OscilloscopeChannel::CouplingType type) override
 Sets the coupling used for an input channel. More...
 
virtual std::vector< OscilloscopeChannel::CouplingType > GetAvailableCouplings (size_t i) override
 Gets the set of legal coupling values for an input channel. More...
 
virtual double GetChannelAttenuation (size_t i) override
 Gets the probe attenuation for an input channel. More...
 
virtual void SetChannelAttenuation (size_t i, double atten) override
 Sets the probe attenuation used for an input channel. More...
 
virtual unsigned int GetChannelBandwidthLimit (size_t i) override
 Gets the bandwidth limit for an input channel. More...
 
virtual void SetChannelBandwidthLimit (size_t i, unsigned int limit_mhz) override
 Sets the bandwidth limit for an input channel. More...
 
virtual float GetChannelVoltageRange (size_t i, size_t stream) override
 Gets the range of the current channel configuration. More...
 
virtual void SetChannelVoltageRange (size_t i, size_t stream, float range) override
 Sets the range of the current channel configuration. More...
 
virtual OscilloscopeChannelGetExternalTrigger () override
 Returns the external trigger input channel, if we have one. More...
 
virtual float GetChannelOffset (size_t i, size_t stream) override
 Gets the offset, in volts, for a given channel. More...
 
virtual void SetChannelOffset (size_t i, size_t stream, float offset) override
 Sets the offset for a given channel. More...
 
virtual std::string GetChannelDisplayName (size_t i) override
 Gets the hardware display name for a channel. This is an arbitrary user-selected string. More...
 
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. More...
 
virtual std::vector< unsigned int > GetChannelBandwidthLimiters (size_t i) override
 Gets the set of available bandwidth limiters for an input channel. More...
 
Unit GetYAxisUnit (size_t i)
 
virtual bool CanDegauss (size_t i) override
 Determines if a channel has a probe connected which supports the "degauss" feature. More...
 
virtual bool ShouldDegauss (size_t i) override
 Determines if a channel requires a degauss cycle (if supported) More...
 
virtual void Degauss (size_t i) override
 Performs an "degauss" cycle on the attached active probe, if supported by the hardware. More...
 
virtual std::string GetProbeName (size_t i) override
 Returns the name of the probe connected to the scope, if possible. More...
 
virtual Oscilloscope::TriggerMode PollTrigger () override
 Checks the curent trigger status. More...
 
virtual bool PeekTriggerArmed () override
 Checks if the trigger is armed directly on the instrument, without altering internal state or touching caches. More...
 
virtual bool AcquireData () override
 Pull data from the instrument. More...
 
virtual void Start () override
 Starts the instrument in continuous trigger mode. More...
 
virtual void StartSingleTrigger () override
 Arms the trigger for a single acquistion. More...
 
virtual void Stop () override
 Stops triggering. More...
 
virtual void ForceTrigger () override
 Forces a single acquisition as soon as possible. More...
 
virtual bool IsTriggerArmed () override
 Checks if the trigger is currently armed. More...
 
virtual void PushTrigger () override
 Pushes changes made to m_trigger to the instrument. More...
 
virtual void PullTrigger () override
 Updates m_trigger with any changes made from the instrument side. More...
 
std::vector< std::string > GetTriggerTypes () override
 Gets a list of triggers this instrument supports. More...
 
virtual std::vector< uint64_t > GetSampleRatesNonInterleaved () override
 Get the legal sampling rates (in Hz) for this scope in all-channels mode. More...
 
virtual std::vector< uint64_t > GetSampleRatesInterleaved () override
 Get the legal sampling rates (in Hz) for this scope in combined-channels mode. More...
 
virtual std::set< InterleaveConflictGetInterleaveConflicts () override
 
virtual std::vector< uint64_t > GetSampleDepthsNonInterleaved () override
 Get the legal memory depths for this scope in all-channels mode. More...
 
virtual std::vector< uint64_t > GetSampleDepthsInterleaved () override
 Get the legal memory depths for this scope in combined-channels mode. More...
 
virtual uint64_t GetSampleRate () override
 Gets the current sampling rate (in Hz) of this scope. More...
 
virtual uint64_t GetSampleDepth () override
 Gets the current sample depth of this scope. More...
 
virtual void SetSampleDepth (uint64_t depth) override
 Sets the sample depth of the scope. More...
 
virtual void SetSampleRate (uint64_t rate) override
 Sets the sample rate of the scope, in Hz. More...
 
virtual void SetTriggerOffset (int64_t offset) override
 Sets the trigger offset. More...
 
virtual int64_t GetTriggerOffset () override
 Gets the trigger offset. More...
 
virtual bool IsInterleaving () override
 Checks if the scope is currently combining channels. More...
 
virtual bool SetInterleaving (bool combine) override
 Configures the scope to combine channels. More...
 
virtual void SetDeskewForChannel (size_t channel, int64_t skew) override
 Sets the deskew setting for a channel. More...
 
virtual int64_t GetDeskewForChannel (size_t channel) override
 Gets the deskew setting for a channel. More...
 
virtual void SetUseExternalRefclk (bool external) override
 Configures the instrument's clock source. More...
 
virtual void EnableTriggerOutput () override
 Enables the trigger output, configuring a shared auxiliary port for this purpose if needed. More...
 
virtual std::vector< DigitalBank > GetDigitalBanks () override
 Gets the digital channel banks for this instrument. More...
 
virtual DigitalBank GetDigitalBank (size_t channel) override
 Gets the bank containing a given channel. More...
 
virtual bool IsDigitalHysteresisConfigurable () override
 Checks if digital input hysteresis is configurable or fixed. More...
 
virtual bool IsDigitalThresholdConfigurable () override
 Checks if digital input threshold is configurable or fixed. More...
 
virtual float GetDigitalHysteresis (size_t channel) override
 Gets the hysteresis for a digital input. More...
 
virtual float GetDigitalThreshold (size_t channel) override
 Gets the threshold for a digital input. More...
 
virtual void SetDigitalHysteresis (size_t channel, float level) override
 Sets the hysteresis for a digital input. More...
 
virtual void SetDigitalThreshold (size_t channel, float level) override
 Gets the threshold for a digital input. More...
 
virtual unsigned int GetMeasurementTypes () override
 
virtual int GetMeterChannelCount ()
 
virtual int GetCurrentMeterChannel () override
 
virtual void SetCurrentMeterChannel (int chan) override
 
virtual MeasurementTypes GetMeterMode () override
 
virtual void SetMeterMode (MeasurementTypes type) override
 
virtual void SetMeterAutoRange (bool enable) override
 
virtual bool GetMeterAutoRange () override
 
virtual void StartMeter () override
 
virtual void StopMeter () override
 
virtual double GetMeterValue () override
 Get the value of the primary measurement. More...
 
virtual int GetMeterDigits () override
 Returns the digit resolution of the meter. More...
 
virtual std::vector< WaveShapeGetAvailableWaveformShapes (int chan) override
 Query the set of available pre-defined waveforms for this generator. More...
 
virtual bool GetFunctionChannelActive (int chan) override
 Returns true if the function generator channel's output is enabled. More...
 
virtual void SetFunctionChannelActive (int chan, bool on) override
 Turns a function generator channel on or off. More...
 
virtual float GetFunctionChannelDutyCycle (int chan) override
 Gets the duty cycle for a function generator output. More...
 
virtual void SetFunctionChannelDutyCycle (int chan, float duty) override
 Sets the duty cycle for a function generator output. More...
 
virtual float GetFunctionChannelAmplitude (int chan) override
 Gets the amplitude for a function generator output. More...
 
virtual void SetFunctionChannelAmplitude (int chan, float amplitude) override
 Sets the amplitude for a function generator output. More...
 
virtual float GetFunctionChannelOffset (int chan) override
 Gets the DC offset for a function generator output. More...
 
virtual void SetFunctionChannelOffset (int chan, float offset) override
 Sets the DC offset for a function generator output. More...
 
virtual float GetFunctionChannelFrequency (int chan) override
 Gets the frequency for a function generator output. More...
 
virtual void SetFunctionChannelFrequency (int chan, float hz) override
 Sets the frequency for a function generator output. More...
 
virtual WaveShape GetFunctionChannelShape (int chan) override
 Gets the waveform shape for a function generator output. More...
 
virtual void SetFunctionChannelShape (int chan, WaveShape shape) override
 Sets the waveform shape for a function generator output. More...
 
virtual bool HasFunctionRiseFallTimeControls (int chan) override
 Determines if the function generator allows control over rise/fall times. More...
 
virtual OutputImpedance GetFunctionChannelOutputImpedance (int chan) override
 Gets the currently selected output impedance for a function generator output (if supported) More...
 
virtual void SetFunctionChannelOutputImpedance (int chan, OutputImpedance z) override
 Sets the currently selected output impedance for a function generator output (if supported) More...
 
virtual bool HasFrequencyControls () override
 Returns true if the instrument has at least one frequency-domain channel. More...
 
virtual void SetSpan (int64_t span) override
 Sets the span for frequency-domain channels. More...
 
virtual int64_t GetSpan () override
 Gets the span for frequency-domain channels. More...
 
virtual void SetCenterFrequency (size_t channel, int64_t freq) override
 Sets the center frequency for frequency-domain channels. More...
 
virtual int64_t GetCenterFrequency (size_t channel) override
 Gets the center frequency for a frequency-domain channel. More...
 
virtual void SetResolutionBandwidth (int64_t rbw) override
 Gets the resolution bandwidth for frequency-domain channels. More...
 
virtual int64_t GetResolutionBandwidth () override
 Gets the resolution bandwidth for frequency-domain channels. More...
 
- Public Member Functions inherited from SCPIOscilloscope
virtual std::string IDPing ()
 Returns the instrument's identification string. More...
 
- Public Member Functions inherited from Oscilloscope
virtual std::string IDPing ()=0
 Returns the instrument's identification string. More...
 
virtual void FlushConfigCache ()
 Instruments are allowed to cache configuration settings to reduce round trip queries to the device. More...
 
virtual bool IsOffline ()
 Checks if the instrument is currently online. More...
 
OscilloscopeChannelGetOscilloscopeChannel (size_t i)
 Gets a channel by index. More...
 
virtual bool IsChannelEnabled (size_t i)=0
 Checks if a channel is enabled in hardware. More...
 
virtual void EnableChannel (size_t i)=0
 Turn a channel on, given the index. More...
 
virtual bool CanEnableChannel (size_t i)
 Determines if a channel can be enabled. More...
 
virtual void DisableChannel (size_t i)=0
 Turn a channel off, given the index. More...
 
int GetEnabledChannelCount ()
 Returns the number of enabled channels for this oscilloscope. More...
 
OscilloscopeChannelGetOscilloscopeChannelByHwName (const std::string &name)
 Gets a channel given the hardware name.
 
virtual OscilloscopeChannel::CouplingType GetChannelCoupling (size_t i)=0
 Gets the coupling used for an input channel. More...
 
virtual void SetChannelCoupling (size_t i, OscilloscopeChannel::CouplingType type)=0
 Sets the coupling used for an input channel. More...
 
virtual std::vector< OscilloscopeChannel::CouplingType > GetAvailableCouplings (size_t i)=0
 Gets the set of legal coupling values for an input channel. More...
 
virtual double GetChannelAttenuation (size_t i)=0
 Gets the probe attenuation for an input channel. More...
 
virtual void SetChannelAttenuation (size_t i, double atten)=0
 Sets the probe attenuation used for an input channel. More...
 
virtual std::vector< unsigned int > GetChannelBandwidthLimiters (size_t i)
 Gets the set of available bandwidth limiters for an input channel. More...
 
virtual unsigned int GetChannelBandwidthLimit (size_t i)=0
 Gets the bandwidth limit for an input channel. More...
 
virtual void SetChannelBandwidthLimit (size_t i, unsigned int limit_mhz)=0
 Sets the bandwidth limit for an input channel. More...
 
virtual OscilloscopeChannelGetExternalTrigger ()=0
 Returns the external trigger input channel, if we have one. More...
 
virtual float GetChannelVoltageRange (size_t i, size_t stream)=0
 Gets the range of the current channel configuration. More...
 
virtual void SetChannelVoltageRange (size_t i, size_t stream, float range)=0
 Sets the range of the current channel configuration. More...
 
virtual bool CanAutoZero (size_t i)
 Determines if a channel has a probe connected which supports the "auto zero" feature. More...
 
virtual void AutoZero (size_t i)
 Performs an "auto zero" cycle on the attached active probe, if supported by the hardware. More...
 
virtual bool CanDegauss (size_t i)
 Determines if a channel has a probe connected which supports the "degauss" feature. More...
 
virtual bool ShouldDegauss (size_t i)
 Determines if a channel requires a degauss cycle (if supported) More...
 
virtual void Degauss (size_t i)
 Performs an "degauss" cycle on the attached active probe, if supported by the hardware. More...
 
virtual bool CanAverage (size_t i)
 Determines if the channel supports hardware averaging. More...
 
virtual size_t GetNumAverages (size_t i)
 Returns the number of averages the channel is configured for. More...
 
virtual void SetNumAverages (size_t i, size_t navg)
 Sets the number of hardware averages to use. More...
 
virtual std::string GetProbeName (size_t i)
 Returns the name of the probe connected to the scope, if possible. More...
 
virtual bool HasInputMux (size_t i)
 Checks if a channel has an input multiplexer. More...
 
virtual size_t GetInputMuxSetting (size_t i)
 Gets the setting for a channel's input mux (if it has one) More...
 
virtual std::vector< std::string > GetInputMuxNames (size_t i)
 Gets names for the input mux ports of a channel. More...
 
virtual void SetInputMux (size_t i, size_t select)
 Sets the input mux for a channel. More...
 
virtual float GetChannelOffset (size_t i, size_t stream)=0
 Gets the offset, in volts, for a given channel. More...
 
virtual void SetChannelOffset (size_t i, size_t stream, float offset)=0
 Sets the offset for a given channel. More...
 
virtual bool CanInvert (size_t i)
 Checks if a channel is capable of hardware polarity inversion. More...
 
virtual void Invert (size_t i, bool invert)
 Enables hardware polarity inversion for a channel, if supported. More...
 
virtual bool IsInverted (size_t i)
 Checks if hardware polarity inversion is enabled for a channel. More...
 
virtual Oscilloscope::TriggerMode PollTrigger ()=0
 Checks the curent trigger status. More...
 
virtual bool PeekTriggerArmed ()
 Checks if the trigger is armed directly on the instrument, without altering internal state or touching caches. More...
 
bool WaitForTrigger (int timeout)
 Block until a trigger happens or a timeout elapses. More...
 
void SetTrigger (Trigger *trigger)
 Sets a new trigger on the instrument and pushes changes. More...
 
virtual void PushTrigger ()=0
 Pushes changes made to m_trigger to the instrument. More...
 
TriggerGetTrigger (bool sync=false)
 Gets the current trigger. More...
 
virtual std::vector< std::string > GetTriggerTypes ()
 Gets a list of triggers this instrument supports. More...
 
virtual void PullTrigger ()=0
 Updates m_trigger with any changes made from the instrument side. More...
 
virtual void Start ()=0
 Starts the instrument in continuous trigger mode. More...
 
virtual void StartSingleTrigger ()=0
 Arms the trigger for a single acquistion. More...
 
virtual void Stop ()=0
 Stops triggering. More...
 
virtual void ForceTrigger ()=0
 Forces a single acquisition as soon as possible. More...
 
virtual bool IsTriggerArmed ()=0
 Checks if the trigger is currently armed. More...
 
virtual void EnableTriggerOutput ()
 Enables the trigger output, configuring a shared auxiliary port for this purpose if needed. More...
 
virtual std::vector< uint64_t > GetSampleRatesNonInterleaved ()=0
 Get the legal sampling rates (in Hz) for this scope in all-channels mode. More...
 
virtual std::vector< uint64_t > GetSampleRatesInterleaved ()=0
 Get the legal sampling rates (in Hz) for this scope in combined-channels mode. More...
 
virtual uint64_t GetSampleRate ()=0
 Gets the current sampling rate (in Hz) of this scope. More...
 
virtual bool IsInterleaving ()=0
 Checks if the scope is currently combining channels. More...
 
virtual bool SetInterleaving (bool combine)=0
 Configures the scope to combine channels. More...
 
virtual bool CanInterleave ()
 Returns true if we have no interleave conflicts, false if we have conflicts. More...
 
virtual std::set< InterleaveConflictGetInterleaveConflicts ()=0
 
virtual std::vector< uint64_t > GetSampleDepthsNonInterleaved ()=0
 Get the legal memory depths for this scope in all-channels mode. More...
 
virtual std::vector< uint64_t > GetSampleDepthsInterleaved ()=0
 Get the legal memory depths for this scope in combined-channels mode. More...
 
virtual uint64_t GetSampleDepth ()=0
 Gets the current sample depth of this scope. More...
 
virtual void SetSampleDepth (uint64_t depth)=0
 Sets the sample depth of the scope. More...
 
virtual void SetSampleRate (uint64_t rate)=0
 Sets the sample rate of the scope, in Hz. More...
 
virtual bool IsSamplingModeAvailable (SamplingMode mode)
 Returns true if the requested sampling mode is available with the current instrument configuration. More...
 
virtual SamplingMode GetSamplingMode ()
 Gets the current sampling mode of the instrument. More...
 
virtual void SetSamplingMode (SamplingMode mode)
 Sets the current sampling mode of the instrument. More...
 
virtual void SetUseExternalRefclk (bool external)
 Configures the instrument's clock source. More...
 
virtual void SetTriggerOffset (int64_t offset)=0
 Sets the trigger offset. More...
 
virtual int64_t GetTriggerOffset ()=0
 Gets the trigger offset. More...
 
virtual void SetDeskewForChannel (size_t channel, int64_t skew)
 Sets the deskew setting for a channel. More...
 
virtual int64_t GetDeskewForChannel (size_t channel)
 Gets the deskew setting for a channel. More...
 
virtual std::vector< AnalogBank > GetAnalogBanks ()
 Gets the analog banks for this instrument. More...
 
virtual AnalogBank GetAnalogBank (size_t channel)
 Gets the bank containing a given channel. More...
 
virtual bool IsADCModeConfigurable ()
 Returns true if the ADC is configurable, false if it can only run in one mode. More...
 
virtual std::vector< std::string > GetADCModeNames (size_t channel)
 Gets the names of the ADC modes for the bank a given channel is located in. More...
 
virtual size_t GetADCMode (size_t channel)
 Gets the ADC mode for a channel. More...
 
virtual void SetADCMode (size_t channel, size_t mode)
 Sets the ADC mode for a channel. More...
 
virtual std::vector< DigitalBank > GetDigitalBanks ()
 Gets the digital channel banks for this instrument. More...
 
virtual DigitalBank GetDigitalBank (size_t channel)
 Gets the bank containing a given channel. More...
 
virtual bool IsDigitalHysteresisConfigurable ()
 Checks if digital input hysteresis is configurable or fixed. More...
 
virtual bool IsDigitalThresholdConfigurable ()
 Checks if digital input threshold is configurable or fixed. More...
 
virtual float GetDigitalHysteresis (size_t channel)
 Gets the hysteresis for a digital input. More...
 
virtual float GetDigitalThreshold (size_t channel)
 Gets the threshold for a digital input. More...
 
virtual void SetDigitalHysteresis (size_t channel, float level)
 Sets the hysteresis for a digital input. More...
 
virtual void SetDigitalThreshold (size_t channel, float level)
 Gets the threshold for a digital input. More...
 
virtual void SetSpan (int64_t span)
 Sets the span for frequency-domain channels. More...
 
virtual int64_t GetSpan ()
 Gets the span for frequency-domain channels. More...
 
virtual void SetCenterFrequency (size_t channel, int64_t freq)
 Sets the center frequency for frequency-domain channels. More...
 
virtual int64_t GetCenterFrequency (size_t channel)
 Gets the center frequency for a frequency-domain channel. More...
 
virtual void SetResolutionBandwidth (int64_t rbw)
 Gets the resolution bandwidth for frequency-domain channels. More...
 
virtual int64_t GetResolutionBandwidth ()
 Gets the resolution bandwidth for frequency-domain channels. More...
 
virtual bool HasFrequencyControls ()
 Returns true if the instrument has at least one frequency-domain channel. More...
 
virtual bool HasResolutionBandwidth ()
 Returns true if the instrument has a resolution bandwidth setting. More...
 
virtual bool HasTimebaseControls ()
 Returns true if the instrument has at least one time-domain channel. More...
 
bool HasPendingWaveforms ()
 
void ClearPendingWaveforms ()
 Discard any pending waveforms that haven't yet been processed.
 
size_t GetPendingWaveformCount ()
 
virtual bool PopPendingWaveform ()
 Pops the queue of pending waveforms and updates each channel with a new waveform.
 
virtual bool IsAppendingToWaveform ()
 Checks if we are appending to the existing waveform or creating a new one.
 
bool HasPendingDiagnosticLogMessages ()
 
std::string PopPendingDiagnosticLogMessage ()
 
std::map< std::string, FilterParameter * > & GetDiagnosticsValues ()
 
bool FreeWaveformPools ()
 Free all waveforms in our pool to reclaim memory. More...
 
void AddWaveformToAnalogPool (WaveformBase *w)
 
void AddWaveformToDigitalPool (WaveformBase *w)
 
- Public Member Functions inherited from Instrument
virtual unsigned int GetInstrumentTypes () const =0
 Returns a bitfield describing the set of instrument types that this instrument supports. More...
 
virtual std::string GetName () const =0
 
virtual std::string GetVendor () const =0
 
virtual std::string GetSerial () const =0
 
virtual std::string GetTransportConnectionString ()=0
 Gets the connection string for our transport. More...
 
virtual std::string GetTransportName ()=0
 Gets the name of our transport. More...
 
virtual uint32_t GetInstrumentTypesForChannel (size_t i) const =0
 Returns a bitfield describing the set of instrument types that a given channel supports. More...
 
size_t GetChannelCount () const
 Gets the number of channels (of any type) this instrument has.
 
InstrumentChannelGetChannel (size_t i) const
 Gets a given channel on the instrument. More...
 
virtual std::string GetChannelDisplayName (size_t i)
 Gets the hardware display name for a channel. This is an arbitrary user-selected string. More...
 
virtual void SetChannelDisplayName (size_t i, std::string name)
 Sets the hardware display name for a channel. This is an arbitrary user-selected string. More...
 
InstrumentChannelGetChannelByDisplayName (const std::string &name)
 Gets a channel given the display name.
 
InstrumentChannelGetChannelByHwName (const std::string &name)
 Gets a channel given the hardware name.
 
virtual bool AcquireData ()=0
 Pull data from the instrument. More...
 
virtual YAML::Node SerializeConfiguration (IDTable &table) const
 Serializes this instrument's configuration to a YAML node. More...
 
virtual void LoadConfiguration (int version, const YAML::Node &node, IDTable &idmap)
 Load instrument and channel configuration from a save file. More...
 
virtual void PreLoadConfiguration (int version, const YAML::Node &node, IDTable &idmap, ConfigWarningList &warnings)
 Parse a limited subset of instrument configuration but do not apply it. More...
 
- Public Member Functions inherited from SCPIInstrument
 SCPIInstrument (SCPITransport *transport, bool identify=true)
 
virtual std::string GetTransportConnectionString ()
 Gets the connection string for our transport. More...
 
virtual std::string GetTransportName ()
 Gets the name of our transport. More...
 
virtual std::string GetName () const
 
virtual std::string GetVendor () const
 
virtual std::string GetSerial () const
 
virtual std::string GetDriverName () const =0
 
- Public Member Functions inherited from SCPIDevice
 SCPIDevice (SCPITransport *transport, bool identify=true)
 
SCPITransportGetTransport () const
 
- Public Member Functions inherited from FunctionGenerator
virtual bool AcquireData () override
 Pull data from the instrument. More...
 
virtual bool GetFunctionChannelActive (int chan)=0
 Returns true if the function generator channel's output is enabled. More...
 
virtual void SetFunctionChannelActive (int chan, bool on)=0
 Turns a function generator channel on or off. More...
 
virtual bool HasFunctionDutyCycleControls (int chan)
 Determines if the function generator allows control over duty cycles. More...
 
virtual float GetFunctionChannelDutyCycle (int chan)
 Gets the duty cycle for a function generator output. More...
 
virtual void SetFunctionChannelDutyCycle (int chan, float duty)
 Sets the duty cycle for a function generator output. More...
 
virtual float GetFunctionChannelAmplitude (int chan)=0
 Gets the amplitude for a function generator output. More...
 
virtual void SetFunctionChannelAmplitude (int chan, float amplitude)=0
 Sets the amplitude for a function generator output. More...
 
virtual float GetFunctionChannelOffset (int chan)=0
 Gets the DC offset for a function generator output. More...
 
virtual void SetFunctionChannelOffset (int chan, float offset)=0
 Sets the DC offset for a function generator output. More...
 
virtual float GetFunctionChannelFrequency (int chan)=0
 Gets the frequency for a function generator output. More...
 
virtual void SetFunctionChannelFrequency (int chan, float hz)=0
 Sets the frequency for a function generator output. More...
 
virtual WaveShape GetFunctionChannelShape (int chan)=0
 Gets the waveform shape for a function generator output. More...
 
virtual void SetFunctionChannelShape (int chan, WaveShape shape)=0
 Sets the waveform shape for a function generator output. More...
 
virtual float GetFunctionChannelRiseTime (int chan)
 Gets the rise time for a function generator output (if supported) More...
 
virtual void SetFunctionChannelRiseTime (int chan, float fs)
 Sets the rise time for a function generator output (if supported) More...
 
virtual float GetFunctionChannelFallTime (int chan)
 Gets the fall time for a function generator output (if supported) More...
 
virtual void SetFunctionChannelFallTime (int chan, float fs)
 Sets the fall time for a function generator output (if supported) More...
 
virtual bool HasFunctionRiseFallTimeControls (int chan)=0
 Determines if the function generator allows control over rise/fall times. More...
 
virtual bool HasFunctionImpedanceControls (int chan)
 Determines if the function generator allows control over rise/fall times. More...
 
virtual OutputImpedance GetFunctionChannelOutputImpedance (int chan)
 Gets the currently selected output impedance for a function generator output (if supported) More...
 
virtual void SetFunctionChannelOutputImpedance (int chan, OutputImpedance z)
 Sets the currently selected output impedance for a function generator output (if supported) More...
 
virtual std::vector< WaveShapeGetAvailableWaveformShapes (int chan)=0
 Query the set of available pre-defined waveforms for this generator. More...
 
- Public Member Functions inherited from Multimeter
virtual unsigned int GetMeasurementTypes ()=0
 
virtual unsigned int GetSecondaryMeasurementTypes ()
 Gets a bitmask of secondary measurement types currently available. More...
 
virtual int GetCurrentMeterChannel ()=0
 
virtual void SetCurrentMeterChannel (int chan)=0
 
virtual MeasurementTypes GetMeterMode ()=0
 
virtual MeasurementTypes GetSecondaryMeterMode ()
 Gets the active secondary mode. More...
 
virtual std::string ModeToText (MeasurementTypes type)
 Converts a meter mode to human readable text.
 
MeasurementTypes TextToMode (const std::string &mode)
 Converts a textual meter mode to a mode ID.
 
virtual void SetMeterMode (MeasurementTypes type)=0
 
virtual void SetSecondaryMeterMode (MeasurementTypes type)
 Sets the active secondary mode. More...
 
virtual void SetMeterAutoRange (bool enable)=0
 
virtual bool GetMeterAutoRange ()=0
 
virtual void StartMeter ()=0
 
virtual void StopMeter ()=0
 
virtual Unit GetMeterUnit ()
 Get the current primary measurement unit.
 
virtual Unit GetSecondaryMeterUnit ()
 Get the current secondary measurement unit.
 
virtual double GetMeterValue ()=0
 Get the value of the primary measurement. More...
 
virtual double GetSecondaryMeterValue ()
 Get the value of the secondary measurement. More...
 
virtual int GetMeterDigits ()=0
 Returns the digit resolution of the meter. More...
 
virtual bool AcquireData () override
 Pull meter readings from hardware. More...
 

Static Public Member Functions

static std::string GetDriverNameInternal ()
 Return the constant driver name string "tektronix".
 
- Static Public Member Functions inherited from Oscilloscope
static void Convert8BitSamples (float *pout, const int8_t *pin, float gain, float offset, size_t count)
 Converts 8-bit ADC samples to floating point.
 
static void Convert8BitSamplesGeneric (float *pout, const int8_t *pin, float gain, float offset, size_t count)
 Generic backend for Convert8BitSamples()
 
static void ConvertUnsigned8BitSamples (float *pout, const uint8_t *pin, float gain, float offset, size_t count)
 Converts Unsigned 8-bit ADC samples to floating point.
 
static void ConvertUnsigned8BitSamplesGeneric (float *pout, const uint8_t *pin, float gain, float offset, size_t count)
 Generic backend for ConvertUnsigned8BitSamples()
 
static void Convert16BitSamples (float *pout, const int16_t *pin, float gain, float offset, size_t count)
 Converts 16-bit ADC samples to floating point.
 
static void Convert16BitSamplesGeneric (float *pout, const int16_t *pin, float gain, float offset, size_t count)
 Converts raw ADC samples to floating point.
 
static void DoAddDriverClass (std::string name, CreateProcType proc)
 
static void EnumDrivers (std::vector< std::string > &names)
 
static std::shared_ptr< OscilloscopeCreateOscilloscope (std::string driver, SCPITransport *transport)
 
- Static Public Member Functions inherited from SCPIFunctionGenerator
static void DoAddDriverClass (std::string name, GeneratorCreateProcType proc)
 
static void EnumDrivers (std::vector< std::string > &names)
 
static std::shared_ptr< SCPIFunctionGeneratorCreateFunctionGenerator (std::string driver, SCPITransport *transport)
 
- Static Public Member Functions inherited from FunctionGenerator
static std::string GetNameOfShape (WaveShape shape)
 Converts a WaveShape enum to a human readable name. More...
 
static WaveShape GetShapeOfName (const std::string &name)
 Converts a human readable name to a WaveShape. More...
 
static std::string GetNameOfImpedance (OutputImpedance imp)
 Converts an OutputImpedance enum to a human readable name. More...
 
static OutputImpedance GetImpedanceOfName (const std::string &name)
 Converts a human readable name to an OutputImpedance. More...
 
- Static Public Member Functions inherited from SCPIMultimeter
static void DoAddDriverClass (std::string name, MeterCreateProcType proc)
 
static void EnumDrivers (std::vector< std::string > &names)
 
static std::shared_ptr< SCPIMultimeterCreateMultimeter (std::string driver, SCPITransport *transport)
 

Protected Types

enum  ProbeType { PROBE_TYPE_ANALOG , PROBE_TYPE_ANALOG_250K , PROBE_TYPE_ANALOG_CURRENT , PROBE_TYPE_DIGITAL_8BIT }
 Type of probe connected to a hardware channel. More...
 
enum  Family { FAMILY_MSO5 , FAMILY_MSO6 , FAMILY_UNKNOWN }
 Type of scope we're connected to. More...
 
- Protected Types inherited from Oscilloscope
typedef std::map< StreamDescriptor, WaveformBase * > SequenceSet
 
typedef std::map< std::string, CreateProcType > CreateMapType
 
- Protected Types inherited from SCPIFunctionGenerator
typedef std::map< std::string, GeneratorCreateProcType > GeneratorCreateMapType
 
- Protected Types inherited from SCPIMultimeter
typedef std::map< std::string, MeterCreateProcType > MeterCreateMapType
 

Protected Member Functions

void ResynchronizeSCPI ()
 Attempt to recover synchronization between ngscopeclient and the scope-side SCPI stack. More...
 
bool ReadPreamble (std::string &preamble_in, mso56_preamble &preamble_out)
 Parses a waveform preamble. More...
 
bool AcquireDataMSO56 (std::map< int, std::vector< WaveformBase * > > &pending_waveforms)
 Acquire data from a MSO5 or MSO6 scope. More...
 
void DetectProbes ()
 Look at each input channel and determine what kind of probe, if any, is connected.
 
void PullEdgeTrigger ()
 Reads settings for an edge trigger from the instrument.
 
void PushEdgeTrigger (EdgeTrigger *trig)
 Pushes settings for an edge trigger to the instrument. More...
 
void PullPulseWidthTrigger ()
 Reads settings for a pulse width trigger from the instrument.
 
void PushPulseWidthTrigger (PulseWidthTrigger *trig)
 Pushes settings for a pulse width trigger to the instrument. More...
 
void PullDropoutTrigger ()
 Reads settings for a dropout trigger from the instrument. More...
 
void PushDropoutTrigger (DropoutTrigger *trig)
 Pushes settings for a dropout trigger to the instrument. More...
 
void PullRuntTrigger ()
 Reads settings for a runt trigger from the instrument.
 
void PushRuntTrigger (RuntTrigger *trig)
 Pushes settings for a runt trigger to the instrument. More...
 
void PullSlewRateTrigger ()
 Reads settings for a slew rate trigger from the instrument.
 
void PushSlewRateTrigger (SlewRateTrigger *trig)
 Pushes settings for a slew rate trigger to the instrument. More...
 
void PullWindowTrigger ()
 Reads settings for a window trigger from the instrument.
 
void PushWindowTrigger (WindowTrigger *trig)
 Pushes settings for a window trigger to the instrument. More...
 
float ReadTriggerLevelMSO56 (OscilloscopeChannel *chan)
 Determine the current trigger level. More...
 
void SetTriggerLevelMSO56 (Trigger *trig)
 Push the current trigger voltage level to hardware. More...
 
bool IsAnalog (size_t index)
 Check if a channel is analog given the index. More...
 
bool IsDigital (size_t index)
 Check if a channel is digital given the index. More...
 
bool IsSpectrum (size_t index)
 Check if a channel is spectrum given the index. More...
 
bool IsEnableStateDirty (size_t chan)
 Checks if the channel enable state of a channel is up to date. More...
 
void FlushChannelEnableStates ()
 Flushes pending channel enable/disable commands.
 
- Protected Member Functions inherited from Oscilloscope
void ChannelsDownloadStarted ()
 Helper method called by drivers to reset all channels to "waiting to download" state.
 
void ChannelsDownloadStatusUpdate (size_t ch, InstrumentChannel::DownloadState state, float progress)
 Helper method called by drivers to set one channel's download status and update its download progress. Be aware that there is a measurement on ngscopeclient UI of the time spent between the download start and the progress of the last enabled channel. This measurement is used to decide whether to display a progress bar or not. This download speed evaluation method only works if enabled channels are download sequencially in increasing numeric order or if all channels are downloaded at the same speed. More...
 
void ChannelsDownloadFinished ()
 Helper method called by drivers when waveform download is finished to reset all channels to "no download" state.
 
void DoSerializeConfiguration (YAML::Node &node, IDTable &table)
 Serializes this oscilloscope's configuration to a YAML node.
 
void DoLoadConfiguration (int version, const YAML::Node &node, IDTable &idmap)
 Load instrument and channel configuration from a save file.
 
void DoPreLoadConfiguration (int version, const YAML::Node &node, IDTable &idmap, ConfigWarningList &list)
 Validate instrument and channel configuration from a save file.
 
void AddDiagnosticLog (std::string message)
 
UniformAnalogWaveformAllocateAnalogWaveform (const std::string &name)
 
SparseDigitalWaveformAllocateDigitalWaveform (const std::string &name)
 
- Protected Member Functions inherited from SCPIInstrument
void DoSerializeConfiguration (YAML::Node &node, IDTable &table)
 
- Protected Member Functions inherited from FunctionGenerator
void DoSerializeConfiguration (YAML::Node &node, IDTable &table)
 Serializes this instrument's configuration to a YAML node. More...
 
void DoLoadConfiguration (int version, const YAML::Node &node, IDTable &idmap)
 Load instrument and channel configuration from a save file. More...
 
void DoPreLoadConfiguration (int version, const YAML::Node &node, IDTable &idmap, ConfigWarningList &list)
 Validate instrument and channel configuration from a save file. More...
 
- Protected Member Functions inherited from Multimeter
void DoSerializeConfiguration (YAML::Node &node, IDTable &table)
 Serializes this multimeter's configuration to a YAML node.
 
void DoLoadConfiguration (int version, const YAML::Node &node, IDTable &idmap)
 Load instrument and channel configuration from a save file.
 
void DoPreLoadConfiguration (int version, const YAML::Node &node, IDTable &idmap, ConfigWarningList &list)
 Validate instrument and channel configuration from a save file.
 

Protected Attributes

OscilloscopeChannelm_extTrigChannel
 External trigger.
 
FunctionGeneratorChannelm_awgChannel
 Function generator output.
 
unsigned int m_analogChannelCount
 Hardware analog channel count, independent of LA option etc.
 
std::map< size_t, float > m_channelOffsets
 Cached map of <channel ID, offset>
 
std::map< size_t, float > m_channelVoltageRanges
 Cached map of <channel ID, full scale range>
 
std::map< size_t, float > m_channelDigitalThresholds
 Cached map of <channel ID, digital threshold>
 
std::map< size_t, OscilloscopeChannel::CouplingType > m_channelCouplings
 Cached map of <channel ID, coupling>
 
std::map< size_t, double > m_channelAttenuations
 Cached map of <channel ID, attenuation>
 
std::map< size_t, int > m_channelBandwidthLimits
 Cached map of <channel ID, bandwidth limiter>
 
std::map< int, bool > m_channelsEnabled
 Cached map of <channel ID, enable flag>
 
std::map< int, int64_t > m_channelCenterFrequencies
 Cached map of <channel ID, center frequency>
 
bool m_triggerChannelValid
 True if m_triggerChannel is valid, false if out of sync.
 
size_t m_triggerChannel
 Index of the channel selected for triggering.
 
bool m_sampleRateValid
 True if m_sampleRate is valid, false if out of sync.
 
uint64_t m_sampleRate
 Acquisition sample rate, in samples/sec.
 
bool m_sampleDepthValid
 True if m_sampleDepth is valid, false if out of sync.
 
uint64_t m_sampleDepth
 Acquisition memory depth, in samples.
 
bool m_triggerOffsetValid
 True if m_triggerOffset is valid, false if out of sync.
 
int64_t m_triggerOffset
 Offset from start of wavefrom to trigger position.
 
bool m_spanValid
 True if span is valid, false if out of sync.
 
int64_t m_span
 Span value for frequency control.
 
std::map< size_t, int64_t > m_channelDeskew
 
std::map< size_t, ProbeTypem_probeTypes
 
std::map< size_t, std::string > m_probeNames
 
bool m_rbwValid
 
int64_t m_rbw
 
bool m_dmmAutorangeValid
 
bool m_dmmAutorange
 
bool m_dmmChannelValid
 
int m_dmmChannel
 
bool m_dmmModeValid
 
Multimeter::MeasurementTypes m_dmmMode
 
std::map< size_t, Unitm_channelUnits
 
std::map< OscilloscopeChannel *, size_t > m_flexChannelParents
 The analog channel for each flex channel.
 
std::map< OscilloscopeChannel *, size_t > m_flexChannelLanes
 
size_t m_digitalChannelBase
 Starting index for digital channels.
 
size_t m_digitalChannelCount
 Nuber of digital channels.
 
size_t m_spectrumChannelBase
 Starting index for spectrum channels.
 
bool m_triggerArmed
 True if trigger is armed, false if idle.
 
bool m_triggerOneShot
 True if trigger is single or forced, false if continuous.
 
unsigned int m_maxBandwidth
 Maximum bandwidth we support, in MHz.
 
enum TektronixOscilloscope::Family m_family
 
bool m_hasDVM
 True if we have the DVM option installed.
 
std::set< size_t > m_channelEnableStatusDirty
 True if this channel's status has changed (on/off) since the last time the trigger was armed. More...
 
bool m_hasAFG
 True if we have the AFG option installed.
 
bool m_afgEnabled
 True if the AFG is currently outputting a waveform.
 
float m_afgAmplitude
 Amplitude of the AFG output, in volts.
 
float m_afgOffset
 DC offset of the AFG output, in volts.
 
float m_afgFrequency
 Frequency of the AFG output, in Hz.
 
float m_afgDutyCycle
 Duty cycle of the AFG output (0-1)
 
FunctionGenerator::WaveShape m_afgShape
 Waveform the AFG is outputting.
 
FunctionGenerator::OutputImpedance m_afgImpedance
 Impedance selected for the AFG output.
 
- Protected Attributes inherited from SCPIOscilloscope
bool m_triggerArmed
 
bool m_triggerOneShot
 
std::recursive_mutex m_cacheMutex
 
- Protected Attributes inherited from Oscilloscope
std::list< SequenceSet > m_pendingWaveforms
 
std::mutex m_pendingWaveformsMutex
 
std::recursive_mutex m_mutex
 
std::deque< std::string > m_diagnosticLogMessages
 
std::map< std::string, FilterParameter * > m_diagnosticValues
 
Triggerm_trigger
 
WaveformPool m_analogWaveformPool
 
WaveformPool m_digitalWaveformPool
 
- Protected Attributes inherited from Instrument
std::list< sigc::slot< void(YAML::Node &, IDTable &)> > m_serializers
 List of methods which need to be called to serialize this node's configuration.
 
std::list< sigc::slot< void(int, const YAML::Node &, IDTable &)> > m_loaders
 List of methods which need to be called to deserialize this node's configuration.
 
std::list< sigc::slot< void(int, const YAML::Node &, IDTable &, ConfigWarningList &)> > m_preloaders
 List of methods which need to be called to pre-load this node's configuration.
 
std::vector< InstrumentChannel * > m_channels
 Set of all channels on this instrument.
 
- Protected Attributes inherited from SCPIDevice
SCPITransportm_transport
 
std::string m_vendor
 
std::string m_model
 
std::string m_serial
 
std::string m_fwVersion
 

Additional Inherited Members

- Public Types inherited from Oscilloscope
enum  TriggerMode {
  TRIGGER_MODE_RUN , TRIGGER_MODE_STOP , TRIGGER_MODE_TRIGGERED , TRIGGER_MODE_WAIT ,
  TRIGGER_MODE_AUTO , TRIGGER_MODE_COUNT
}
 
enum  SamplingMode { REAL_TIME , EQUIVALENT_TIME }
 
typedef std::pair< OscilloscopeChannel *, OscilloscopeChannel * > InterleaveConflict
 Get the set of conflicting channels. More...
 
typedef std::vector< OscilloscopeChannel * > AnalogBank
 
typedef std::vector< OscilloscopeChannel * > DigitalBank
 
typedef std::shared_ptr< Oscilloscope >(* CreateProcType) (SCPITransport *)
 
- Public Types inherited from Instrument
enum  InstrumentTypes {
  INST_OSCILLOSCOPE = 0x01 , INST_DMM = 0x02 , INST_PSU = 0x04 , INST_FUNCTION = 0x08 ,
  INST_RF_GEN = 0x10 , INST_LOAD = 0x20 , INST_BERT = 0x40 , INST_MISC = 0x80 ,
  INST_SWITCH_MATRIX = 0x100
}
 
- Public Types inherited from SCPIFunctionGenerator
typedef std::shared_ptr< SCPIFunctionGenerator >(* GeneratorCreateProcType) (SCPITransport *)
 
- Public Types inherited from FunctionGenerator
enum  WaveShape {
  SHAPE_SINE , SHAPE_SQUARE , SHAPE_TRIANGLE , SHAPE_PULSE ,
  SHAPE_DC , SHAPE_NOISE , SHAPE_SAWTOOTH_UP , SHAPE_SAWTOOTH_DOWN ,
  SHAPE_SINC , SHAPE_GAUSSIAN , SHAPE_LORENTZ , SHAPE_HALF_SINE ,
  SHAPE_PRBS_NONSTANDARD , SHAPE_EXPONENTIAL_RISE , SHAPE_EXPONENTIAL_DECAY , SHAPE_HAVERSINE ,
  SHAPE_CARDIAC , SHAPE_STAIRCASE_UP , SHAPE_STAIRCASE_DOWN , SHAPE_STAIRCASE_UP_DOWN ,
  SHAPE_NEGATIVE_PULSE , SHAPE_LOG_RISE , SHAPE_LOG_DECAY , SHAPE_SQUARE_ROOT ,
  SHAPE_CUBE_ROOT , SHAPE_QUADRATIC , SHAPE_CUBIC , SHAPE_DLORENTZ ,
  SHAPE_GAUSSIAN_PULSE , SHAPE_HAMMING , SHAPE_HANNING , SHAPE_KAISER ,
  SHAPE_BLACKMAN , SHAPE_GAUSSIAN_WINDOW , SHAPE_HARRIS , SHAPE_BARTLETT ,
  SHAPE_TAN , SHAPE_COT , SHAPE_SEC , SHAPE_CSC ,
  SHAPE_ASIN , SHAPE_ACOS , SHAPE_ATAN , SHAPE_ACOT ,
  SHAPE_ARB
}
 Predefined waveform shapes.
 
enum  OutputImpedance { IMPEDANCE_HIGH_Z , IMPEDANCE_50_OHM }
 Nominal output impedance for a function generator channel. More...
 
- Public Types inherited from SCPIMultimeter
typedef std::shared_ptr< SCPIMultimeter >(* MeterCreateProcType) (SCPITransport *)
 
- Public Types inherited from Multimeter
enum  MeasurementTypes {
  NONE = 0x000 , DC_VOLTAGE = 0x001 , DC_RMS_AMPLITUDE = 0x002 , AC_RMS_AMPLITUDE = 0x004 ,
  FREQUENCY = 0x008 , DC_CURRENT = 0x010 , AC_CURRENT = 0x020 , TEMPERATURE = 0x040 ,
  RESISTANCE = 0x080 , CAPACITANCE = 0x100 , CONTINUITY = 0x200 , DIODE = 0x400
}
 
- Public Attributes inherited from Instrument
std::string m_nickname
 Optional user-selected nickname of the instrument. More...
 
- Static Protected Attributes inherited from Oscilloscope
static CreateMapType m_createprocs
 
- Static Protected Attributes inherited from SCPIFunctionGenerator
static GeneratorCreateMapType m_gencreateprocs
 
- Static Protected Attributes inherited from SCPIMultimeter
static MeterCreateMapType m_metercreateprocs
 

Detailed Description

Driver for Tektronix oscilloscopes.

Tek scopes appear to adhere strictly to the LXI-style request-response model. Sending a new command while another is currently executing will result in one or both commands aborting. Unfortunately, this poses significant problems getting good performance over a high-latency WAN.

Additionally, at least the 5/6 series appear to maintain state in the SCPI parser across connections. If a command is sent and the connection is immediately dropped, reconnecting may result in seeing the reply!!

To read the error log (helpful for driver development): ALLEV? Should print one of the following messages: 0,"No events to report - queue empty" 1,"No events to report - new events pending *ESR?" ESR? Prints a status register, not quite sure what this does ALLEV? Prints the error log in a somewhat confusing and not-human-readable format

Other gotchas to be aware of: if you send a command that is malformed or the scope is not in the correct state for (e.g. querying status of a MSO channel when there is no MSO probe connected to that channel), it will be dropped silently and the scope may hang for a few seconds before processing more commands. Resync after this is difficult.

Just don't do it.

Member Enumeration Documentation

◆ Family

Type of scope we're connected to.

Enumerator
FAMILY_MSO5 

MSO5 series.

FAMILY_MSO6 

MSO6 series.

FAMILY_UNKNOWN 

Other or unknown.

◆ ProbeType

Type of probe connected to a hardware channel.

Enumerator
PROBE_TYPE_ANALOG 

Standard high impedance probe.

PROBE_TYPE_ANALOG_250K 

250K ohm high bandwidth probe

PROBE_TYPE_ANALOG_CURRENT 

Current probe.

PROBE_TYPE_DIGITAL_8BIT 

8-bit logic pod

Constructor & Destructor Documentation

◆ TektronixOscilloscope()

TektronixOscilloscope::TektronixOscilloscope ( SCPITransport transport)

Initialize the driver.

Parameters
transportSCPITransport connected to the scope

Member Function Documentation

◆ AcquireData()

bool TektronixOscilloscope::AcquireData ( )
overridevirtual

Pull data from the instrument.

Returns
True if waveform was acquired, false if connection lost or other serious error

Reimplemented from FunctionGenerator.

Reimplemented in TektronixHSIOscilloscope.

◆ AcquireDataMSO56()

bool TektronixOscilloscope::AcquireDataMSO56 ( std::map< int, std::vector< WaveformBase * > > &  pending_waveforms)
protected

Acquire data from a MSO5 or MSO6 scope.

Parameters
[out]pending_waveformsMap of channel number -> waveform
Returns
True on success, false on failure

◆ CanDegauss()

bool TektronixOscilloscope::CanDegauss ( size_t  i)
overridevirtual

Determines if a channel has a probe connected which supports the "degauss" feature.

This is typically true for current probes and false for most others.

Parameters
iZero-based index of channel

Reimplemented from Oscilloscope.

◆ CanEnableChannel()

bool TektronixOscilloscope::CanEnableChannel ( size_t  i)
overridevirtual

Determines if a channel can be enabled.

Returns
False if the channel cannot currently be used (due to interleave conflicts or other hardware limitations).

True if the channel is available or is already enabled.

Parameters
iZero-based index of channel

The default implementation always returns true.

Reimplemented from Oscilloscope.

◆ Degauss()

void TektronixOscilloscope::Degauss ( size_t  i)
overridevirtual

Performs an "degauss" cycle on the attached active probe, if supported by the hardware.

Parameters
iZero-based index of channel

Reimplemented from Oscilloscope.

◆ DisableChannel()

void TektronixOscilloscope::DisableChannel ( size_t  i)
overridevirtual

Turn a channel off, given the index.

This function may optionally configure channel interleaving, if supported in hardware.

Parameters
iZero-based index of channel

Implements Oscilloscope.

◆ EnableChannel()

void TektronixOscilloscope::EnableChannel ( size_t  i)
overridevirtual

Turn a channel on, given the index.

Parameters
iZero-based index of channel

Implements Oscilloscope.

◆ EnableTriggerOutput()

void TektronixOscilloscope::EnableTriggerOutput ( )
overridevirtual

Enables the trigger output, configuring a shared auxiliary port for this purpose if needed.

The default implementation does nothing, and is intended for instruments where the trigger output is always enabled.

Reimplemented from Oscilloscope.

◆ FlushConfigCache()

void TektronixOscilloscope::FlushConfigCache ( )
overridevirtual

Instruments are allowed to cache configuration settings to reduce round trip queries to the device.

In order to see updates made by the user at the front panel, the cache must be flushed.

Cache flushing is recommended to be manually triggered during interactive operation if there is no way to push updates from the scope to the driver.

In scripted/ATE environments where nobody should be touching the instrument, flushing is typically not needed.

The default implementation of this function does nothing since the base class provides no caching. If a derived class caches configuration, it should override this function to clear any cached data.

Reimplemented from Oscilloscope.

◆ ForceTrigger()

void TektronixOscilloscope::ForceTrigger ( )
overridevirtual

Forces a single acquisition as soon as possible.

Note that PollTrigger() may not return 'triggered' immediately, due to command processing latency.

Implements Oscilloscope.

◆ GetAvailableCouplings()

vector< OscilloscopeChannel::CouplingType > TektronixOscilloscope::GetAvailableCouplings ( size_t  i)
overridevirtual

Gets the set of legal coupling values for an input channel.

Parameters
iZero-based index of channel

Implements Oscilloscope.

◆ GetAvailableWaveformShapes()

vector< FunctionGenerator::WaveShape > TektronixOscilloscope::GetAvailableWaveformShapes ( int  chan)
overridevirtual

Query the set of available pre-defined waveforms for this generator.

Parameters
chanChannel index
Returns
Vector of supported WaveShape's

Implements FunctionGenerator.

◆ GetCenterFrequency()

int64_t TektronixOscilloscope::GetCenterFrequency ( size_t  channel)
overridevirtual

Gets the center frequency for a frequency-domain channel.

Parameters
channelChannel number

Reimplemented from Oscilloscope.

◆ GetChannelAttenuation()

double TektronixOscilloscope::GetChannelAttenuation ( size_t  i)
overridevirtual

Gets the probe attenuation for an input channel.

Note that this function returns attenuation, not gain. For example, a 10x probe would return 10 and not 0.1.

Parameters
iZero-based index of channel

Implements Oscilloscope.

◆ GetChannelBandwidthLimit()

unsigned int TektronixOscilloscope::GetChannelBandwidthLimit ( size_t  i)
overridevirtual

Gets the bandwidth limit for an input channel.

Parameters
iZero-based index of channel
Returns
Bandwidth limit, in MHz. Zero means "no bandwidth limit".

Implements Oscilloscope.

◆ GetChannelBandwidthLimiters()

vector< unsigned int > TektronixOscilloscope::GetChannelBandwidthLimiters ( size_t  i)
overridevirtual

Gets the set of available bandwidth limiters for an input channel.

Parameters
iZero-based index of channel

Reimplemented from Oscilloscope.

◆ GetChannelCoupling()

OscilloscopeChannel::CouplingType TektronixOscilloscope::GetChannelCoupling ( size_t  i)
overridevirtual

Gets the coupling used for an input channel.

Parameters
iZero-based index of channel

Implements Oscilloscope.

◆ GetChannelDisplayName()

string TektronixOscilloscope::GetChannelDisplayName ( size_t  i)
overridevirtual

Gets the hardware display name for a channel. This is an arbitrary user-selected string.

Some instruments allow displaying channel names in the GUI or on probes. If this is supported, the driver should override this function.

This function does not implement any caching, so calling it directly in performance critical code is not advisable. Instead, call InstrumentChannel::GetDisplayName(), which caches clientside and calls this function only on a cache miss.

The default implementation is a no-op.

Parameters
iZero-based index of channel

Reimplemented from Instrument.

◆ GetChannelOffset()

float TektronixOscilloscope::GetChannelOffset ( size_t  i,
size_t  stream 
)
overridevirtual

Gets the offset, in volts, for a given channel.

Parameters
iZero-based index of channel
streamZero-based index of stream within channel (0 if only one stream, as is normally the case)

Implements Oscilloscope.

◆ GetChannelVoltageRange()

float TektronixOscilloscope::GetChannelVoltageRange ( size_t  i,
size_t  stream 
)
overridevirtual

Gets the range of the current channel configuration.

The range is the distance, in volts, between the most negative/smallest and most positive/largest voltage which the ADC can represent using the current vertical gain configuration. This can be calculated as the number of vertical divisions times the number of volts per division.

The range does not depend on the offset.

Parameters
iZero-based index of channel
streamZero-based index of stream within channel (0 if only one stream, as is normally the case)

Implements Oscilloscope.

◆ GetCurrentMeterChannel()

int TektronixOscilloscope::GetCurrentMeterChannel ( )
overridevirtual

Implements Multimeter.

◆ GetDeskewForChannel()

int64_t TektronixOscilloscope::GetDeskewForChannel ( size_t  channel)
overridevirtual

Gets the deskew setting for a channel.

The default implementation returns zero, and is suitable for lower-end instruments that do not support deskew.

Reimplemented from Oscilloscope.

◆ GetDigitalBank()

Oscilloscope::DigitalBank TektronixOscilloscope::GetDigitalBank ( size_t  channel)
overridevirtual

Gets the bank containing a given channel.

Reimplemented from Oscilloscope.

◆ GetDigitalBanks()

vector< Oscilloscope::DigitalBank > TektronixOscilloscope::GetDigitalBanks ( )
overridevirtual

Gets the digital channel banks for this instrument.

A bank is a set of one or more channels all sharing a common threshold and hysteresis setting.

Reimplemented from Oscilloscope.

◆ GetDigitalHysteresis()

float TektronixOscilloscope::GetDigitalHysteresis ( size_t  channel)
overridevirtual

Gets the hysteresis for a digital input.

Reimplemented from Oscilloscope.

◆ GetDigitalThreshold()

float TektronixOscilloscope::GetDigitalThreshold ( size_t  channel)
overridevirtual

Gets the threshold for a digital input.

Reimplemented from Oscilloscope.

◆ GetExternalTrigger()

OscilloscopeChannel * TektronixOscilloscope::GetExternalTrigger ( )
overridevirtual

Returns the external trigger input channel, if we have one.

Note that some very high end oscilloscopes have multiple external trigger inputs. We do not currently support this.

Implements Oscilloscope.

◆ GetFunctionChannelActive()

bool TektronixOscilloscope::GetFunctionChannelActive ( int  chan)
overridevirtual

Returns true if the function generator channel's output is enabled.

Parameters
chanChannel index

Implements FunctionGenerator.

◆ GetFunctionChannelAmplitude()

float TektronixOscilloscope::GetFunctionChannelAmplitude ( int  chan)
overridevirtual

Gets the amplitude for a function generator output.

Parameters
chanChannel index
Returns
Amplitude, in Vpp

Implements FunctionGenerator.

◆ GetFunctionChannelDutyCycle()

float TektronixOscilloscope::GetFunctionChannelDutyCycle ( int  chan)
overridevirtual

Gets the duty cycle for a function generator output.

Parameters
chanChannel index
Returns
Duty cycle, in range [0, 1]

Reimplemented from FunctionGenerator.

◆ GetFunctionChannelFrequency()

float TektronixOscilloscope::GetFunctionChannelFrequency ( int  chan)
overridevirtual

Gets the frequency for a function generator output.

Parameters
chanChannel index
Returns
Frequency, in Hz

Implements FunctionGenerator.

◆ GetFunctionChannelOffset()

float TektronixOscilloscope::GetFunctionChannelOffset ( int  chan)
overridevirtual

Gets the DC offset for a function generator output.

Parameters
chanChannel index
Returns
Offset, in volts

Implements FunctionGenerator.

◆ GetFunctionChannelOutputImpedance()

FunctionGenerator::OutputImpedance TektronixOscilloscope::GetFunctionChannelOutputImpedance ( int  chan)
overridevirtual

Gets the currently selected output impedance for a function generator output (if supported)

Parameters
chanChannel index
Returns
Output impedance

Reimplemented from FunctionGenerator.

◆ GetFunctionChannelShape()

FunctionGenerator::WaveShape TektronixOscilloscope::GetFunctionChannelShape ( int  chan)
overridevirtual

Gets the waveform shape for a function generator output.

Parameters
chanChannel index
Returns
Waveform shape

Implements FunctionGenerator.

◆ GetInstrumentTypes()

unsigned int TektronixOscilloscope::GetInstrumentTypes ( ) const
overridevirtual

Returns a bitfield describing the set of instrument types that this instrument supports.

Not all types may be available on a given channel.

Implements Instrument.

◆ GetInstrumentTypesForChannel()

uint32_t TektronixOscilloscope::GetInstrumentTypesForChannel ( size_t  i) const
overridevirtual

Returns a bitfield describing the set of instrument types that a given channel supports.

Parameters
iChannel index

Implements Instrument.

◆ GetInterleaveConflicts()

set< Oscilloscope::InterleaveConflict > TektronixOscilloscope::GetInterleaveConflicts ( )
overridevirtual

Implements Oscilloscope.

◆ GetMeasurementTypes()

unsigned int TektronixOscilloscope::GetMeasurementTypes ( )
overridevirtual

Implements Multimeter.

◆ GetMeterAutoRange()

bool TektronixOscilloscope::GetMeterAutoRange ( )
overridevirtual

Implements Multimeter.

◆ GetMeterDigits()

int TektronixOscilloscope::GetMeterDigits ( )
overridevirtual

Returns the digit resolution of the meter.

Values are rounded up for display, for example a 5 3/4 digit meter should return 6 here.

Implements Multimeter.

◆ GetMeterMode()

Multimeter::MeasurementTypes TektronixOscilloscope::GetMeterMode ( )
overridevirtual

Implements Multimeter.

◆ GetMeterValue()

double TektronixOscilloscope::GetMeterValue ( )
overridevirtual

Get the value of the primary measurement.

Implements Multimeter.

◆ GetProbeName()

string TektronixOscilloscope::GetProbeName ( size_t  i)
overridevirtual

Returns the name of the probe connected to the scope, if possible.

If a passive or no probe is connected, or the instrument driver does not support probe identification, an empty string may be returned.

Parameters
iZero-based index of channel

Reimplemented from Oscilloscope.

◆ GetResolutionBandwidth()

int64_t TektronixOscilloscope::GetResolutionBandwidth ( )
overridevirtual

Gets the resolution bandwidth for frequency-domain channels.

Reimplemented from Oscilloscope.

◆ GetSampleDepth()

uint64_t TektronixOscilloscope::GetSampleDepth ( )
overridevirtual

Gets the current sample depth of this scope.

Implements Oscilloscope.

◆ GetSampleDepthsInterleaved()

vector< uint64_t > TektronixOscilloscope::GetSampleDepthsInterleaved ( )
overridevirtual

Get the legal memory depths for this scope in combined-channels mode.

Implements Oscilloscope.

◆ GetSampleDepthsNonInterleaved()

vector< uint64_t > TektronixOscilloscope::GetSampleDepthsNonInterleaved ( )
overridevirtual

Get the legal memory depths for this scope in all-channels mode.

Implements Oscilloscope.

◆ GetSampleRate()

uint64_t TektronixOscilloscope::GetSampleRate ( )
overridevirtual

Gets the current sampling rate (in Hz) of this scope.

Implements Oscilloscope.

◆ GetSampleRatesInterleaved()

vector< uint64_t > TektronixOscilloscope::GetSampleRatesInterleaved ( )
overridevirtual

Get the legal sampling rates (in Hz) for this scope in combined-channels mode.

Implements Oscilloscope.

◆ GetSampleRatesNonInterleaved()

vector< uint64_t > TektronixOscilloscope::GetSampleRatesNonInterleaved ( )
overridevirtual

Get the legal sampling rates (in Hz) for this scope in all-channels mode.

Implements Oscilloscope.

◆ GetSpan()

int64_t TektronixOscilloscope::GetSpan ( )
overridevirtual

Gets the span for frequency-domain channels.

Reimplemented from Oscilloscope.

◆ GetTriggerOffset()

int64_t TektronixOscilloscope::GetTriggerOffset ( )
overridevirtual

Gets the trigger offset.

Implements Oscilloscope.

◆ GetTriggerTypes()

vector< string > TektronixOscilloscope::GetTriggerTypes ( )
overridevirtual

Gets a list of triggers this instrument supports.

Reimplemented from Oscilloscope.

◆ HasFrequencyControls()

bool TektronixOscilloscope::HasFrequencyControls ( )
overridevirtual

Returns true if the instrument has at least one frequency-domain channel.

Reimplemented from Oscilloscope.

◆ HasFunctionRiseFallTimeControls()

bool TektronixOscilloscope::HasFunctionRiseFallTimeControls ( int  chan)
overridevirtual

Determines if the function generator allows control over rise/fall times.

If this function returns false, GetFunctionChannelRiseTime() and GetFunctionChannelFallTime() will always return 0, and SetFunctionChannelRiseTime() and SetFunctionChannelFallTime() are no-ops.

Parameters
chanChannel index
Returns
True if rise/fall time control is available, false if unavailable

Implements FunctionGenerator.

◆ IsAnalog()

bool TektronixOscilloscope::IsAnalog ( size_t  index)
inlineprotected

Check if a channel is analog given the index.

Parameters
indexChannel number
Returns
True if analog, false if spectrum or digital

◆ IsChannelEnabled()

bool TektronixOscilloscope::IsChannelEnabled ( size_t  i)
overridevirtual

Checks if a channel is enabled in hardware.

Implements Oscilloscope.

◆ IsDigital()

bool TektronixOscilloscope::IsDigital ( size_t  index)
inlineprotected

Check if a channel is digital given the index.

Parameters
indexChannel number
Returns
True if digital, false if spectrum or analog

◆ IsDigitalHysteresisConfigurable()

bool TektronixOscilloscope::IsDigitalHysteresisConfigurable ( )
overridevirtual

Checks if digital input hysteresis is configurable or fixed.

Returns
true if configurable, false if fixed

Reimplemented from Oscilloscope.

◆ IsDigitalThresholdConfigurable()

bool TektronixOscilloscope::IsDigitalThresholdConfigurable ( )
overridevirtual

Checks if digital input threshold is configurable or fixed.

Returns
true if configurable, false if fixed

Reimplemented from Oscilloscope.

◆ IsEnableStateDirty()

bool TektronixOscilloscope::IsEnableStateDirty ( size_t  chan)
protected

Checks if the channel enable state of a channel is up to date.

Parameters
chanChannel index
Returns
True if up to date, false if not

◆ IsInterleaving()

bool TektronixOscilloscope::IsInterleaving ( )
overridevirtual

Checks if the scope is currently combining channels.

Implements Oscilloscope.

◆ IsSpectrum()

bool TektronixOscilloscope::IsSpectrum ( size_t  index)
inlineprotected

Check if a channel is spectrum given the index.

Parameters
indexChannel number
Returns
True if spectrum, false if analog or digital

◆ IsTriggerArmed()

bool TektronixOscilloscope::IsTriggerArmed ( )
overridevirtual

Checks if the trigger is currently armed.

Implements Oscilloscope.

◆ PeekTriggerArmed()

bool TektronixOscilloscope::PeekTriggerArmed ( )
overridevirtual

Checks if the trigger is armed directly on the instrument, without altering internal state or touching caches.

The default implementation of this function simply calls PollTrigger(). This function should be overridden by the driver class if PollTrigger() changes any internal driver state or accesses cached state (including a clientside "trigger armed" flag).

In particular, the multi-scope synchronization feature requires that this function not return true until the instment has confirmed the arm command has completely executed. Otherwise we risk losing trigger events by arming the primary before the secondary is ready to accept a trigger.

Reimplemented from Oscilloscope.

◆ PollTrigger()

Oscilloscope::TriggerMode TektronixOscilloscope::PollTrigger ( )
overridevirtual

Checks the curent trigger status.

Implements Oscilloscope.

Reimplemented in TektronixHSIOscilloscope.

◆ PullDropoutTrigger()

void TektronixOscilloscope::PullDropoutTrigger ( )
protected

Reads settings for a dropout trigger from the instrument.

Note that Tek's UI calls it "timeout" not "dropout" but the functionality is the same.

◆ PullTrigger()

void TektronixOscilloscope::PullTrigger ( )
overridevirtual

Updates m_trigger with any changes made from the instrument side.

Implements Oscilloscope.

◆ PushDropoutTrigger()

void TektronixOscilloscope::PushDropoutTrigger ( DropoutTrigger trig)
protected

Pushes settings for a dropout trigger to the instrument.

Parameters
trigThe trigger to push

◆ PushEdgeTrigger()

void TektronixOscilloscope::PushEdgeTrigger ( EdgeTrigger trig)
protected

Pushes settings for an edge trigger to the instrument.

Parameters
trigThe trigger to push

◆ PushPulseWidthTrigger()

void TektronixOscilloscope::PushPulseWidthTrigger ( PulseWidthTrigger trig)
protected

Pushes settings for a pulse width trigger to the instrument.

Parameters
trigThe trigger to push

◆ PushRuntTrigger()

void TektronixOscilloscope::PushRuntTrigger ( RuntTrigger trig)
protected

Pushes settings for a runt trigger to the instrument.

Parameters
trigThe trigger to push

◆ PushSlewRateTrigger()

void TektronixOscilloscope::PushSlewRateTrigger ( SlewRateTrigger trig)
protected

Pushes settings for a slew rate trigger to the instrument.

Parameters
trigThe trigger to push

◆ PushTrigger()

void TektronixOscilloscope::PushTrigger ( )
overridevirtual

Pushes changes made to m_trigger to the instrument.

Implements Oscilloscope.

◆ PushWindowTrigger()

void TektronixOscilloscope::PushWindowTrigger ( WindowTrigger trig)
protected

Pushes settings for a window trigger to the instrument.

Parameters
trigThe trigger to push

◆ ReadPreamble()

bool TektronixOscilloscope::ReadPreamble ( std::string &  preamble_in,
mso56_preamble preamble_out 
)
protected

Parses a waveform preamble.

Parameters
[in]preamble_inRaw string preamble
[out]preamble_outParsed preamble data

◆ ReadTriggerLevelMSO56()

float TektronixOscilloscope::ReadTriggerLevelMSO56 ( OscilloscopeChannel chan)
protected

Determine the current trigger level.

Parameters
chanThe channel selected as the trigger source
Returns
The current trigger level, in volts

◆ ResynchronizeSCPI()

void TektronixOscilloscope::ResynchronizeSCPI ( )
protected

Attempt to recover synchronization between ngscopeclient and the scope-side SCPI stack.

This involves a lot of ugly hacks while attempting to undo behavior the scope should never have had in the first place (keeping application layer protocol state across client disconnect/reconnect events).

We flush the receive buffer twice at the scope side, throw away anything in the socket RX buffer, then send a PRBS-3 of two different query commands with predictable output. By cross-correlating the replies with the sent commands, we can determine how many lines worth of garbage were in the instrument's TX buffer, discard them, and recover sync.

In theory. It doesn't always work and sometimes things are completely hosed until the scope reboots.

◆ SetCenterFrequency()

void TektronixOscilloscope::SetCenterFrequency ( size_t  channel,
int64_t  freq 
)
overridevirtual

Sets the center frequency for frequency-domain channels.

Parameters
channelChannel number
freqCenter frequency, in Hz

Reimplemented from Oscilloscope.

◆ SetChannelAttenuation()

void TektronixOscilloscope::SetChannelAttenuation ( size_t  i,
double  atten 
)
overridevirtual

Sets the probe attenuation used for an input channel.

Parameters
iZero-based index of channel
attenAttenuation factor

Implements Oscilloscope.

◆ SetChannelBandwidthLimit()

void TektronixOscilloscope::SetChannelBandwidthLimit ( size_t  i,
unsigned int  limit_mhz 
)
overridevirtual

Sets the bandwidth limit for an input channel.

Parameters
iZero-based index of channel
limit_mhzBandwidth limit, in MHz. Zero means "no bandwidth limit".

Implements Oscilloscope.

◆ SetChannelCoupling()

void TektronixOscilloscope::SetChannelCoupling ( size_t  i,
OscilloscopeChannel::CouplingType  type 
)
overridevirtual

Sets the coupling used for an input channel.

Parameters
iZero-based index of channel

Implements Oscilloscope.

◆ SetChannelDisplayName()

void TektronixOscilloscope::SetChannelDisplayName ( size_t  i,
std::string  name 
)
overridevirtual

Sets the hardware display name for a channel. This is an arbitrary user-selected string.

Some instruments allow displaying channel names in the GUI or on probes. If this is supported, the driver should override this function.

This function directly updates hardware without caching. In most cases, you should call InstrumentChannel::SetDisplayName(), which updates the clientside cache and then calls this function.

The default function returns the hardware name.

Parameters
iZero-based index of channel
nameName of the channel

Reimplemented from Instrument.

◆ SetChannelOffset()

void TektronixOscilloscope::SetChannelOffset ( size_t  i,
size_t  stream,
float  offset 
)
overridevirtual

Sets the offset for a given channel.

Parameters
iZero-based index of channel
streamZero-based index of stream within channel (0 if only one stream, as is normally the case)
offsetOffset, in volts

Implements Oscilloscope.

◆ SetChannelVoltageRange()

void TektronixOscilloscope::SetChannelVoltageRange ( size_t  i,
size_t  stream,
float  range 
)
overridevirtual

Sets the range of the current channel configuration.

The range is the distance, in volts, between the most negative/smallest and most positive/largest voltage which the ADC can represent using the current vertical gain configuration. This can be calculated as the number of vertical divisions times the number of volts per division.

The range does not depend on the offset.

Parameters
iZero-based index of channel
streamZero-based index of stream within channel (0 if only one stream, as is normally the case)
rangeVoltage range

Implements Oscilloscope.

◆ SetCurrentMeterChannel()

void TektronixOscilloscope::SetCurrentMeterChannel ( int  chan)
overridevirtual

Implements Multimeter.

◆ SetDeskewForChannel()

void TektronixOscilloscope::SetDeskewForChannel ( size_t  channel,
int64_t  skew 
)
overridevirtual

Sets the deskew setting for a channel.

Parameters
channelThe channel to deskew
skewSkew value, in femtoseconds. Negative values move the channel earlier relative to the zero point. Positive values move the channel later.

The default implementation does nothing, and is suitable for lower-end instruments that do not support deskew.

Reimplemented from Oscilloscope.

◆ SetDigitalHysteresis()

void TektronixOscilloscope::SetDigitalHysteresis ( size_t  channel,
float  level 
)
overridevirtual

Sets the hysteresis for a digital input.

Reimplemented from Oscilloscope.

◆ SetDigitalThreshold()

void TektronixOscilloscope::SetDigitalThreshold ( size_t  channel,
float  level 
)
overridevirtual

Gets the threshold for a digital input.

Reimplemented from Oscilloscope.

◆ SetFunctionChannelActive()

void TektronixOscilloscope::SetFunctionChannelActive ( int  chan,
bool  on 
)
overridevirtual

Turns a function generator channel on or off.

Parameters
chanChannel index
onTrue to enable output, false to disable

Implements FunctionGenerator.

◆ SetFunctionChannelAmplitude()

void TektronixOscilloscope::SetFunctionChannelAmplitude ( int  chan,
float  amplitude 
)
overridevirtual

Sets the amplitude for a function generator output.

Parameters
chanChannel index
amplitudeOutput amplitude, in Vpp

Implements FunctionGenerator.

◆ SetFunctionChannelDutyCycle()

void TektronixOscilloscope::SetFunctionChannelDutyCycle ( int  chan,
float  duty 
)
overridevirtual

Sets the duty cycle for a function generator output.

Parameters
chanChannel index
dutyDuty cycle, in range [0, 1]

Reimplemented from FunctionGenerator.

◆ SetFunctionChannelFrequency()

void TektronixOscilloscope::SetFunctionChannelFrequency ( int  chan,
float  hz 
)
overridevirtual

Sets the frequency for a function generator output.

Parameters
chanChannel index
hzFrequency, in Hz

Implements FunctionGenerator.

◆ SetFunctionChannelOffset()

void TektronixOscilloscope::SetFunctionChannelOffset ( int  chan,
float  offset 
)
overridevirtual

Sets the DC offset for a function generator output.

Parameters
chanChannel index
amplitudeOffset, in volts

Implements FunctionGenerator.

◆ SetFunctionChannelOutputImpedance()

void TektronixOscilloscope::SetFunctionChannelOutputImpedance ( int  chan,
OutputImpedance  z 
)
overridevirtual

Sets the currently selected output impedance for a function generator output (if supported)

Parameters
chanChannel index
zOutput impedance

Reimplemented from FunctionGenerator.

◆ SetFunctionChannelShape()

void TektronixOscilloscope::SetFunctionChannelShape ( int  chan,
WaveShape  shape 
)
overridevirtual

Sets the waveform shape for a function generator output.

Parameters
chanChannel index
shapeDesired output waveform

Implements FunctionGenerator.

◆ SetInterleaving()

bool TektronixOscilloscope::SetInterleaving ( bool  combine)
overridevirtual

Configures the scope to combine channels.

This function may fail to enable channel combining if conflicts are present, check the return value!

Returns
True if channel combining is enabled, false if not

Implements Oscilloscope.

◆ SetMeterAutoRange()

void TektronixOscilloscope::SetMeterAutoRange ( bool  enable)
overridevirtual

Implements Multimeter.

◆ SetMeterMode()

void TektronixOscilloscope::SetMeterMode ( MeasurementTypes  type)
overridevirtual

Implements Multimeter.

◆ SetResolutionBandwidth()

void TektronixOscilloscope::SetResolutionBandwidth ( int64_t  rbw)
overridevirtual

Gets the resolution bandwidth for frequency-domain channels.

Reimplemented from Oscilloscope.

◆ SetSampleDepth()

void TektronixOscilloscope::SetSampleDepth ( uint64_t  depth)
overridevirtual

Sets the sample depth of the scope.

Implements Oscilloscope.

◆ SetSampleRate()

void TektronixOscilloscope::SetSampleRate ( uint64_t  rate)
overridevirtual

Sets the sample rate of the scope, in Hz.

Implements Oscilloscope.

◆ SetSpan()

void TektronixOscilloscope::SetSpan ( int64_t  span)
overridevirtual

Sets the span for frequency-domain channels.

Parameters
spanSpan, in Hz

Reimplemented from Oscilloscope.

◆ SetTriggerLevelMSO56()

void TektronixOscilloscope::SetTriggerLevelMSO56 ( Trigger trig)
protected

Push the current trigger voltage level to hardware.

Parameters
trigThe trigger to push

◆ SetTriggerOffset()

void TektronixOscilloscope::SetTriggerOffset ( int64_t  offset)
overridevirtual

Sets the trigger offset.

Parameters
offsetFemtoseconds from the start of the capture to the trigger point. Positive values mean the trigger is within the waveform. Negative values mean there is a delay from the trigger point to the start of the waveform.

Implements Oscilloscope.

◆ SetUseExternalRefclk()

void TektronixOscilloscope::SetUseExternalRefclk ( bool  external)
overridevirtual

Configures the instrument's clock source.

Parameters
externalTrue to use external reference False to use internal clock

The default implementation prints an "unsupported operation" warning, and is suitable for lower-end instruments that do not support external clock inputs.

Reimplemented from Oscilloscope.

◆ ShouldDegauss()

bool TektronixOscilloscope::ShouldDegauss ( size_t  i)
overridevirtual

Determines if a channel requires a degauss cycle (if supported)

Parameters
iZero-based index of channel

Reimplemented from Oscilloscope.

◆ Start()

void TektronixOscilloscope::Start ( )
overridevirtual

Starts the instrument in continuous trigger mode.

Most drivers will implement this as repeated calls to the "single trigger" function to avoid race conditions when the instrument triggers halfway through downloading captured waveforms.

Implements Oscilloscope.

Reimplemented in TektronixHSIOscilloscope.

◆ StartMeter()

void TektronixOscilloscope::StartMeter ( )
overridevirtual

Implements Multimeter.

◆ StartSingleTrigger()

void TektronixOscilloscope::StartSingleTrigger ( )
overridevirtual

Arms the trigger for a single acquistion.

Implements Oscilloscope.

Reimplemented in TektronixHSIOscilloscope.

◆ Stop()

void TektronixOscilloscope::Stop ( )
overridevirtual

Stops triggering.

Implements Oscilloscope.

Reimplemented in TektronixHSIOscilloscope.

◆ StopMeter()

void TektronixOscilloscope::StopMeter ( )
overridevirtual

Implements Multimeter.

Member Data Documentation

◆ m_channelEnableStatusDirty

std::set<size_t> TektronixOscilloscope::m_channelEnableStatusDirty
protected

True if this channel's status has changed (on/off) since the last time the trigger was armed.

This is needed to work around a bug in the MSO64 SCPI stack.

Per 5/6 series programmer manual for DAT:SOU:AVAIL?:

"This query returns a list of enumerations representing the source waveforms that currently available for
:CURVe? queries. This means that the waveforms have been acquired. If there are none, NONE is returned."

This is untrue. In reality it returns whether the channel is currently enabled. If a channel is enabled after the trigger event, DAT:SOU:AVAIL? will report the channel as available, however CURV? queries will silently fail and return no data.


The documentation for this class was generated from the following files: