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

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

Enumerations

enum class  CapacitanceRange : quint8 { _100nF = 0 , _10uF = 1 , _1mF = 2 , AutoRange = 255 }
 Values supported by the Pokit Pro's Range attributes in Capacitance mode. More...
 
enum class  CurrentRange : quint8 {
  _500uA = 0 , _2mA = 1 , _10mA = 2 , _125mA = 3 ,
  _300mA = 4 , _3A = 5 , _10A = 6 , AutoRange = 255
}
 Values supported by the Pokit Pro's Range attributes in *Current modes. More...
 
enum class  ResistanceRange : quint8 {
  _30 = 0 , _75 = 1 , _400 = 2 , _5K = 3 ,
  _10K = 4 , _15K = 5 , _40K = 6 , _500K = 7 ,
  _700K = 8 , _1M = 9 , _3M = 10 , AutoRange = 255
}
 Values supported by the Pokit Pro's Range attributes in Resistance mode. More...
 
enum class  VoltageRange : quint8 {
  _250mV = 0 , _2V = 1 , _10V = 2 , _30V = 3 ,
  _60V = 4 , _125V = 5 , _400V = 6 , _600V = 7 ,
  AutoRange = 255
}
 Values supported by the Pokit Pro's Range attributes in *Voltage modes. More...
 

Functions

QTPOKIT_EXPORT QString toString (const CapacitanceRange &range)
 Returns range as a user-friendly string.
 
QTPOKIT_EXPORT quint32 maxValue (const CapacitanceRange &range)
 Returns the maximum value for range in nanofarads, or 0 if range is not a known value for Pokit Pro devices.
 
QTPOKIT_EXPORT QString toString (const CurrentRange &range)
 Returns range as a user-friendly string.
 
QTPOKIT_EXPORT quint32 maxValue (const CurrentRange &range)
 Returns the maximum value for range in microamps, or 0 if range is not a known value for Pokit Pro devices.
 
QTPOKIT_EXPORT QString toString (const ResistanceRange &range)
 Returns range as a user-friendly string.
 
QTPOKIT_EXPORT quint32 maxValue (const ResistanceRange &range)
 Returns the maximum value for range in ohms, or 0 if range is not a known value for Pokit Pro devices.
 
QTPOKIT_EXPORT QString toString (const VoltageRange &range)
 Returns range as a user-friendly string.
 
QTPOKIT_EXPORT quint32 maxValue (const VoltageRange &range)
 Returns the maximum value for range in millivolts, or 0 if range is not a known value for Pokit Pro devices.
 
static Q_LOGGING_CATEGORY (lc, "dokit.pokit.products.pro", QtInfoMsg)
 Logging category for this file.
 

Detailed Description

Encapsulates details specific to Pokit Pro devices.

Enumeration Type Documentation

◆ CapacitanceRange

enum class PokitPro::CapacitanceRange : quint8
strong

Values supported by the Pokit Pro's Range attributes in Capacitance mode.

Pokit Bluetooth API errata
These Pokit Pro enumeration values are as-yet undocumented by Pokit Innovations. @pcolby reverse-engineered them as part of the dokit project.
Enumerator
_100nF 

Up 100nF.

_10uF 

Up 10μF.

_1mF 

Up 1mF.

AutoRange 255 

Auto-range.

Definition at line 20 of file pokitpro.h.

20 : quint8 {
21 _100nF = 0, ///< Up 100nF.
22 _10uF = 1, ///< Up 10μF.
23 _1mF = 2, ///< Up 1mF.
24 AutoRange = 255 ///< Auto-range.
25 };

◆ CurrentRange

enum class PokitPro::CurrentRange : quint8
strong

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

Pokit Bluetooth API errata
These Pokit Pro enumeration values are as-yet undocumented by Pokit Innovations. @pcolby reverse-engineered them as part of the dokit project.
Enumerator
_500uA 

Up to 5µA.

_2mA 

Up to 2mA.

_10mA 

Up to 10mA.

_125mA 

Up to 125mA.

_300mA 

Up to 300mA.

_3A 

Up to 3A.

_10A 

