|
ngscopeclient v0.2
|
A multimeter. More...
#include <Multimeter.h>


Public Types | |
| 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 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 Member Functions | |
| virtual unsigned int | GetMeasurementTypes ()=0 |
| virtual unsigned int | GetSecondaryMeasurementTypes () |
| Gets a bitmask of secondary measurement types currently available. | |
| virtual int | GetCurrentMeterChannel ()=0 |
| virtual void | SetCurrentMeterChannel (int chan)=0 |
| virtual MeasurementTypes | GetMeterMode ()=0 |
| virtual MeasurementTypes | GetSecondaryMeterMode () |
| Gets the active secondary mode. | |
| 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. | |
| 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. | |
| virtual double | GetSecondaryMeterValue () |
| Get the value of the secondary measurement. | |
| virtual int | GetMeterDigits ()=0 |
| Returns the digit resolution of the meter. | |
| virtual bool | AcquireData () override |
| Pull meter readings from hardware. | |
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. | |
| 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. | |
| virtual std::string | GetTransportName ()=0 |
| Gets the name of our transport. | |
| virtual bool | IsOffline () |
| Checks if the instrument is currently online. | |
| virtual uint32_t | GetInstrumentTypesForChannel (size_t i) const =0 |
| Returns a bitfield describing the set of instrument types that a given channel supports. | |
| 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. | |
| virtual std::string | GetChannelDisplayName (size_t i) |
| Gets the hardware display name for a channel. This is an arbitrary user-selected string. | |
| virtual void | SetChannelDisplayName (size_t i, std::string name) |
| Sets the hardware display name for a channel. This is an arbitrary user-selected string. | |
| 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 void | BackgroundProcessing () |
| Run various background processing typically done by a second thread (e.g. InstrumentThread) | |
| virtual void | FlushConfigCache () |
| Instruments are allowed to cache configuration settings to reduce round trip queries to the device. | |
| virtual YAML::Node | SerializeConfiguration (IDTable &table) const |
| Serializes this instrument's configuration to a YAML node. | |
| virtual void | LoadConfiguration (int version, const YAML::Node &node, IDTable &idmap) |
| Load instrument and channel configuration from a save file. | |
| 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. | |
Protected Member Functions | |
| 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. | |
Additional Inherited Members | |
Public Attributes inherited from Instrument | |
| std::string | m_nickname |
| Optional user-selected nickname of the instrument. | |
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. | |
A multimeter.
The distinction between multimeters and oscilloscopes can be blurry at times. For the moment, libscopehal considers an instrument a meter if it outputs a scalar, and an oscilloscope if it outputs a vector, regardless of sample rate or resolution.
|
overridevirtual |
Pull meter readings from hardware.
Implements Instrument.
Reimplemented in LeCroyFWPOscilloscope, LeCroyOscilloscope, TektronixHSIOscilloscope, and TektronixOscilloscope.
Implemented in LeCroyOscilloscope.
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.
Implemented in AgilentMultimeter, LeCroyOscilloscope, OwonXDMMultimeter, RohdeSchwarzHMC8012Multimeter, and TektronixOscilloscope.
Get the value of the primary measurement.
Implemented in AgilentMultimeter, LeCroyOscilloscope, OwonXDMMultimeter, RohdeSchwarzHMC8012Multimeter, and TektronixOscilloscope.
Gets a bitmask of secondary measurement types currently available.
The return value may change depending on the current primary measurement type.
Reimplemented in AgilentMultimeter, OwonXDMMultimeter, and RohdeSchwarzHMC8012Multimeter.
|
virtual |
Gets the active secondary mode.
Reimplemented in AgilentMultimeter, OwonXDMMultimeter, and RohdeSchwarzHMC8012Multimeter.
|
virtual |
Get the value of the secondary measurement.
Reimplemented in AgilentMultimeter, OwonXDMMultimeter, and RohdeSchwarzHMC8012Multimeter.
|
virtual |
Sets the active secondary mode.
Reimplemented in AgilentMultimeter, OwonXDMMultimeter, and RohdeSchwarzHMC8012Multimeter.