Dokit
Internal development documentation
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
20
24class DsoService;
26class StatusService;
27
29
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)
66};
67
69
70#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 MultimeterService class accesses the Multimeter service of Pokit devices.
The PokitDevicePrivate class provides private implementation for PokitDevice.
static QString charcteristicToString(const QBluetoothUuid &uuid)
Returns a human-readable name for the uuid characteristic, or a null QString if unknown.
DeviceInfoService * deviceInformation()
Returns a pointer to DeviceInformationService instance that uses this device's controller for access.
QLowEnergyController * controller()
Returns a non-const pointer to the controller used to access the Pokit device.
DsoService * dso()
Returns a pointer to DsoService instance that uses this device's controller for access.
PokitDevice(const QBluetoothDeviceInfo &deviceInfo, QObject *parent=nullptr)
Constructs a new Pokit device controller wrapper for deviceInfo, with parent.
PokitDevicePrivate * d_ptr
Internal d-pointer.
Definition pokitdevice.h:58
DataLoggerService * dataLogger()
Returns a pointer to a DataLoggerService instance that uses this device's controller for access.
MultimeterService * multimeter()
Returns a pointer to MultimeterService instance that uses this device's controller for access.
CalibrationService * calibration()
Returns a pointer to a CalibrationService instance that uses this device's controller for access.
static QString serviceToString(const QBluetoothUuid &uuid)
Returns a human-readable name for the uuid service, or a null QString if unknonw.
StatusService * status()
Returns a pointer to StatusService instance that uses this device's controller for access.
The StatusService class accesses the Pokit Status service of Pokit devices.
QObject(QObject *parent)
Q_DISABLE_COPY(Class)
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
Global QtPokit library macros.
#define QTPOKIT_BEFRIEND_TEST(Class)
Macro for befriending a related unit test class, but only when QT_TESTLIB_LIB is defined.
#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).