Up to 10A.

AutoRange 255 

Auto-range.

Definition at line 31 of file pokitpro.h.

31 : quint8 {
32 _500uA = 0, ///< Up to 5µA.
33 _2mA = 1, ///< Up to 2mA.
34 _10mA = 2, ///< Up to 10mA.
35 _125mA = 3, ///< Up to 125mA.
36 _300mA = 4, ///< Up to 300mA.
37 _3A = 5, ///< Up to 3A.
38 _10A = 6, ///< Up to 10A.
39 AutoRange = 255 ///< Auto-range.
40 };

◆ ResistanceRange

enum class PokitPro::ResistanceRange : quint8
strong

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

Pokit Bluetooth API errata
These Pokit Pro enumeration values are as-yet undocumented by Pokit Innovations. @pcolby reverse-engineered them as part of the dokit project.
Enumerator
_30 

Up to 30Ω.

_75 

Up to 75Ω.

_400 

Up to 400Ω.

_5K 

Up to 5KΩ.

_10K 

Up to 10KΩ.

_15K 

Up to 15KΩ.

_40K 

Up to 40KΩ.

_500K 

Up to 500KΩ.

_700K 

Up to 700KΩ.

_1M 

Up to 1MΩ.

_3M 10 

Up to 3MΩ.

AutoRange 255 

Auto-range.

Definition at line 45 of file pokitpro.h.

45 : quint8 {
46 _30 = 0, ///< Up to 30Ω.
47 _75 = 1, ///< Up to 75Ω.
48 _400 = 2, ///< Up to 400Ω.
49 _5K = 3, ///< Up to 5KΩ.
50 _10K = 4, ///< Up to 10KΩ.
51 _15K = 5, ///< Up to 15KΩ.
52 _40K = 6, ///< Up to 40KΩ.
53 _500K = 7, ///< Up to 500KΩ.
54 _700K = 8, ///< Up to 700KΩ.
55 _1M = 9, ///< Up to 1MΩ.
56 _3M = 10, ///< Up to 3MΩ.
57 AutoRange = 255 ///< Auto-range.
58 };

◆ VoltageRange

enum class PokitPro::VoltageRange : quint8
strong

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

Pokit Bluetooth API errata
These Pokit Pro enumeration values are as-yet undocumented by Pokit Innovations. @pcolby reverse-engineered them as part of the dokit project.
Enumerator
_250mV 

Up to 250mV.

_2V 

Up to 2V.

_10V 

Up to 10V.

_30V 

Up to 30V.

_60V 

Up to 60V.

_125V 

Up to 125V.

_400V 

Up to 400V.

_600V 

Up to 600V.

AutoRange 255 

Auto-range.

Definition at line 63 of file pokitpro.h.

63 : quint8 {
64 _250mV = 0, ///< Up to 250mV.
65 _2V = 1, ///< Up to 2V.
66 _10V = 2, ///< Up to 10V.
67 _30V = 3, ///< Up to 30V.
68 _60V = 4, ///< Up to 60V.
69 _125V = 5, ///< Up to 125V.
70 _400V = 6, ///< Up to 400V.
71 _600V = 7, ///< Up to 600V.
72 AutoRange = 255 ///< Auto-range.
73 };

Function Documentation

◆ maxValue() [1/4]

quint32 PokitPro::maxValue ( const CapacitanceRange & range)

Returns the maximum value for range in nanofarads, or 0 if range is not a known value for Pokit Pro devices.

Definition at line 49 of file pokitpro.cpp.

50{
51 switch (range) {
52 case CapacitanceRange::_100nF: return 100;
53 case CapacitanceRange::_10uF: return 10'000;
54 case CapacitanceRange::_1mF: return 1'000'000;
55 case CapacitanceRange::AutoRange: return 1'000'000;
56 default:
57 qCWarning(lc).noquote() << Private::tr("Unknown CapacitanceRange value: %1").arg((int)range);
58 return 0;
59 }
60}

References _100nF, _10uF, _1mF, and AutoRange.

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

Here is the caller graph for this function:

◆ maxValue() [2/4]

