Dokit
Native Qt library for Pokit devices
Loading...
Searching...
No Matches
pokitdevice.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2022-2025 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{
33
34public:
35 explicit PokitDevice(const QBluetoothDeviceInfo &deviceInfo, QObject * parent = nullptr);
37 virtual ~PokitDevice();
38
40 const QLowEnergyController * controller() const;
41
45 DsoService * dso();
48
49 static QString serviceToString(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 QTPOKIT_BEFRIEND_TEST(PokitDevice)
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
static QString charcteristicToString(const QBluetoothUuid &uuid)
Returns a human-readable name for the uuid characteristic, or a null QString if unknown.
Definition pokitdevice.cpp:218
DeviceInfoService * deviceInformation()
Returns a pointer to DeviceInformationService instance that uses this device's controller for access.
Definition pokitdevice.cpp:142
QLowEnergyController * controller()
Returns a non-const pointer to the controller used to access the Pokit device.
Definition pokitdevice.cpp:85
DsoService * dso()
Returns a pointer to DsoService instance that uses this device's controller for access.
Definition pokitdevice.cpp:154
PokitDevice(const QBluetoothDeviceInfo &deviceInfo, QObject *parent=nullptr)
Constructs a new Pokit device controller wrapper for deviceInfo, with parent.
Definition pokitdevice.cpp:43
DataLoggerService * dataLogger()
Returns a pointer to a DataLoggerService instance that uses this device's controller for access.
Definition pokitdevice.cpp:129
MultimeterService * multimeter()
Returns a pointer to MultimeterService instance that uses this device's controller for access.
Definition pokitdevice.cpp:166
CalibrationService * calibration()
*‍/
Definition pokitdevice.cpp:117
static QString serviceToString(const QBluetoothUuid &uuid)
Returns a human-readable name for the uuid service, or a null QString if unknonw.
Definition pokitdevice.cpp:190
StatusService * status()
Returns a pointer to StatusService instance that uses this device's controller for access.
Definition pokitdevice.cpp:178
The StatusService class accesses the Pokit Status service of Pokit devices.
Definition statusservice.h:23
QObject(QObject *parent)
Q_DISABLE_COPY(Class)
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
Global QtPokit library macros.