9#ifndef QTPOKIT_MULTIMETERSERVICE_H
10#define QTPOKIT_MULTIMETERSERVICE_H
14#include <QBluetoothAddress>
15#include <QBluetoothUuid>
16#include <QVersionNumber>
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.
The MultimeterServicePrivate class provides private implementation for MultimeterService.
void settingsWritten()
This signal is emitted when the Settings characteristic has been written successfully.
bool enableReadingNotifications()
Enables client-side notifications of meter readings.
MeterStatus
Values supported by the Status attribute of the Settings characteristic.
@ AutoRangeOn
Auto-range is enabled (voltage, current and resistance modes only).
@ AutoRangeOff
Auto-range is disabled (voltage, current and resistance modes only).
@ Error
Error (all modes).
@ NoContinuity
No continuity (continuity mode only).
@ Ok
Ok (temperature and diode modes only).
Mode
Values supported by the Mode attribute of the Settings and Reading characteristics.
@ DcVoltage
Measure DC voltage.
@ Capacitance
Measure capacitance.
@ AcCurrent
Measure AC current.
@ ExternalTemperature
Measure temperature via an external temperature probe.
@ Resistance
Measure resistance.
@ AcVoltage
Measure AC voltage.
@ Temperature
Measure temperature.
@ DcCurrent
Measure DC current.
@ Continuity
Measure continuity.
static const QBluetoothUuid serviceUuid
UUID of the Multimeter service.
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.
bool readReadingCharacteristic()
Read the Multimeter service's Reading characteristic.
bool setSettings(const Settings &settings)
Configures the Pokit device's multimeter mode.
Reading reading() const
Returns the most recent value of the Multimeter service's Reading characteristic.
bool disableReadingNotifications()
Disables client-side notifications of meter readings.
PokitProduct
Pokit products known to, and supported by, the QtPokit library.
QTPOKIT_EXPORT QString toString(const PokitProduct product)
Returns product as user-friendly string.
QObject * parent() const const
#define QTPOKIT_BEFRIEND_TEST(Class)
Macro for befriending a related unit test class, but only when QT_TESTLIB_LIB is defined.
#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.
static const QBluetoothUuid reading
UUID of the Multimeter service's Reading characterstic.
static const QBluetoothUuid settings
UUID of the Multimeter service's Settings characterstic.
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.