9#ifndef QTPOKIT_MULTIMETERSERVICE_H
10#define QTPOKIT_MULTIMETERSERVICE_H
14#include <QBluetoothAddress>
15#include <QBluetoothUuid>
16#include <QVersionNumber>
18QTPOKIT_BEGIN_NAMESPACE
20class MultimeterServicePrivate;
46 static QString toString(
const Mode &mode);
58 static QString toString(
const VoltageRange &range);
59 static QVariant minValue(
const VoltageRange &range);
60 static QVariant maxValue(
const VoltageRange &range);
71 static QString toString(
const CurrentRange &range);
72 static QVariant minValue(
const CurrentRange &range);
73 static QVariant maxValue(
const CurrentRange &range);
87 static QString toString(
const ResistanceRange &range);
88 static QVariant minValue(
const ResistanceRange &range);
89 static QVariant maxValue(
const ResistanceRange &range);
128 bool readReadingCharacteristic();
131 bool setSettings(
const Settings &settings);
135 bool enableReadingNotifications();
136 bool disableReadingNotifications();
150 friend class TestMultimeterService;
Declares the AbstractPokitService class.
The AbstractPokitService class provides a common base for Pokit services classes.
Definition: abstractpokitservice.h:24
virtual bool readCharacteristics()=0
Read all characteristics.
The MultimeterService class accesses the Multimeter service of Pokit devices.
Definition: multimeterservice.h:23
CurrentRange
Values supported by the Range attribute of the Settings and Reading characteristics,...
Definition: multimeterservice.h:62
MeterStatus
Values supported by the Status attribute of the Settings characteristic.
Definition: multimeterservice.h:108
Mode
Values supported by the Mode attribute of the Settings and Reading characteristics.
Definition: multimeterservice.h:34
static const QBluetoothUuid serviceUuid
UUID of the "Multimeter" service.
Definition: multimeterservice.h:27
ResistanceRange
Values supported by the Range attribute of the Settings and Reading characteristics,...
Definition: multimeterservice.h:75
void readingRead(const MultimeterService::Reading &reading)
This signal is emitted when the Reading characteristic has been read successfully.
void settingsWritten()
This signal is emitted when the Settings characteristic has been written successfully.
VoltageRange
Values supported by the Range attribute of the Settings and Reading characteristics,...
Definition: multimeterservice.h:48
QTPOKIT_EXPORT bool operator!=(const MultimeterService::Range &lhs, const MultimeterService::Range &rhs)
Returns true if lhs is numerically not-equal to rhs, false otherwise.
Definition: multimeterservice.cpp:289
QTPOKIT_EXPORT bool operator==(const MultimeterService::Range &lhs, const MultimeterService::Range &rhs)
Returns true if lhs is numerically equal to rhs, false otherwise.
Definition: multimeterservice.cpp:282
QTPOKIT_EXPORT bool operator>=(const MultimeterService::Range &lhs, const MultimeterService::Range &rhs)
Returns true if lhs is numerically greater than or equal to rhs, false otherwise.
Definition: multimeterservice.cpp:317
QTPOKIT_EXPORT bool operator<(const MultimeterService::Range &lhs, const MultimeterService::Range &rhs)
Returns true if lhs is numerically less than rhs, false otherwise.
Definition: multimeterservice.cpp:296
QTPOKIT_EXPORT bool operator>(const MultimeterService::Range &lhs, const MultimeterService::Range &rhs)
Returns true if lhs is numerically greater than rhs, false otherwise.
Definition: multimeterservice.cpp:303
QTPOKIT_EXPORT bool operator<=(const MultimeterService::Range &lhs, const MultimeterService::Range &rhs)
Returns true if lhs is numerically less than or equal to rhs, false otherwise.
Definition: multimeterservice.cpp:310
Characteristics available via the Multimeter service.
Definition: multimeterservice.h:29
static const QBluetoothUuid reading
UUID of the Multimeter service's Reading characterstic.
Definition: multimeterservice.h:31
static const QBluetoothUuid settings
UUID of the Multimeter service's Settings characterstic.
Definition: multimeterservice.h:30
Attributes included in the Reading characterstic.
Definition: multimeterservice.h:117
MeterStatus status
Current multimeter status.
Definition: multimeterservice.h:118
Range range
Current range.
Definition: multimeterservice.h:121
Mode mode
Current operation mode.
Definition: multimeterservice.h:120
float value
Last acquired value.
Definition: multimeterservice.h:119
Attributes included in the Settings characterstic.
Definition: multimeterservice.h:102
quint32 updateInterval
Desired update interval in milliseconds.
Definition: multimeterservice.h:105
Range range
Desired range.
Definition: multimeterservice.h:104
Mode mode
Desired operation mode.
Definition: multimeterservice.h:103
Values supported by the Range attribute of the Settings characteristic.
Definition: multimeterservice.h:91
ResistanceRange resistanceRange
Range when in resistance mode.
Definition: multimeterservice.h:94
CurrentRange currentRange
Range when in AC/DC current mode.
Definition: multimeterservice.h:93
VoltageRange voltageRange
Range when in AC/DC voltage mode.
Definition: multimeterservice.h:92