Dokit
Internal development documentation
Loading...
Searching...
No Matches
pokitdevice.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 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
20
24class DsoService;
27class StatusService;
28
30
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 Q_SLOTS:
55
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)
67 friend class TestPokitDevice;
68};
69
71
72#endif // QTPOKIT_POKITDEVICE_H
The CalibrationService class accesses the Calibrartion service of Pokit devices.
The DataLoggerService class accesses the Data Logger service of Pokit devices.
The DeviceInfoService class accesses the Device Info service of Pokit devices.
The DsoService class accesses the DSO (Digital Storage Oscilloscope) service of Pokit devices.
Definition dsoservice.h:24
The GenericAccessService class accesses the Generic Access service of Pokit devices.
The MultimeterService class accesses the Multimeter service of Pokit devices.
The PokitDevicePrivate class provides private implementation for PokitDevice.
The PokitDevice class simplifies Pokit device access.
Definition pokitdevice.h:32
PokitDevicePrivate * d_ptr
Internal d-pointer.
Definition pokitdevice.h:60
The StatusService class accesses the Pokit Status service of Pokit devices.
Q_DISABLE_COPY(Class)
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
Global QtPokit library macros.
#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).