Dokit
Native Qt library for Pokit devices
Loading...
Searching...
No Matches
pokitdevice.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 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;
26class StatusService;
27
28class PokitDevicePrivate;
29
30class QTPOKIT_EXPORT PokitDevice : public QObject
31{
32 Q_OBJECT
33
34public:
35 explicit PokitDevice(const QBluetoothDeviceInfo &deviceInfo, QObject * parent = nullptr);
36 explicit PokitDevice(QLowEnergyController * controller, QObject * parent = nullptr);
37 virtual ~PokitDevice();
38
39 QLowEnergyController * controller();
40 const QLowEnergyController * controller() const;
41
42 CalibrationService * calibration();
43 DataLoggerService * dataLogger();
44 DeviceInfoService * deviceInformation();
45 DsoService * dso();
46 MultimeterService * multimeter();
47 StatusService * status();
48
49 static QString serviceToString(const QBluetoothUuid &uuid);
50 static QString charcteristicToString(const QBluetoothUuid &uuid);
51
52public Q_SLOTS:
53
55
56protected:
57 /// \cond internal
58 PokitDevicePrivate * d_ptr; ///< Internal d-pointer.
59 PokitDevice(PokitDevicePrivate * const d, QObject * const parent);
60 /// \endcond
61
62private:
63 Q_DECLARE_PRIVATE(PokitDevice)
65 friend class TestPokitDevice;
66};
67
68QTPOKIT_END_NAMESPACE
69
70#endif // QTPOKIT_POKITDEVICE_H
The CalibrationService class accesses the Calibrartion service of Pokit devices.
Definition calibrationservice.h:23
The DataLoggerService class accesses the Data Logger 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 DSO (Digital Storage Oscilloscope) service of Pokit devices.
Definition dsoservice.h:24
The MultimeterService class accesses the Multimeter service of Pokit devices.
Definition multimeterservice.h:23
The PokitDevice class simplifies Pokit device access.
Definition pokitdevice.h:31
The StatusService class accesses the Pokit Status service of Pokit devices.
Definition statusservice.h:25
Q_DISABLE_COPY(Class)
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
Global QtPokit library macros.