ngscopeclient 0.1-dev+51fbda87c
RohdeSchwarzHMC8012Multimeter.h
1/***********************************************************************************************************************
2* *
3* libscopehal v0.1 *
4* *
5* Copyright (c) 2012-2023 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
30#ifndef RohdeSchwarzHMC8012Multimeter_h
31#define RohdeSchwarzHMC8012Multimeter_h
32
37 : public virtual SCPIMultimeter
38{
39public:
42
43 virtual unsigned int GetInstrumentTypes() const override;
44 virtual uint32_t GetInstrumentTypesForChannel(size_t i) const override;
45
46 virtual unsigned int GetMeasurementTypes() override;
47 virtual unsigned int GetSecondaryMeasurementTypes() override;
48
49 //Channel info
50 virtual int GetCurrentMeterChannel() override;
51 virtual void SetCurrentMeterChannel(int chan) override;
52
53 //Meter operating mode
54 virtual MeasurementTypes GetMeterMode() override;
55 virtual MeasurementTypes GetSecondaryMeterMode() override;
56 virtual void SetMeterMode(MeasurementTypes type) override;
57 virtual void SetSecondaryMeterMode(MeasurementTypes type) override;
58
59 //Control
60 virtual void SetMeterAutoRange(bool enable) override;
61 virtual bool GetMeterAutoRange() override;
62 virtual void StartMeter() override;
63 virtual void StopMeter() override;
64
65 virtual int GetMeterDigits() override;
66
67 //Get readings
68 virtual double GetMeterValue() override;
69 virtual double GetSecondaryMeterValue() override;
70
71protected:
72 bool m_modeValid;
73 bool m_secmodeValid;
74 MeasurementTypes m_mode;
75 MeasurementTypes m_secmode;
76
77public:
78 static std::string GetDriverNameInternal();
79 METER_INITPROC(RohdeSchwarzHMC8012Multimeter)
80};
81
82#endif
A Rohde & Schwarz HMC8012 multimeter.
Definition: RohdeSchwarzHMC8012Multimeter.h:38
virtual void SetSecondaryMeterMode(MeasurementTypes type) override
Sets the active secondary mode.
Definition: RohdeSchwarzHMC8012Multimeter.cpp:282
virtual int GetMeterDigits() override
Returns the digit resolution of the meter.
Definition: RohdeSchwarzHMC8012Multimeter.cpp:96
virtual double GetSecondaryMeterValue() override
Get the value of the secondary measurement.
Definition: RohdeSchwarzHMC8012Multimeter.cpp:180
virtual unsigned int GetSecondaryMeasurementTypes() override
Gets a bitmask of secondary measurement types currently available.
Definition: RohdeSchwarzHMC8012Multimeter.cpp:75
virtual unsigned int GetInstrumentTypes() const override
Returns a bitfield describing the set of instrument types that this instrument supports.
Definition: RohdeSchwarzHMC8012Multimeter.cpp:65
virtual MeasurementTypes GetSecondaryMeterMode() override
Gets the active secondary mode.
Definition: RohdeSchwarzHMC8012Multimeter.cpp:239
virtual double GetMeterValue() override
Get the value of the primary measurement.
Definition: RohdeSchwarzHMC8012Multimeter.cpp:175
virtual uint32_t GetInstrumentTypesForChannel(size_t i) const override
Returns a bitfield describing the set of instrument types that a given channel supports.
Definition: RohdeSchwarzHMC8012Multimeter.cpp:88
An SCPI-based multimeter.
Definition: SCPIMultimeter.h:38
Abstraction of a transport layer for moving SCPI data between endpoints.
Definition: SCPITransport.h:47