quint32 PokitPro::maxValue ( const CurrentRange & range)

Returns the maximum value for range in microamps, or 0 if range is not a known value for Pokit Pro devices.

Definition at line 90 of file pokitpro.cpp.

91{
92 switch (range) {
93 case CurrentRange::_500uA: return 500;
94 case CurrentRange::_2mA: return 2'000;
95 case CurrentRange::_10mA: return 10'000;
96 case CurrentRange::_125mA: return 125'000;
97 case CurrentRange::_300mA: return 300'000;
98 case CurrentRange::_3A: return 3'000'000;
99 case CurrentRange::_10A: return 10'000'000;
100 case CurrentRange::AutoRange: return 10'000'000;
101 default:
102 qCWarning(lc).noquote() << Private::tr("Unknown CurrentRange value: %1").arg((int)range);
103 return 0;
104 }
105}
@ _500uA
Up to 5µA.
Definition pokitpro.h:32
@ AutoRange
Auto-range.
Definition pokitpro.h:39
@ _10mA
Up to 10mA.
Definition pokitpro.h:34
@ _300mA
Up to 300mA.
Definition pokitpro.h:36
@ _125mA
Up to 125mA.
Definition pokitpro.h:35

References _10A, _10mA, _125mA, _2mA, _300mA, _3A, _500uA, and AutoRange.

◆ maxValue() [3/4]

quint32 PokitPro::maxValue ( const ResistanceRange & range)

Returns the maximum value for range in ohms, or 0 if range is not a known value for Pokit Pro devices.

Definition at line 139 of file pokitpro.cpp.

140{
141 switch (range) {
142 case ResistanceRange::_30: return 30;
143 case ResistanceRange::_75: return 75;
144 case ResistanceRange::_400: return 400;
145 case ResistanceRange::_5K: return 5'000;
146 case ResistanceRange::_10K: return 10'000;
147 case ResistanceRange::_15K: return 15'000;
148 case ResistanceRange::_40K: return 40'000;
149 case ResistanceRange::_500K: return 500'000;
150 case ResistanceRange::_700K: return 700'000;
151 case ResistanceRange::_1M: return 1'000'000;
152 case ResistanceRange::_3M: return 3'000'000;
153 case ResistanceRange::AutoRange: return 3'000'000;
154 default:
155 qCWarning(lc).noquote() << Private::tr("Unknown ResistanceRange value: %1").arg((int)range);
156 return 0;
157 }
158}
@ _500K
Up to 500KΩ.
Definition pokitpro.h:53
@ AutoRange
Auto-range.
Definition pokitpro.h:57
@ _700K
Up to 700KΩ.
Definition pokitpro.h:54

References _10K, _15K, _1M, _30, _3M, _400, _40K, _500K, _5K, _700K, _75, and AutoRange.

◆ maxValue() [4/4]

quint32 PokitPro::maxValue ( const VoltageRange & range)

Returns the maximum value for range in millivolts, or 0 if range is not a known value for Pokit Pro devices.

Definition at line 189 of file pokitpro.cpp.

190{
191 switch (range) {
192 case VoltageRange::_250mV: return 250;
193 case VoltageRange::_2V: return 2'000;
194 case VoltageRange::_10V: return 10'000;
195 case VoltageRange::_30V: return 30'000;
196 case VoltageRange::_60V: return 60'000;
197 case VoltageRange::_125V: return 125'000;
198 case VoltageRange::_400V: return 400'000;
199 case VoltageRange::_600V: return 600'000;
200 case VoltageRange::AutoRange: return 600'000;
201 default:
202 qCWarning(lc).noquote() << Private::tr("Unknown VoltageRange value: %1").arg((int)range);
203 return 0;
204 }
205}
@ AutoRange
Auto-range.
Definition pokitpro.h:72
@ _250mV
Up to 250mV.
Definition pokitpro.h:64
@ _400V
Up to 400V.
Definition pokitpro.h:70
@ _600V
Up to 600V.
Definition pokitpro.h:71
@ _125V
Up to 125V.
Definition pokitpro.h:69

