Dokit
dev
v0.6.0
v0.5.8
v0.5.7
v0.5.6
v0.5.5
v0.5.4
v0.5.3
v0.5.2
v0.5.1
v0.5.0
v0.4.0
v0.3.0
v0.2.0
v0.1.2
v0.1.1
v0.1.0
User docs
Internal
Coverage
Internal development documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
pokitmeter.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2022-2026 Paul Colby <git@colby.id.au>
2
// SPDX-License-Identifier: LGPL-3.0-or-later
3
4
/*!
5
* \file
6
* Declares the PokitMeter namespace.
7
*/
8
9
#ifndef QTPOKIT_POKITMETER_H
10
#define QTPOKIT_POKITMETER_H
11
12
#include "
qtpokit_global.h
"
13
14
QTPOKIT_BEGIN_NAMESPACE
15
16
/// Encapsulates details specific to Pokit Meter devices.
17
namespace
PokitMeter
{
18
19
/// Values supported by the Pokit Meter's `Range` attributes in `*Current` modes.
20
enum class
CurrentRange
: quint8 {
21
_10mA
= 0,
///< Up to 10mA.
22
_30mA
= 1,
///< Up to 30mA.
23
_150mA
= 2,
///< Up to 150mA.
24
_300mA
= 3,
///< Up to 300mA.
25
_2A
= 4,
///< Up to 2A.
26
AutoRange
= 255
///< Auto-range.
27
};
28
QTPOKIT_EXPORT
QString
toString
(
const
CurrentRange
&range);
29
QTPOKIT_EXPORT
quint32
maxValue
(
const
CurrentRange
&range);
30
31
/// Values supported by the Pokit Meter's `Range` attributes in `Resistance` mode.
32
enum class
ResistanceRange
: quint8 {
33
_160
= 0,
///< Up to 160Ω.
34
_330
= 1,
///< Up to 330Ω.
35
_890
= 2,
///< Up to 890Ω.
36
_1K5
= 3,
///< Up to 1.5KΩ.
37
_10K
= 4,
///< Up to 10KΩ.
38
_100K
= 5,
///< Up to 100KΩ.
39
_470K
= 6,
///< Up to 470KΩ.
40
_1M
= 7,
///< Up to 1MΩ.
41
AutoRange
= 255
///< Auto-range.
42
};
43
QTPOKIT_EXPORT
QString
toString
(
const
ResistanceRange
&range);
44
QTPOKIT_EXPORT
quint32
maxValue
(
const
ResistanceRange
&range);
45
46
/// Values supported by the Pokit Meter's `Range` attributes in `*Voltage` modes.
47
enum class
VoltageRange
: quint8 {
48
_300mV
= 0,
///< Up to 300mV.
49
_2V
= 1,
///< Up to 2V.
50
_6V
= 2,
///< Up to 6V.
51
_12V
= 3,
///< Up to 12V.
52
_30V
= 4,
///< Up to 30V.
53
_60V
= 5,
///< Up to 60V DC (42V AC).
54
AutoRange
= 255
///< Auto-range.
55
};
56
QTPOKIT_EXPORT
QString
toString
(
const
VoltageRange
&range);
57
QTPOKIT_EXPORT
quint32
maxValue
(
const
VoltageRange
&range);
58
59
}
60
61
/// Returns \a range as a `quint8` as a convenience for assigning to services' `settings.range` members.
62
constexpr
quint8
operator+
(
PokitMeter::CurrentRange
range)
noexcept
{
return
static_cast<
quint8
>
(range); }
63
64
/// Returns \a range as a `quint8` as a convenience for assigning to services' `settings.range` members.
65
constexpr
quint8
operator+
(
PokitMeter::ResistanceRange
range)
noexcept
{
return
static_cast<
quint8
>
(range); }
66
67
/// Returns \a range as a `quint8` as a convenience for assigning to services' `settings.range` members.
68
constexpr
quint8
operator+
(
PokitMeter::VoltageRange
range)
noexcept
{
return
static_cast<
quint8
>
(range); }
69
70
QTPOKIT_END_NAMESPACE
71
72
#endif
// QTPOKIT_POKITMETER_H
CurrentRange
Encapsulates convenience functions for working with current ranges.
Definition
pokitproducts.cpp:175
PokitMeter
Encapsulates details specific to Pokit Meter devices.
Definition
pokitmeter.h:17
PokitMeter::CurrentRange
CurrentRange
Values supported by the Pokit Meter's Range attributes in *Current modes.
Definition
pokitmeter.h:20
PokitMeter::CurrentRange::_2A
@ _2A
Up to 2A.
Definition
pokitmeter.h:25
PokitMeter::CurrentRange::AutoRange
@ AutoRange
Auto-range.
Definition
pokitmeter.h:26
PokitMeter::CurrentRange::_30mA
@ _30mA
Up to 30mA.
Definition
pokitmeter.h:22
PokitMeter::CurrentRange::_10mA
@ _10mA
Up to 10mA.
Definition
pokitmeter.h:21
PokitMeter::CurrentRange::_300mA
@ _300mA
Up to 300mA.
Definition
pokitmeter.h:24
PokitMeter::CurrentRange::_150mA
@ _150mA
Up to 150mA.
Definition
pokitmeter.h:23
PokitMeter::ResistanceRange
ResistanceRange
Values supported by the Pokit Meter's Range attributes in Resistance mode.
Definition
pokitmeter.h:32
PokitMeter::ResistanceRange::_470K
@ _470K
Up to 470KΩ.
Definition
pokitmeter.h:39
PokitMeter::ResistanceRange::_890
@ _890
Up to 890Ω.
Definition
pokitmeter.h:35
PokitMeter::ResistanceRange::_10K
@ _10K
Up to 10KΩ.
Definition
pokitmeter.h:37
PokitMeter::ResistanceRange::_330
@ _330
Up to 330Ω.
Definition
pokitmeter.h:34
PokitMeter::ResistanceRange::_1M
@ _1M
Up to 1MΩ.
Definition
pokitmeter.h:40
PokitMeter::ResistanceRange::_100K
@ _100K
Up to 100KΩ.
Definition
pokitmeter.h:38
PokitMeter::ResistanceRange::_160
@ _160
Up to 160Ω.
Definition
pokitmeter.h:33
PokitMeter::ResistanceRange::_1K5
@ _1K5
Up to 1.5KΩ.
Definition
pokitmeter.h:36
PokitMeter::VoltageRange
VoltageRange
Values supported by the Pokit Meter's Range attributes in *Voltage modes.
Definition
pokitmeter.h:47
PokitMeter::VoltageRange::_12V
@ _12V
Up to 12V.
Definition
pokitmeter.h:51
PokitMeter::VoltageRange::_60V
@ _60V
Up to 60V DC (42V AC).
Definition
pokitmeter.h:53
PokitMeter::VoltageRange::_300mV
@ _300mV
Up to 300mV.
Definition
pokitmeter.h:48
PokitMeter::VoltageRange::_2V
@ _2V
Up to 2V.
Definition
pokitmeter.h:49
PokitMeter::VoltageRange::_30V
@ _30V
Up to 30V.
Definition
pokitmeter.h:52
PokitMeter::VoltageRange::_6V
@ _6V
Up to 6V.
Definition
pokitmeter.h:50
PokitMeter::maxValue
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 Meter ...
Definition
pokitmeter.cpp:44
ResistanceRange
Encapsulates convenience functions for working with resistance ranges.
Definition
pokitproducts.cpp:216
VoltageRange
Encapsulates convenience functions for working with voltage ranges.
Definition
pokitproducts.cpp:257
operator+
constexpr quint8 operator+(PokitMeter::CurrentRange range) noexcept
Returns range as a quint8 as a convenience for assigning to services' settings.range members.
Definition
pokitmeter.h:62
toString
QTPOKIT_EXPORT QString toString(const PokitProduct product)
Returns product as user-friendly string.
Definition
pokitproducts.cpp:35
QString
qtpokit_global.h
Global QtPokit library macros.
QTPOKIT_BEGIN_NAMESPACE
#define QTPOKIT_BEGIN_NAMESPACE
Macro for starting the QtPokit library's top-most namespace (if one is defined).
Definition
qtpokit_global.h:81
QTPOKIT_EXPORT
#define QTPOKIT_EXPORT
QtPokit library export/import macro.
Definition
qtpokit_global.h:26
QTPOKIT_END_NAMESPACE
#define QTPOKIT_END_NAMESPACE
Macro for ending the QtPokit library's top-most namespace (if one is defined).
Definition
qtpokit_global.h:82
dokit
dokit
include
qtpokit
pokitmeter.h
Generated by
1.18.0