9#ifndef QTPOKIT_INFOSERVICE_H
10#define QTPOKIT_INFOSERVICE_H
14#include <QBluetoothAddress>
15#include <QBluetoothUuid>
16#include <QVersionNumber>
18QTPOKIT_BEGIN_NAMESPACE
20class DeviceInfoServicePrivate;
29 { QBluetoothUuid::ServiceClassUuid::DeviceInformation };
35 { QBluetoothUuid::CharacteristicType::ManufacturerNameString };
39 { QBluetoothUuid::CharacteristicType::ModelNumberString };
43 { QBluetoothUuid::CharacteristicType::FirmwareRevisionString };
47 { QBluetoothUuid::CharacteristicType::HardwareRevisionString };
51 { QBluetoothUuid::CharacteristicType::SoftwareRevisionString };
55 { QBluetoothUuid::CharacteristicType::SerialNumberString };
62 bool readFirmwareRevisionCharacteristic();
63 bool readHardwareRevisionCharacteristic();
64 bool readManufacturerCharacteristics();
65 bool readModelNumberCharacteristic();
66 bool readSoftwareRevisionCharacteristic();
67 bool readSerialNumberCharacteristic();
72 QString hardwareRevision()
const;
73 QString firmwareRevision()
const;
74 QString softwareRevision()
const;
Declares the AbstractPokitService class.
virtual bool readCharacteristics()=0
Read all characteristics.
The DeviceInfoService class accesses the Device Info service of Pokit devices.
Definition deviceinfoservice.h:23
QString serialNumber() const
Returns the most recent value of the Device Info service's (undocumented) Serial Number characteristi...
Definition deviceinfoservice.cpp:226
void manufacturerRead(const QString &name)
This signal is emitted when the Manufacturer Name characteristic has been read successfully.
void modelNumberRead(const QString &model)
This signal is emitted when the Model Number characteristic has been read successfully.
void hardwareRevisionRead(const QString &revision)
This signal is emitted when the Hardware Revision characteristic has been read successfully.
void softwareRevisionRead(const QString &revision)
This signal is emitted when the Software Revision characteristic has been read successfully.
static const QBluetoothUuid serviceUuid
UUID of the "Device Info" service.
Definition deviceinfoservice.h:29
void firmwareRevisionRead(const QString &revision)
This signal is emitted when the Firmware Revision characteristic has been read successfully.
void serialNumberRead(const QString &serialNumber)
This signal is emitted when the Serial Number characteristic has been read successfully.
DeviceInfoService(QLowEnergyController *const pokitDevice, QObject *parent=nullptr)
Constructs a new Pokit service with parent.
Definition deviceinfoservice.cpp:23
QObject * parent() const const
Characteristics available via the Device Info service.
Definition deviceinfoservice.h:32
static const QBluetoothUuid manufacturerName
UUID of the Device Info service's Manufacturer Name String characterstic.
Definition deviceinfoservice.h:35
static const QBluetoothUuid hardwareRevision
UUID of the Device Info service's Hardware Revision String characterstic.
Definition deviceinfoservice.h:47
static const QBluetoothUuid softwareRevision
UUID of the Device Info service's Software Revision String characterstic.
Definition deviceinfoservice.h:51
static const QBluetoothUuid serialNumber
UUID of the Device Info service's Serial Number String characterstic.
Definition deviceinfoservice.h:55
static const QBluetoothUuid firmwareRevision
UUID of the Device Info service's Firmware Revision String characterstic.
Definition deviceinfoservice.h:43
static const QBluetoothUuid modelNumber
UUID of the Device Info service's Model Number String characterstic.
Definition deviceinfoservice.h:39