Dokit
Internal development documentation
|
The PokitDevicePrivate class provides private implementation for PokitDevice. More...
Public Slots | |
void | connected () const |
Handle connected signals. | |
void | connectionUpdated (const QLowEnergyConnectionParameters &newParameters) const |
Handle connectionUpdated signals. | |
void | disconnected () const |
Handle disconnected signals. | |
void | discoveryFinished () const |
Handle discoveryFinished signals. | |
void | errorOccurred (QLowEnergyController::Error newError) const |
Handle error signals. | |
void | serviceDiscovered (const QBluetoothUuid &newService) const |
Handle serviceDiscovered signals. | |
void | stateChanged (QLowEnergyController::ControllerState state) const |
Handle stateChanged signals. | |
Public Member Functions | |
PokitDevicePrivate (PokitDevice *const q) | |
Constructs a new PokitDevicePrivate object with public implementation q. | |
void | setController (QLowEnergyController *newController) |
Sets newController to be used for accessing Pokit devices. | |
Public Member Functions inherited from QObject | |
virtual const QMetaObject * | metaObject () const const |
QObject (QObject *parent) | |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
QString | objectName () const const |
void | setObjectName (const QString &name) |
bool | isWidgetType () const const |
bool | isWindowType () const const |
bool | signalsBlocked () const const |
bool | blockSignals (bool block) |
QThread * | thread () const const |
void | moveToThread (QThread *targetThread) |
int | startTimer (int interval, Qt::TimerType timerType) |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType) |
void | killTimer (int id) |
T | findChild (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegExp ®Exp, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
const QObjectList & | children () const const |
void | setParent (QObject *parent) |
void | installEventFilter (QObject *filterObj) |
void | removeEventFilter (QObject *obj) |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) const const |
bool | disconnect (const QObject *receiver, const char *method) const const |
void | dumpObjectTree () |
void | dumpObjectInfo () |
void | dumpObjectTree () const const |
void | dumpObjectInfo () const const |
bool | setProperty (const char *name, const QVariant &value) |
QVariant | property (const char *name) const const |
QList< QByteArray > | dynamicPropertyNames () const const |
void | destroyed (QObject *obj) |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () const const |
bool | inherits (const char *className) const const |
void | deleteLater () |
Q_DISABLE_COPY (Class) | |
Q_DISABLE_MOVE (Class) | |
Q_DISABLE_COPY_MOVE (Class) | |
T | qobject_cast (QObject *object) |
T | qobject_cast (const QObject *object) |
T | qFindChild (const QObject *obj, const QString &name) |
QList< T > | qFindChildren (const QObject *obj, const QString &name) |
QList< T > | qFindChildren (const QObject *obj, const QRegExp ®Exp) |
Q_CLASSINFO (Name, Value) | |
Q_INTERFACES (...) | |
Q_PROPERTY (...) | |
Q_ENUMS (...) | |
Q_FLAGS (...) | |
Q_ENUM (...) | |
Q_FLAG (...) | |
Q_ENUM_NS (...) | |
Q_FLAG_NS (...) | |
Q_OBJECT Q_OBJECT | |
Q_GADGET Q_GADGET | |
Q_NAMESPACE Q_NAMESPACE | |
Q_NAMESPACE_EXPORT (EXPORT_MACRO) | |
Q_SIGNALS Q_SIGNALS | |
Q_SIGNAL Q_SIGNAL | |
Q_SLOTS Q_SLOTS | |
Q_SLOT Q_SLOT | |
Q_EMIT Q_EMIT | |
Q_INVOKABLE Q_INVOKABLE | |
Q_REVISION Q_REVISION | |
Q_SET_OBJECT_NAME (Object) | |
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
Static Public Member Functions | |
static | Q_LOGGING_CATEGORY (lc, "pokit.ble.controller", QtInfoMsg) |
Logging category. | |
Static Public Member Functions inherited from QObject | |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
bool | disconnect (const QMetaObject::Connection &connection) |
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
Public Attributes | |
QLowEnergyController * | controller { nullptr } |
BLE controller for accessing the Pokit device. | |
CalibrationService * | calibration { nullptr } |
Calibration service for this Pokit device. | |
DataLoggerService * | dataLogger { nullptr } |
Data Logger service for this Pokit device. | |
DeviceInfoService * | deviceInfo { nullptr } |
Device Info service for this Pokit device. | |
DsoService * | dso { nullptr } |
DSO service for this Pokit device. | |
GenericAccessService * | genericAccess { nullptr } |
Generic Access service for this Pokit device. | |
MultimeterService * | multimeter { nullptr } |
Multimeter service for this Pokit device. | |
StatusService * | status { nullptr } |
Status service for this Pokit device. | |
QMutex | calibrationMutex |
Mutex for protecting access to calibration. | |
QMutex | dataLoggerMutex |
Mutex for protecting access to dataLogger. | |
QMutex | deviceInfoMutex |
Mutex for protecting access to deviceInfo. | |
QMutex | dsoMutex |
Mutex for protecting access to dso. | |
QMutex | genericAccessMutex |
Mutex for protecting access to genericAccess. | |
QMutex | multimeterMutex |
Mutex for protecting access to multimeter. | |
QMutex | statusMutex |
Mutex for protecting access to status. | |
Public Attributes inherited from QObject | |
typedef | QObjectList |
Protected Attributes | |
PokitDevice * | q_ptr |
Internal q-pointer. | |
Friends | |
class | TestPokitDevice |
Additional Inherited Members | |
Protected Member Functions inherited from QObject | |
QObject * | sender () const const |
int | senderSignalIndex () const const |
int | receivers (const char *signal) const const |
bool | isSignalConnected (const QMetaMethod &signal) const const |
virtual void | timerEvent (QTimerEvent *event) |
virtual void | childEvent (QChildEvent *event) |
virtual void | customEvent (QEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
Properties inherited from QObject | |
objectName | |
The PokitDevicePrivate class provides private implementation for PokitDevice.
Definition at line 32 of file pokitdevice_p.h.
|
explicit |
Constructs a new PokitDevicePrivate object with public implementation q.
Definition at line 290 of file pokitdevice.cpp.
|
slot |
Handle connected signals.
Definition at line 363 of file pokitdevice.cpp.
References QString::arg(), controller, QLowEnergyController::remoteAddress(), QLowEnergyController::remoteDeviceUuid(), QLowEnergyController::remoteName(), QBluetoothAddress::toString(), QUuid::toString(), and QObject::tr().
Referenced by setController().
|
slot |
Handle connectionUpdated signals.
Definition at line 377 of file pokitdevice.cpp.
References QLowEnergyConnectionParameters::latency(), QLowEnergyConnectionParameters::maximumInterval(), QLowEnergyConnectionParameters::minimumInterval(), QLowEnergyConnectionParameters::supervisionTimeout(), and QObject::tr().
Referenced by setController().
|
slot |
Handle disconnected signals.
Definition at line 387 of file pokitdevice.cpp.
References QObject::tr().
Referenced by setController().
|
slot |
Handle discoveryFinished signals.
Definition at line 395 of file pokitdevice.cpp.
References QObject::tr().
Referenced by setController().
|
slot |
Handle error signals.
Definition at line 403 of file pokitdevice.cpp.
References QObject::tr().
Referenced by setController().
|
slot |
Handle serviceDiscovered signals.
Definition at line 411 of file pokitdevice.cpp.
References QString::arg(), PokitDevice::serviceToString(), QUuid::toString(), and QObject::tr().
Referenced by setController().
void PokitDevicePrivate::setController | ( | QLowEnergyController * | newController | ) |
Sets newController to be used for accessing Pokit devices.
If a controller has already been set (and is not the same pointer), then the previous controller will be disconnected, and replaced with newController.
This function will not take ownership of the new controller. The caller is responsible for ensuring that newContorller remains valid for the lifetime of this instance, or until this function is used again to replace newController with another one (which may be a nullptr).
Definition at line 308 of file pokitdevice.cpp.
References QString::arg(), QObject::connect(), QLowEnergyController::connected(), connected(), QLowEnergyController::connectionUpdated(), connectionUpdated(), controller, QObject::disconnect(), QLowEnergyController::disconnected(), disconnected(), QLowEnergyController::discoveryFinished(), discoveryFinished(), QLowEnergyController::error(), errorOccurred(), QLowEnergyController::remoteAddress(), QLowEnergyController::remoteDeviceUuid(), QLowEnergyController::remoteName(), QLowEnergyController::serviceDiscovered(), serviceDiscovered(), QLowEnergyController::stateChanged(), stateChanged(), QBluetoothAddress::toString(), QUuid::toString(), and QObject::tr().
|
slot |
Handle stateChanged signals.
Definition at line 420 of file pokitdevice.cpp.
References QObject::tr().
Referenced by setController().
|
friend |
Definition at line 76 of file pokitdevice_p.h.
CalibrationService* PokitDevicePrivate::calibration { nullptr } |
Calibration service for this Pokit device.
Definition at line 41 of file pokitdevice_p.h.
QMutex PokitDevicePrivate::calibrationMutex |
Mutex for protecting access to calibration.
Definition at line 49 of file pokitdevice_p.h.
QLowEnergyController* PokitDevicePrivate::controller { nullptr } |
BLE controller for accessing the Pokit device.
Definition at line 39 of file pokitdevice_p.h.
Referenced by connected(), and setController().
DataLoggerService* PokitDevicePrivate::dataLogger { nullptr } |
Data Logger service for this Pokit device.
Definition at line 42 of file pokitdevice_p.h.
QMutex PokitDevicePrivate::dataLoggerMutex |
Mutex for protecting access to dataLogger.
Definition at line 50 of file pokitdevice_p.h.
DeviceInfoService* PokitDevicePrivate::deviceInfo { nullptr } |
Device Info service for this Pokit device.
Definition at line 43 of file pokitdevice_p.h.
QMutex PokitDevicePrivate::deviceInfoMutex |
Mutex for protecting access to deviceInfo.
Definition at line 51 of file pokitdevice_p.h.
DsoService* PokitDevicePrivate::dso { nullptr } |
DSO service for this Pokit device.
Definition at line 44 of file pokitdevice_p.h.
QMutex PokitDevicePrivate::dsoMutex |
Mutex for protecting access to dso.
Definition at line 52 of file pokitdevice_p.h.
GenericAccessService* PokitDevicePrivate::genericAccess { nullptr } |
Generic Access service for this Pokit device.
Definition at line 45 of file pokitdevice_p.h.
QMutex PokitDevicePrivate::genericAccessMutex |
Mutex for protecting access to genericAccess.
Definition at line 53 of file pokitdevice_p.h.
MultimeterService* PokitDevicePrivate::multimeter { nullptr } |
Multimeter service for this Pokit device.
Definition at line 46 of file pokitdevice_p.h.
QMutex PokitDevicePrivate::multimeterMutex |
Mutex for protecting access to multimeter.
Definition at line 54 of file pokitdevice_p.h.
|
protected |
Internal q-pointer.
Definition at line 71 of file pokitdevice_p.h.
StatusService* PokitDevicePrivate::status { nullptr } |
Status service for this Pokit device.
Definition at line 47 of file pokitdevice_p.h.
QMutex PokitDevicePrivate::statusMutex |
Mutex for protecting access to status.
Definition at line 55 of file pokitdevice_p.h.