References _10V, _125V, _250mV, _2V, _30V, _400V, _600V, _60V, and AutoRange.

◆ toString() [1/4]

QString PokitPro::toString ( const CapacitanceRange & range)

Returns range as a user-friendly string.

Definition at line 35 of file pokitpro.cpp.

36{
37 switch (range) {
38 case CapacitanceRange::_100nF: return Private::tr("Up to 100nF");
39 case CapacitanceRange::_10uF: return Private::tr("Up to 10μF");
40 case CapacitanceRange::_1mF: return Private::tr("Up to 1mF");
41 case CapacitanceRange::AutoRange: return Private::tr("Auto-range");
42 default: return QString();
43 }
44}

References _100nF, _10uF, _1mF, and AutoRange.

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

Here is the caller graph for this function:

◆ toString() [2/4]

QString PokitPro::toString ( const CurrentRange & range)

Returns range as a user-friendly string.

Definition at line 72 of file pokitpro.cpp.

73{
74 switch (range) {
75 case CurrentRange::_500uA: return Private::tr("Up to 500μA");
76 case CurrentRange::_2mA: return Private::tr("Up to 2mA");
77 case CurrentRange::_10mA: return Private::tr("Up to 10mA");
78 case CurrentRange::_125mA: return Private::tr("Up to 125mA");
79 case CurrentRange::_300mA: return Private::tr("Up to 300mA");
80 case CurrentRange::_3A: return Private::tr("Up to 3A");
81 case CurrentRange::_10A: return Private::tr("Up to 10A");
82 case CurrentRange::AutoRange: return Private::tr("Auto-range");
83 default: return QString();
84 }
85}

References _10A, _10mA, _125mA, _2mA, _300mA, _3A, _500uA, and AutoRange.

◆ toString() [3/4]

QString PokitPro::toString ( const ResistanceRange & range)

Returns range as a user-friendly string.

Definition at line 117 of file pokitpro.cpp.

118{
119 switch (range) {
120 case ResistanceRange::_30: return Private::tr("Up to 30Ω");
121 case ResistanceRange::_75: return Private::tr("Up to 75Ω");
122 case ResistanceRange::_400: return Private::tr("Up to 400Ω");
123 case ResistanceRange::_5K: return Private::tr("Up to 5KΩ");
124 case ResistanceRange::_10K: return Private::tr("Up to 10KΩ");
125 case ResistanceRange::_15K: return Private::tr("Up to 15KΩ");
126 case ResistanceRange::_40K: return Private::tr("Up to 40KΩ");
127 case ResistanceRange::_500K: return Private::tr("Up to 500KΩ");
128 case ResistanceRange::_700K: return Private::tr("Up to 700KΩ");
129 case ResistanceRange::_1M: return Private::tr("Up to 1MΩ");
130 case ResistanceRange::_3M: return Private::tr("Up to 3MΩ");
131 case ResistanceRange::AutoRange: return Private::tr("Auto-range");
132 default: return QString();
133 }
134}

References _10K, _15K, _1M, _30, _3M, _400, _40K, _500K, _5K, _700K, _75, and AutoRange.

◆ toString() [4/4]

QString PokitPro::toString ( const VoltageRange & range)

Returns range as a user-friendly string.

Definition at line 170 of file pokitpro.cpp.

171{
172 switch (range) {
173 case VoltageRange::_250mV: return Private::tr("Up to 250mV");
174 case VoltageRange::_2V: return Private::tr("Up to 2V");
175 case VoltageRange::_10V: return Private::tr("Up to 10V");
176 case VoltageRange::_30V: return Private::tr("Up to 30V");
177 case VoltageRange::_60V: return Private::tr("Up to 60V");
178 case VoltageRange::_125V: return Private::tr("Up to 125V");
179 case VoltageRange::_400V: return Private::tr("Up to 400V");
180 case VoltageRange::_600V: return Private::tr("Up to 600V");
181 case VoltageRange::AutoRange: return Private::tr("Auto-range");
182 default: return QString();
183 }
184}

References _10V, _125V, _250mV, _2V, _30V, _400V, _600V, _60V, and AutoRange.