Dokit
Internal development documentation
Loading...
Searching...
No Matches
PokitMeter Namespace Reference

Encapsulates details specific to Pokit Meter devices. More...

Enumerations

enum class  CurrentRange : quint8 {
  _10mA = 0 , _30mA = 1 , _150mA = 2 , _300mA = 3 ,
  _2A = 4 , AutoRange = 255
}
 Values supported by the Pokit Meter's Range attributes in *Current modes. More...
 
enum class  ResistanceRange : quint8 {
  _160 = 0 , _330 = 1 , _890 = 2 , _1K5 = 3 ,
  _10K = 4 , _100K = 5 , _470K = 6 , _1M = 7 ,
  AutoRange = 255
}
 Values supported by the Pokit Meter's Range attributes in Resistance mode. More...
 
enum class  VoltageRange : quint8 {
  _300mV = 0 , _2V = 1 , _6V = 2 , _12V = 3 ,
  _30V = 4 , _60V = 5 , AutoRange = 255
}
 Values supported by the Pokit Meter's Range attributes in *Voltage modes. More...
 

Functions

QTPOKIT_EXPORT QString toString (const CurrentRange &range)
 Returns range as a user-friendly string.
 
QTPOKIT_EXPORT QVariant maxValue (const CurrentRange &range)
 Returns the maximum value for range in (integer) microamps, or the string "Auto".
 
QTPOKIT_EXPORT QString toString (const ResistanceRange &range)
 Returns range as a user-friendly string.
 
QTPOKIT_EXPORT QVariant maxValue (const ResistanceRange &range)
 Returns the maximum value for range in (integer) ohms, or the string "Auto".
 
QTPOKIT_EXPORT QString toString (const VoltageRange &range)
 Returns range as a user-friendly string.
 
QTPOKIT_EXPORT QVariant maxValue (const VoltageRange &range)
 Returns the maximum value for range in (integer) millivolts, or the string "Auto".
 

Detailed Description

Encapsulates details specific to Pokit Meter devices.

Enumeration Type Documentation

◆ CurrentRange

enum class PokitMeter::CurrentRange : quint8
strong

Values supported by the Pokit Meter's Range attributes in *Current modes.

Enumerator
_10mA 

Up to 10mA.

_30mA 

Up to 30mA.

_150mA 

Up to 150mA.

_300mA 

Up to 300mA.

_2A 

Up to 2A.

AutoRange 

Auto-range.

Definition at line 22 of file pokitmeter.h.

22 : quint8 {
23 _10mA = 0, ///< Up to 10mA.
24 _30mA = 1, ///< Up to 30mA.
25 _150mA = 2, ///< Up to 150mA.
26 _300mA = 3, ///< Up to 300mA.
27 _2A = 4, ///< Up to 2A.
28 AutoRange = 255 ///< Auto-range.
29 };

◆ ResistanceRange

enum class PokitMeter::ResistanceRange : quint8
strong

Values supported by the Pokit Meter's Range attributes in Resistance mode.

Enumerator
_160 

Up to 160Ω.

_330 

Up to 330Ω.

_890 

Up to 890Ω.

_1K5 

Up to 1.5KΩ.

_10K 

Up to 10KΩ.

_100K 

Up to 100KΩ.

_470K 

Up to 470KΩ.

_1M 

Up to 1MΩ.

AutoRange 

Auto-range.

Definition at line 34 of file pokitmeter.h.

34 : quint8 {
35 _160 = 0, ///< Up to 160Ω.
36 _330 = 1, ///< Up to 330Ω.
37 _890 = 2, ///< Up to 890Ω.
38 _1K5 = 3, ///< Up to 1.5KΩ.
39 _10K = 4, ///< Up to 10KΩ.
40 _100K = 5, ///< Up to 100KΩ.
41 _470K = 6, ///< Up to 470KΩ.
42 _1M = 7, ///< Up to 1MΩ.
43 AutoRange = 255 ///< Auto-range.
44 };

◆ VoltageRange

enum class PokitMeter::VoltageRange : quint8
strong

