Dokit
Internal development documentation
Loading...
Searching...
No Matches
multimeterservice_p.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2022-2024 Paul Colby <git@colby.id.au>
2// SPDX-License-Identifier: LGPL-3.0-or-later
3
4/*!
5 * \file
6 * Declares the MultimeterServicePrivate class.
7 */
8
9#ifndef QTPOKIT_MULTIMETERSERVICE_P_H
10#define QTPOKIT_MULTIMETERSERVICE_P_H
11
13
15
17
19{
20 Q_OBJECT
21
22public:
23 explicit MultimeterServicePrivate(QLowEnergyController * controller, MultimeterService * const q);
24
25 static QByteArray encodeSettings(const MultimeterService::Settings &settings);
26
27 static MultimeterService::Reading parseReading(const QByteArray &value);
28
29protected:
30 void characteristicRead(const QLowEnergyCharacteristic &characteristic,
31 const QByteArray &value) override;
32 void characteristicWritten(const QLowEnergyCharacteristic &characteristic,
33 const QByteArray &newValue) override;
34 void characteristicChanged(const QLowEnergyCharacteristic &characteristic,
35 const QByteArray &newValue) override;
36
37private:
38 Q_DECLARE_PUBLIC(MultimeterService)
40 friend class TestMultimeterService;
41};
42
44
45#endif // QTPOKIT_MULTIMETERSERVICE_P_H
Declares the AbstractPokitServicePrivate class.
The AbstractPokitServicePrivate class provides private implementation for AbstractPokitService.
virtual void characteristicChanged(const QLowEnergyCharacteristic &characteristic, const QByteArray &newValue)
Handles QLowEnergyService::characteristicChanged events.
virtual void characteristicRead(const QLowEnergyCharacteristic &characteristic, const QByteArray &value)
Handles QLowEnergyService::characteristicRead events.
virtual void characteristicWritten(const QLowEnergyCharacteristic &characteristic, const QByteArray &newValue)
Handles QLowEnergyService::characteristicWritten events.
The MultimeterServicePrivate class provides private implementation for MultimeterService.
The MultimeterService class accesses the Multimeter service of Pokit devices.
Declares the MultimeterService class.
Q_DISABLE_COPY(Class)
#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).
Attributes included in the Reading characterstic.
Attributes included in the Settings characterstic.