9#ifndef QTPOKIT_MULTIMETERSERVICE_H
10#define QTPOKIT_MULTIMETERSERVICE_H
14#include <QBluetoothAddress>
15#include <QBluetoothUuid>
16#include <QVersionNumber>
18QTPOKIT_BEGIN_NAMESPACE
20class MultimeterServicePrivate;
57 static quint32 maxValue(
const PokitProduct product,
const quint8 range,
const Mode mode);
58 quint32 maxValue(
const quint8 range,
const Mode mode)
const;
Declares the AbstractPokitService class.
virtual bool readCharacteristics()=0
Read all characteristics.
void settingsWritten()
This signal is emitted when the Settings characteristic has been written successfully.
bool enableReadingNotifications()
Enables client-side notifications of meter readings.
Definition multimeterservice.cpp:219
MeterStatus
Values supported by the Status attribute of the Settings characteristic.
Definition multimeterservice.h:68
@ AutoRangeOn
Auto-range is enabled (voltage, current and resistance modes only).
Definition multimeterservice.h:70
@ AutoRangeOff
Auto-range is disabled (voltage, current and resistance modes only).
Definition multimeterservice.h:69
@ Error
Error (all modes).
Definition multimeterservice.h:74
@ NoContinuity
No continuity (continuity mode only).
Definition multimeterservice.h:71
@ Ok
Ok (temperature and diode modes only).
Definition multimeterservice.h:73
Mode
Values supported by the Mode attribute of the Settings and Reading characteristics.
Definition multimeterservice.h:40
@ Diode
Measure diode.
Definition multimeterservice.h:47
@ DcVoltage
Measure DC voltage.
Definition multimeterservice.h:42
@ Capacitance
Measure capacitance.
Definition multimeterservice.h:50
@ AcCurrent
Measure AC current.
Definition multimeterservice.h:45
@ ExternalTemperature
Measure temperature via an external temperature probe.
Definition multimeterservice.h:51
@ Resistance
Measure resistance.
Definition multimeterservice.h:46
@ AcVoltage
Measure AC voltage.
Definition multimeterservice.h:43
@ Idle
Make device idle.
Definition multimeterservice.h:41
@ Temperature
Measure temperature.
Definition multimeterservice.h:49
@ DcCurrent
Measure DC current.
Definition multimeterservice.h:44
@ Continuity
Measure continuity.
Definition multimeterservice.h:48
static const QBluetoothUuid serviceUuid
UUID of the Multimeter service.
Definition multimeterservice.h:28
void readingRead(const MultimeterService::Reading &reading)
This signal is emitted when the Reading characteristic has been read successfully.
MultimeterService(QLowEnergyController *const pokitDevice, QObject *parent=nullptr)
Constructs a new Pokit service with parent.
Definition multimeterservice.cpp:124
bool readReadingCharacteristic()
Read the Multimeter service's Reading characteristic.
Definition multimeterservice.cpp:156
bool setSettings(const Settings &settings)
Configures the Pokit device's multimeter mode.
Definition multimeterservice.cpp:169
Reading reading() const
Returns the most recent value of the Multimeter service's Reading characteristic.
Definition multimeterservice.cpp:201
bool disableReadingNotifications()
Disables client-side notifications of meter readings.
Definition multimeterservice.cpp:232
PokitProduct
Pokit products known to, and supported by, the QtPokit library.
Definition pokitproducts.h:21
QTPOKIT_EXPORT QString toString(const PokitProduct product)
Returns product as user-friendly string.
Definition pokitproducts.cpp:33
QObject * parent() const const
Characteristics available via the Multimeter service.
Definition multimeterservice.h:31
static const QBluetoothUuid reading
UUID of the Multimeter service's Reading characterstic.
Definition multimeterservice.h:36
static const QBluetoothUuid settings
UUID of the Multimeter service's Settings characterstic.
Definition multimeterservice.h:33
Attributes included in the Reading characterstic.
Definition multimeterservice.h:78
MeterStatus status
Current multimeter status.
Definition multimeterservice.h:79
Mode mode
Current operation mode.
Definition multimeterservice.h:81
float value
Last acquired value.
Definition multimeterservice.h:80
quint8 range
Current range.
Definition multimeterservice.h:82
Attributes included in the Settings characterstic.
Definition multimeterservice.h:61
quint32 updateInterval
Desired update interval in milliseconds.
Definition multimeterservice.h:64
quint8 range
Desired range.
Definition multimeterservice.h:63
Mode mode
Desired operation mode.
Definition multimeterservice.h:62