9#ifndef QTPOKIT_MULTIMETERSERVICE_H
10#define QTPOKIT_MULTIMETERSERVICE_H
14#include <QBluetoothAddress>
15#include <QBluetoothUuid>
16#include <QVersionNumber>
28 static inline const QBluetoothUuid serviceUuid { QStringLiteral(
"e7481d2f-5781-442e-bb9a-fd4e3441dadc") };
33 static inline const QBluetoothUuid settings { QStringLiteral(
"53dc9a7a-bc19-4280-b76b-002d0e23b078") };
36 static inline const QBluetoothUuid reading { QStringLiteral(
"047d3559-8bee-423a-b229-4417fa603b90") };
51 ExternalTemperature = 10,
58 QVariant maxValue(
const quint8 range,
const Mode mode)
const;
89 bool readReadingCharacteristic();
92 bool setSettings(
const Settings &settings);
96 bool enableReadingNotifications();
97 bool disableReadingNotifications();
111 friend class TestMultimeterService;
Declares the AbstractPokitService class.
The AbstractPokitService class provides a common base for Pokit services classes.
virtual bool readCharacteristics()=0
Read all characteristics.
The MultimeterServicePrivate class provides private implementation for MultimeterService.
The MultimeterService class accesses the Multimeter service of Pokit devices.
MeterStatus
Values supported by the Status attribute of the Settings characteristic.
Mode
Values supported by the Mode attribute of the Settings and Reading characteristics.
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.
PokitProduct
Pokit products known to, and supported by, the QtPokit library.
QTPOKIT_EXPORT QString toString(const PokitProduct product)
Returns product as user-friendly string.
#define QTPOKIT_BEGIN_NAMESPACE
Macro for starting the QtPokit library's top-most namespace (if one is defined).
#define QTPOKIT_EXPORT
QtPokit library export/import macro.
#define QTPOKIT_END_NAMESPACE
Macro for ending the QtPokit library's top-most namespace (if one is defined).
Characteristics available via the Multimeter service.
Attributes included in the Reading characterstic.
MeterStatus status
Current multimeter status.
Mode mode
Current operation mode.
float value
Last acquired value.
quint8 range
Current range.
Attributes included in the Settings characterstic.
quint32 updateInterval
Desired update interval in milliseconds.
quint8 range
Desired range.
Mode mode
Desired operation mode.