ngscopeclient 0.1-dev+51fbda87c
|
An arbitrary lab instrument. Oscilloscope, LA, PSU, DMM, etc. More...
#include <Instrument.h>
Public Member Functions | |
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. | |
InstrumentChannel * | GetChannel (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... | |
InstrumentChannel * | GetChannelByDisplayName (const std::string &name) |
Gets a channel given the display name. | |
InstrumentChannel * | GetChannelByHwName (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 Attributes | |
std::string | m_nickname |
Optional user-selected nickname of the instrument. More... | |
Protected Attributes | |
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. | |
An arbitrary lab instrument. Oscilloscope, LA, PSU, DMM, etc.
An instrument has one or more channels (theoretically zero is allowed, but this would make little sense), each of which may have different capabilities. For example, an oscilloscope might have four oscilloscope channels which can also be used as multimeter inputs, and one function/arbitrary waveform generator output, for a total of five channels.
Math, memory, and other non-acquisition channels are generally not exposed in the API unless they provide features which are not possible to implement clientside.
All channels regardless of type occupy a single zero-based namespace.
|
pure virtual |
Pull data from the instrument.
Implemented in AgilentOscilloscope, AntikernelLabsOscilloscope, AntikernelLabsTriggerCrossbar, AntikernelLogicAnalyzer, AseqSpectrometer, CopperMountainVNA, CSVStreamInstrument, DemoOscilloscope, DigilentOscilloscope, DSLabsOscilloscope, FunctionGenerator, KeysightDCA, LeCroyFWPOscilloscope, LeCroyOscilloscope, Load, MockOscilloscope, MultiLaneBERT, Multimeter, NanoVNA, OwonXDGFunctionGenerator, PicoOscilloscope, PicoVNA, PowerSupply, RFSignalGenerator, RigolFunctionGenerator, RigolOscilloscope, RohdeSchwarzOscilloscope, RSRTO6Oscilloscope, SiglentSCPIOscilloscope, SiglentVectorSignalGenerator, TektronixHSIOscilloscope, TektronixOscilloscope, ThunderScopeOscilloscope, TinySA, and UHDBridgeSDR.
|
inline |
Gets a given channel on the instrument.
Derived classes typically implement a GetXChannel() helper function which casts the channel to the requested type.
i | Channel index |
|
virtual |
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.
i | Zero-based index of channel |
Reimplemented in LeCroyOscilloscope, SiglentSCPIOscilloscope, and TektronixOscilloscope.
|
pure virtual |
Returns a bitfield describing the set of instrument types that this instrument supports.
Not all types may be available on a given channel.
Implemented in AgilentOscilloscope, AntikernelLabsOscilloscope, AntikernelLabsTriggerCrossbar, AntikernelLogicAnalyzer, AseqSpectrometer, BERT, CSVStreamInstrument, DemoOscilloscope, DigilentOscilloscope, DSLabsOscilloscope, KeysightDCA, LeCroyOscilloscope, Load, MockOscilloscope, OwonXDGFunctionGenerator, OwonXDMMultimeter, PicoOscilloscope, PowerSupply, RigolFunctionGenerator, RigolOscilloscope, RohdeSchwarzHMC8012Multimeter, RohdeSchwarzOscilloscope, RSRTO6Oscilloscope, SCPISA, SCPISDR, SCPISpectrometer, SCPIVNA, SiglentLoad, SiglentSCPIOscilloscope, SiglentVectorSignalGenerator, SwitchMatrix, TektronixOscilloscope, ThunderScopeOscilloscope, and UHDBridgeSDR.
|
pure virtual |
Returns a bitfield describing the set of instrument types that a given channel supports.
i | Channel index |
Implemented in AgilentOscilloscope, AlientekPowerSupply, AntikernelLabsOscilloscope, AntikernelLabsTriggerCrossbar, AntikernelLogicAnalyzer, AseqSpectrometer, CSVStreamInstrument, DemoOscilloscope, DemoPowerSupply, DigilentOscilloscope, DSLabsOscilloscope, GWInstekGPDX303SPowerSupply, HP662xAPowerSupply, KeysightDCA, KuaiquPowerSupply, LeCroyOscilloscope, MockOscilloscope, MultiLaneBERT, OwonXDGFunctionGenerator, OwonXDMMultimeter, PicoOscilloscope, RidenPowerSupply, RigolDP8xxPowerSupply, RigolFunctionGenerator, RigolOscilloscope, RohdeSchwarzHMC8012Multimeter, RohdeSchwarzHMC804xPowerSupply, RohdeSchwarzOscilloscope, RSRTO6Oscilloscope, SCPISA, SCPISDR, SCPISpectrometer, SCPIVNA, SiglentLoad, SiglentPowerSupply, SiglentSCPIOscilloscope, SiglentVectorSignalGenerator, TektronixOscilloscope, ThunderScopeOscilloscope, and UHDBridgeSDR.
|
pure virtual |
Gets the connection string for our transport.
Implemented in SCPIInstrument, AntikernelLogicAnalyzer, DemoOscilloscope, and MockOscilloscope.
|
pure virtual |
Gets the name of our transport.
Implemented in SCPIInstrument, AntikernelLogicAnalyzer, DemoOscilloscope, and MockOscilloscope.
|
virtual |
Load instrument and channel configuration from a save file.
Reimplemented in DemoOscilloscope.
|
virtual |
Parse a limited subset of instrument configuration but do not apply it.
This is an optional method intended to be called prior to loading a file in order to identify potential problems with the setup being loaded (for example, attenuation or output voltage settings wildly different from the current configuration).
|
virtual |
Serializes this instrument's configuration to a YAML node.
|
virtual |
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.
i | Zero-based index of channel |
name | Name of the channel |
Reimplemented in AntikernelLabsTriggerCrossbar, LeCroyOscilloscope, SiglentSCPIOscilloscope, and TektronixOscilloscope.
std::string Instrument::m_nickname |
Optional user-selected nickname of the instrument.
(for display purposes if multiple similar devices are in use)