QtPokit
Native Qt library for Pokit devices
Loading...
Searching...
No Matches
pokitdevice.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2022 Paul Colby <git@colby.id.au>
2// SPDX-License-Identifier: LGPL-3.0-or-later
3
4/*!
5 * \file
6 * Declares the PokitDevice class.
7 */
8
9#ifndef QTPOKIT_POKITDEVICE_H
10#define QTPOKIT_POKITDEVICE_H
11
12#include "qtpokit_global.h"
13
14#include <QBluetoothDeviceInfo>
15#include <QObject>
16
18
19QTPOKIT_BEGIN_NAMESPACE
20
24class DsoService;
27class StatusService;
28
29class PokitDevicePrivate;
30
31class QTPOKIT_EXPORT PokitDevice : public QObject
32{
33 Q_OBJECT
34
35public:
36 explicit PokitDevice(const QBluetoothDeviceInfo &deviceInfo, QObject *parent=nullptr);
37 explicit PokitDevice(QLowEnergyController *controller, QObject *parent=nullptr);
38 virtual ~PokitDevice();
39
40 QLowEnergyController * controller();
41 const QLowEnergyController * controller() const;
42
43 CalibrationService * calibration();
44 DataLoggerService * dataLogger();
45 DeviceInfoService * deviceInformation();
46 DsoService * dso();
47 GenericAccessService * genericAccess();
48 MultimeterService * multimeter();
49 StatusService * status();
50
51 static QString serviceToString(const QBluetoothUuid &uuid);
52 static QString charcteristicToString(const QBluetoothUuid &uuid);
53
54public slots:
55
56signals:
57
58protected:
59 /// \cond internal
60 PokitDevicePrivate * d_ptr; ///< Internal d-pointer.
61 PokitDevice(PokitDevicePrivate * const d, QObject * const parent);
62 /// \endcond
63
64private:
65 Q_DECLARE_PRIVATE(PokitDevice)
66 Q_DISABLE_COPY(PokitDevice)
67 friend class TestPokitDevice;
68};
69
70QTPOKIT_END_NAMESPACE
71
72#endif // QTPOKIT_POKITDEVICE_H
The CalibrationService class accesses the Calibrartion service of Pokit devices.
Definition: calibrationservice.h:23
The DataLoggerService class accesses the Pokit Status service of Pokit devices.
Definition: dataloggerservice.h:23
The DeviceInfoService class accesses the Device Info service of Pokit devices.
Definition: deviceinfoservice.h:23
The DsoService class accesses the Pokit Status service of Pokit devices.
Definition: dsoservice.h:23
The GenericAccessService class accesses the Generic Access service of Pokit devices.
Definition: genericaccessservice.h:23
The MultimeterService class accesses the Pokit Status service of Pokit devices.
Definition: multimeterservice.h:23
The PokitDevice class simplifies Pokit device access.
Definition: pokitdevice.h:32
The StatusService class accesses the Pokit Status service of Pokit devices.
Definition: statusservice.h:23
Global QtPokit library macros.