58 return (r1 && r2 && r3 && r4 && r5 && r6);
332 qCDebug(lc).noquote() <<
tr(R
"(Manufacturer name: "%1")").arg(name);
333 Q_EMIT q->manufacturerRead(name);
339 qCDebug(lc).noquote() <<
tr(R
"(Model number: "%1")").arg(model);
340 Q_EMIT q->modelNumberRead(model);
346 qCDebug(lc).noquote() <<
tr(R
"(Hardware revision: "%1")").arg(revision);
347 Q_EMIT q->hardwareRevisionRead(revision);
353 qCDebug(lc).noquote() <<
tr(R
"(Firmware revision: "%1")").arg(revision);
354 Q_EMIT q->firmwareRevisionRead(revision);
360 qCDebug(lc).noquote() <<
tr(R
"(Software revision: "%1")").arg(revision);
361 Q_EMIT q->softwareRevisionRead(revision);
367 qCDebug(lc).noquote() <<
tr(R
"(Serial number: "%1")").arg(serialNumber);
368 Q_EMIT q->serialNumberRead(serialNumber);
372 qCWarning(lc).noquote() <<
tr(
"Unknown characteristic read for Device Info service")
The AbstractPokitServicePrivate class provides private implementation for AbstractPokitService.
QBluetoothUuid serviceUuid
UUIDs for service.
virtual void characteristicRead(const QLowEnergyCharacteristic &characteristic, const QByteArray &value)
Handles QLowEnergyService::characteristicRead events.
The AbstractPokitService class provides a common base for Pokit services classes.
QLowEnergyService * service()
Returns a non-const pointer to the internal service object, if any.
The DeviceInfoServicePrivate class provides private implementation for DeviceInfoService.
void characteristicRead(const QLowEnergyCharacteristic &characteristic, const QByteArray &value) override
Implements AbstractPokitServicePrivate::characteristicRead to parse value, then emit a specialised si...
DeviceInfoServicePrivate(QLowEnergyController *controller, DeviceInfoService *const q)
The DeviceInfoService class accesses the Device Info service of Pokit devices.
QString serialNumber() const
Returns the most recent value of the Device Info service's (undocumented) Serial Number characteristi...
bool readSerialNumberCharacteristic()
Read the Device Info service's (undocumented) Serial Number characteristic.
bool readHardwareRevisionCharacteristic()
Read the Device Info service's Hardware Revision characteristic.
bool readSoftwareRevisionCharacteristic()
Read the Device Info service's Software Revision characteristic.
QString softwareRevision() const
Returns the most recent value of the Device Info service's Software Revision characteristic.
bool readFirmwareRevisionCharacteristic()
Read the Device Info service's Firmware Revision characteristic.
QString hardwareRevision() const
Returns the most recent value of the Device Info service's Hardware Revision characteristic.
bool readManufacturerCharacteristics()
Read the Device Info service's Manufacturer Name characteristic.
QString modelNumber() const
Returns the most recent value of the Device Info service's Model Number characteristic.
bool readModelNumberCharacteristic()
Read the Device Info service's Model Number characteristic.
bool readCharacteristics() override
Read all characteristics.
QString manufacturer() const
Returns the most recent value of the Device Info service's Manufacturer Name characteristic.
QString firmwareRevision() const
Returns the most recent value of the Device Info service's Firmware Revision characteristic.
~DeviceInfoService() override
Destroys this DeviceInfoService object.
DeviceInfoService(QLowEnergyController *const pokitDevice, QObject *parent=nullptr)
Constructs a new Pokit service with parent.
Declares the DeviceInfoService class.
Declares the DeviceInfoServicePrivate class.
bool isValid() const const
QString name() const const
QBluetoothUuid uuid() const const
QByteArray value() const const
QLowEnergyCharacteristic characteristic(const QBluetoothUuid &uuid) const const
QString tr(const char *sourceText, const char *disambiguation, int n)
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const
QString fromUtf8(const char *str, int size)
QString & remove(int position, int n)
static const QBluetoothUuid manufacturerName
UUID of the Device Info service's Manufacturer Name String characterstic.
static const QBluetoothUuid hardwareRevision
UUID of the Device Info service's Hardware Revision String characterstic.
static const QBluetoothUuid softwareRevision
UUID of the Device Info service's Software Revision String characterstic.
static const QBluetoothUuid serialNumber
UUID of the Device Info service's Serial Number String characterstic.
static const QBluetoothUuid firmwareRevision
UUID of the Device Info service's Firmware Revision String characterstic.
static const QBluetoothUuid modelNumber
UUID of the Device Info service's Model Number String characterstic.