Dokit
Native Qt library for Pokit devices
Loading...
Searching...
No Matches
calibrationservice.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2022-2023 Paul Colby <git@colby.id.au>
2// SPDX-License-Identifier: LGPL-3.0-or-later
3
4/*!
5 * \file
6 * Declares the CalibrationService class.
7 */
8
9#ifndef QTPOKIT_CALIBRATIONSERVICE_H
10#define QTPOKIT_CALIBRATIONSERVICE_H
11
13
14#include <QBluetoothAddress>
15#include <QBluetoothUuid>
16#include <QVersionNumber>
17
18QTPOKIT_BEGIN_NAMESPACE
19
20class CalibrationServicePrivate;
21
22class QTPOKIT_EXPORT CalibrationService : public AbstractPokitService
23{
24 Q_OBJECT
25
26public:
28
29 struct QTPOKIT_EXPORT CharacteristicUuids {
31 };
32
33 CalibrationService(QLowEnergyController * const pokitDevice, QObject * parent = nullptr);
34 ~CalibrationService() override;
35
36 bool readCharacteristics() override;
37
38 // Temperature characteristic (BLE write only).
39 bool calibrateTemperature(const float ambientTemperature);
40
41signals:
43
44protected:
45 /// \cond internal
46 CalibrationService(CalibrationServicePrivate * const d, QObject * const parent);
47 /// \endcond
48
49private:
50 Q_DECLARE_PRIVATE(CalibrationService)
52 friend class TestCalibrationService;
53};
54
55QTPOKIT_END_NAMESPACE
56
57#endif // QTPOKIT_CALIBRATIONSERVICE_H
Declares the AbstractPokitService class.
The AbstractPokitService class provides a common base for Pokit services classes.
Definition abstractpokitservice.h:25
virtual bool readCharacteristics()=0
Read all characteristics.
The CalibrationService class accesses the Calibrartion service of Pokit devices.
Definition calibrationservice.h:23
static const QBluetoothUuid serviceUuid
UUID of the "Calibration" service.
Definition calibrationservice.h:27
void temperatureCalibrated()
This signal is emitted when the Temperature characteristic has been written succesfully.
Q_DISABLE_COPY(Class)
Characteristics available via the Calibration service.
Definition calibrationservice.h:29
static const QBluetoothUuid temperature
UUID of the Calibration service's Temperature characterstic.
Definition calibrationservice.h:30