Values supported by the Pokit Meter's Range attributes in *Voltage modes.

Enumerator
_300mV 

Up to 300mV.

_2V 

Up to 2V.

_6V 

Up to 6V.

_12V 

Up to 12V.

_30V 

Up to 30V.

_60V 

Up to 60V DC (42V AC).

AutoRange 

Auto-range.

Definition at line 49 of file pokitmeter.h.

49 : quint8 {
50 _300mV = 0, ///< Up to 300mV.
51 _2V = 1, ///< Up to 2V.
52 _6V = 2, ///< Up to 6V.
53 _12V = 3, ///< Up to 12V.
54 _30V = 4, ///< Up to 30V.
55 _60V = 5, ///< Up to 60V DC (42V AC).
56 AutoRange = 255 ///< Auto-range.
57 };
@ _60V
Up to 60V DC (42V AC).

Function Documentation

◆ maxValue() [1/3]

QVariant PokitMeter::maxValue ( const CurrentRange & range)

Returns the maximum value for range in (integer) microamps, or the string "Auto".

If range is not a known valid value, then an null QVariant is returned.

Definition at line 33 of file pokitmeter.cpp.

34{
35 switch (range) {
36 case CurrentRange::_10mA: return 10'000;
37 case CurrentRange::_30mA: return 30'000;
38 case CurrentRange::_150mA: return 150'000;
39 case CurrentRange::_300mA: return 300'000;
40 case CurrentRange::_2A: return 2'000'000;
41 case CurrentRange::AutoRange: return QCoreApplication::translate("PokitMeter", "Auto", "CurrentRange");
42 default: return QVariant();
43 }
44}
QString translate(const char *context, const char *sourceText, const char *disambiguation, int n)

References _10mA, _150mA, _2A, _300mA, _30mA, AutoRange, and QCoreApplication::translate().

Referenced by CurrentRange::maxValue(), ResistanceRange::maxValue(), and VoltageRange::maxValue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ maxValue() [2/3]

QVariant PokitMeter::maxValue ( const ResistanceRange & range)

Returns the maximum value for range in (integer) ohms, or the string "Auto".

If range is not a known valid value, then an null QVariant is returned.

Definition at line 67 of file pokitmeter.cpp.

68{
69 switch (range) {
70 case ResistanceRange::_160: return 160;
71 case ResistanceRange::_330: return 330;
72 case ResistanceRange::_890: return 890;
73 case ResistanceRange::_1K5: return 1'500;
74 case ResistanceRange::_10K: return 10'000;
75 case ResistanceRange::_100K: return 100'000;
76 case ResistanceRange::_470K: return 470'000;
77 case ResistanceRange::_1M: return 1'000'000;
78 case ResistanceRange::AutoRange: return QCoreApplication::translate("PokitMeter", "Auto", "ResistanceRange");
79 default: return QVariant();
80 }
81}

References _100K, _10K, _160, _1K5, _1M, _330, _470K, _890, AutoRange, and QCoreApplication::translate().

Here is the call graph for this function:

◆ maxValue() [3/3]

QVariant PokitMeter::maxValue ( const VoltageRange & range)

Returns the maximum value for range in (integer) millivolts, or the string "Auto".

If range is not a known valid value, then an null QVariant is returned.

Definition at line 102 of file pokitmeter.cpp.

103{
104 switch (range) {
105 case VoltageRange::_300mV: return 300;
106 case VoltageRange::_2V: return 2'000;
107 case VoltageRange::_6V: return 6'000;
108 case VoltageRange::_12V: return 12'000;
109 case VoltageRange::_30V: return 30'000;
110 case VoltageRange::_60V: return 60'000;
111 case VoltageRange::AutoRange: return QCoreApplication::translate("PokitMeter", "Auto", "VoltageRange");
112 default: return QVariant();
113 }
114}

References _12V, _2V, _300mV, _30V, _60V, _6V, AutoRange, and QCoreApplication::translate().

Here is the call graph for this function:

◆ toString() [1/3]

QString PokitMeter::toString ( const CurrentRange & range)

