ngscopeclient 0.1-dev+51fbda87c
OwonXDMMultimeter.h
Go to the documentation of this file.
1/***********************************************************************************************************************
2* *
3* libscopehal *
4* *
5* Copyright (c) 2012-2024 Andrew D. Zonenberg and contributors *
6* All rights reserved. *
7* *
8* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
9* following conditions are met: *
10* *
11* * Redistributions of source code must retain the above copyright notice, this list of conditions, and the *
12* following disclaimer. *
13* *
14* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the *
15* following disclaimer in the documentation and/or other materials provided with the distribution. *
16* *
17* * Neither the name of the author nor the names of any contributors may be used to endorse or promote products *
18* derived from this software without specific prior written permission. *
19* *
20* THIS SOFTWARE IS PROVIDED BY THE AUTHORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
21* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL *
22* THE AUTHORS BE HELD LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
23* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR *
24* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
25* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
26* POSSIBILITY OF SUCH DAMAGE. *
27* *
28***********************************************************************************************************************/
29
35#ifndef OwonXDMMultimeter_h
36#define OwonXDMMultimeter_h
37
42 : public virtual SCPIMultimeter
43{
44public:
46 virtual ~OwonXDMMultimeter();
47
48 virtual unsigned int GetInstrumentTypes() const override;
49 virtual uint32_t GetInstrumentTypesForChannel(size_t i) const override;
50
51 virtual unsigned int GetMeasurementTypes() override;
52 virtual unsigned int GetSecondaryMeasurementTypes() override;
53
54 //Channel info
55 virtual int GetCurrentMeterChannel() override;
56 virtual void SetCurrentMeterChannel(int chan) override;
57
58 //Meter operating mode
59 virtual MeasurementTypes GetMeterMode() override;
60 virtual MeasurementTypes GetSecondaryMeterMode() override;
61 virtual void SetMeterMode(MeasurementTypes type) override;
62 virtual void SetSecondaryMeterMode(MeasurementTypes type) override;
63
64 //Control
65 virtual void SetMeterAutoRange(bool enable) override;
66 virtual bool GetMeterAutoRange() override;
67 virtual void StartMeter() override;
68 virtual void StopMeter() override;
69
70 virtual int GetMeterDigits() override;
71
72 //Get readings
73 virtual double GetMeterValue() override;
74 virtual double GetSecondaryMeterValue() override;
75
76protected:
77 bool m_modeValid;
78 bool m_secmodeValid;
79 MeasurementTypes m_mode;
80 MeasurementTypes m_secmode;
81
82public:
83 static std::string GetDriverNameInternal();
84 METER_INITPROC(OwonXDMMultimeter)
85};
86
87#endif
Driver for Owon XDM multimeter.
Definition: OwonXDMMultimeter.h:43
virtual double GetSecondaryMeterValue() override
Get the value of the secondary measurement.
Definition: OwonXDMMultimeter.cpp:153
virtual void SetSecondaryMeterMode(MeasurementTypes type) override
Sets the active secondary mode.
virtual int GetMeterDigits() override
Returns the digit resolution of the meter.
Definition: OwonXDMMultimeter.cpp:104
virtual unsigned int GetInstrumentTypes() const override
Returns a bitfield describing the set of instrument types that this instrument supports.
Definition: OwonXDMMultimeter.cpp:73
virtual double GetMeterValue() override
Get the value of the primary measurement.
Definition: OwonXDMMultimeter.cpp:135
virtual MeasurementTypes GetSecondaryMeterMode() override
Gets the active secondary mode.
virtual unsigned int GetSecondaryMeasurementTypes() override
Gets a bitmask of secondary measurement types currently available.
Definition: OwonXDMMultimeter.cpp:83
virtual uint32_t GetInstrumentTypesForChannel(size_t i) const override
Returns a bitfield describing the set of instrument types that a given channel supports.
Definition: OwonXDMMultimeter.cpp:96
An SCPI-based multimeter.
Definition: SCPIMultimeter.h:38
Abstraction of a transport layer for moving SCPI data between endpoints.
Definition: SCPITransport.h:47