Returns range as a user-friendly string.

Definition at line 16 of file pokitmeter.cpp.

17{
18 switch (range) {
19 case CurrentRange::_10mA: return QCoreApplication::translate("PokitMeter", "Up to 10mA", "CurrentRange");
20 case CurrentRange::_30mA: return QCoreApplication::translate("PokitMeter", "Up to 30mA", "CurrentRange");
21 case CurrentRange::_150mA: return QCoreApplication::translate("PokitMeter", "Up to 150mA", "CurrentRange");
22 case CurrentRange::_300mA: return QCoreApplication::translate("PokitMeter", "Up to 300mA", "CurrentRange");
23 case CurrentRange::_2A: return QCoreApplication::translate("PokitMeter", "Up to 2A", "CurrentRange");
24 case CurrentRange::AutoRange: return QCoreApplication::translate("PokitMeter", "Auto-range", "CurrentRange");
25 default: return QString();
26 }
27}

References _10mA, _150mA, _2A, _300mA, _30mA, AutoRange, and QCoreApplication::translate().

Referenced by CurrentRange::toString(), ResistanceRange::toString(), and VoltageRange::toString().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString() [2/3]

QString PokitMeter::toString ( const ResistanceRange & range)

Returns range as a user-friendly string.

Definition at line 47 of file pokitmeter.cpp.

48{
49 switch (range) {
50 case ResistanceRange::_160: return QCoreApplication::translate("PokitMeter", "Up to 160Ω", "ResistanceRange");
51 case ResistanceRange::_330: return QCoreApplication::translate("PokitMeter", "Up to 330Ω", "ResistanceRange");
52 case ResistanceRange::_890: return QCoreApplication::translate("PokitMeter", "Up to 890Ω", "ResistanceRange");
53 case ResistanceRange::_1K5: return QCoreApplication::translate("PokitMeter", "Up to 1.5KΩ", "ResistanceRange");
54 case ResistanceRange::_10K: return QCoreApplication::translate("PokitMeter", "Up to 10KΩ", "ResistanceRange");
55 case ResistanceRange::_100K: return QCoreApplication::translate("PokitMeter", "Up to 100KΩ", "ResistanceRange");
56 case ResistanceRange::_470K: return QCoreApplication::translate("PokitMeter", "Up to 470KΩ", "ResistanceRange");
57 case ResistanceRange::_1M: return QCoreApplication::translate("PokitMeter", "Up to 1MΩ", "ResistanceRange");
58 case ResistanceRange::AutoRange: return QCoreApplication::translate("PokitMeter", "Auto-range", "ResistanceRange");
59 default: return QString();
60 }
61}

References _100K, _10K, _160, _1K5, _1M, _330, _470K, _890, AutoRange, and QCoreApplication::translate().

Here is the call graph for this function:

◆ toString() [3/3]

QString PokitMeter::toString ( const VoltageRange & range)

Returns range as a user-friendly string.

Definition at line 84 of file pokitmeter.cpp.

85{
86 switch (range) {
87 case VoltageRange::_300mV: return QCoreApplication::translate("PokitMeter", "Up to 300mV", "VoltageRange");
88 case VoltageRange::_2V: return QCoreApplication::translate("PokitMeter", "Up to 2V", "VoltageRange");
89 case VoltageRange::_6V: return QCoreApplication::translate("PokitMeter", "Up to 6V", "VoltageRange");
90 case VoltageRange::_12V: return QCoreApplication::translate("PokitMeter", "Up to 12V", "VoltageRange");
91 case VoltageRange::_30V: return QCoreApplication::translate("PokitMeter", "Up to 30V", "VoltageRange");
92 case VoltageRange::_60V: return QCoreApplication::translate("PokitMeter", "Up to 60V", "VoltageRange");
93 case VoltageRange::AutoRange: return QCoreApplication::translate("PokitMeter", "Auto-range", "VoltageRange");
94 default: return QString();
95 }
96}

References _12V, _2V, _300mV, _30V, _60V, _6V, AutoRange, and QCoreApplication::translate().

Here is the call graph for this function: