BluezQt::GattCharacteristicRemote Class
class BluezQt::GattCharacteristicRemoteBluetooth LE GATT characteristic. More...
Header: | #include <BluezQt/GattCharacteristicRemote> |
CMake: | find_package(KF6 REQUIRED COMPONENTS BluezQt) target_link_libraries(mytarget PRIVATE KF6::BluezQt) |
Inherits: | QObject |
Properties
|
|
Public Functions
quint16 | MTU() const |
QList<BluezQt::GattDescriptorRemotePtr> | descriptors() const |
QStringList | flags() const |
quint16 | handle() const |
bool | isNotifyAcquired() const |
bool | isNotifying() const |
bool | isWriteAcquired() const |
BluezQt::GattServiceRemotePtr | service() const |
BluezQt::PendingCall * | setHandle(quint16 handle) |
BluezQt::GattCharacteristicRemotePtr | toSharedPtr() const |
QString | ubi() const |
QString | uuid() const |
QByteArray | value() const |
Public Slots
BluezQt::PendingCall * | confirm() |
BluezQt::PendingCall * | readValue(const QVariantMap &options) |
BluezQt::PendingCall * | startNotify() |
BluezQt::PendingCall * | stopNotify() |
BluezQt::PendingCall * | writeValue(const QByteArray &value, const QVariantMap &options) |
Signals
void | MTUChanged(quint16 MTU) |
void | characteristicChanged(BluezQt::GattCharacteristicRemotePtr characteristic) |
void | descriptorsChanged(QList<BluezQt::GattDescriptorRemotePtr> descriptors) |
void | flagsChanged(QStringList flags) |
void | gattDescriptorAdded(BluezQt::GattDescriptorRemotePtr descriptor) |
void | gattDescriptorChanged(BluezQt::GattDescriptorRemotePtr descriptor) |
void | gattDescriptorRemoved(BluezQt::GattDescriptorRemotePtr descriptor) |
void | handleChanged(quint16 handle) |
void | notifyAcquiredChanged(bool notifyAcquired) |
void | notifyingChanged(bool notifying) |
void | uuidChanged(const QString &uuid) |
void | valueChanged(const QByteArray value) |
void | writeAcquiredChanged(bool writeAcquired) |
Detailed Description
This class represents a Bluetooth LE GATT characteristic for the clients.
Property Documentation
[read-only]
MTU : const quint16
Access functions:
quint16 | MTU() const |
Notifier signal:
void | MTUChanged(quint16 MTU) |
[read-only]
descriptors : const QList<GattDescriptorRemotePtr>
Access functions:
QList<BluezQt::GattDescriptorRemotePtr> | descriptors() const |
Notifier signal:
void | descriptorsChanged(QList<BluezQt::GattDescriptorRemotePtr> descriptors) |
[read-only]
flags : const QStringList
Access functions:
QStringList | flags() const |
Notifier signal:
void | flagsChanged(QStringList flags) |
[read-only]
handle : const quint16
Access functions:
quint16 | handle() const |
Notifier signal:
void | handleChanged(quint16 handle) |
[read-only]
notifyAcquired : const bool
Access functions:
bool | isNotifyAcquired() const |
Notifier signal:
void | notifyAcquiredChanged(bool notifyAcquired) |
[read-only]
notifying : const bool
Access functions:
bool | isNotifying() const |
Notifier signal:
void | notifyingChanged(bool notifying) |
[read-only]
service : const GattServiceRemotePtr
Access functions:
BluezQt::GattServiceRemotePtr | service() const |
[read-only]
ubi : const QString
Access functions:
QString | ubi() const |
[read-only]
uuid : const QString
Access functions:
QString | uuid() const |
Notifier signal:
void | uuidChanged(const QString &uuid) |
[read-only]
value : const QByteArray
Access functions:
QByteArray | value() const |
Notifier signal:
void | valueChanged(const QByteArray value) |
[read-only]
writeAcquired : const bool
Access functions:
bool | isWriteAcquired() const |
Notifier signal:
void | writeAcquiredChanged(bool writeAcquired) |
Member Function Documentation
quint16 GattCharacteristicRemote::MTU() const
Returns the characteristic's MTU.
Note: Getter function for property MTU.
[signal]
void GattCharacteristicRemote::MTUChanged(quint16 MTU)
Indicates that the characteristic's MTU have changed.
Note: Notifier signal for property MTU.
[signal]
void GattCharacteristicRemote::characteristicChanged(BluezQt::GattCharacteristicRemotePtr characteristic)
Indicates that at least one of the characteristic's properties has changed.
[slot]
BluezQt::PendingCall *GattCharacteristicRemote::confirm()
Confirmation that value of the characteristic was received.
This method doesn't expect a reply so it is just a confirmation that value was received.
Possible errors:
Returns void pending call.
QList<BluezQt::GattDescriptorRemotePtr> GattCharacteristicRemote::descriptors() const
Returns object paths representing the included services of this service.
Note: Getter function for property descriptors.
[signal]
void GattCharacteristicRemote::descriptorsChanged(QList<BluezQt::GattDescriptorRemotePtr> descriptors)
Indicates that the characteristic's descriptors list has changed.
Note: Notifier signal for property descriptors.
QStringList GattCharacteristicRemote::flags() const
Returns the characteristic's flags.
Note: Getter function for property flags.
[signal]
void GattCharacteristicRemote::flagsChanged(QStringList flags)
Indicates that the characteristic's flags has changed.
Note: Notifier signal for property flags.
[signal]
void GattCharacteristicRemote::gattDescriptorAdded(BluezQt::GattDescriptorRemotePtr descriptor)
Indicates that a new descriptor was added (eg. found by connection).
[signal]
void GattCharacteristicRemote::gattDescriptorChanged(BluezQt::GattDescriptorRemotePtr descriptor)
Indicates that at least one of the descriptor properties has changed.
[signal]
void GattCharacteristicRemote::gattDescriptorRemoved(BluezQt::GattDescriptorRemotePtr descriptor)
Indicates that a descriptor was removed.
quint16 GattCharacteristicRemote::handle() const
Returns the characteristic's handle.
Note: Getter function for property handle.
See also setHandle().
[signal]
void GattCharacteristicRemote::handleChanged(quint16 handle)
Indicates that the characteristic's handle has changed.
Note: Notifier signal for property handle.
bool GattCharacteristicRemote::isNotifyAcquired() const
Returns whether notifyAcquired() is true
for the characteristic.
Note: Getter function for property notifyAcquired.
bool GattCharacteristicRemote::isNotifying() const
Returns whether the characteristic is notifying.
Note: Getter function for property notifying.
bool GattCharacteristicRemote::isWriteAcquired() const
Returns whether writeAcquired() is true
for the characteristic.
Note: Getter function for property writeAcquired.
[signal]
void GattCharacteristicRemote::notifyAcquiredChanged(bool notifyAcquired)
Indicates that the characteristic's notifyAcquired state has changed.
Note: Notifier signal for property notifyAcquired.
[signal]
void GattCharacteristicRemote::notifyingChanged(bool notifying)
Indicates that the characteristic's notifying state has changed.
Note: Notifier signal for property notifying.
[slot]
BluezQt::PendingCall *GattCharacteristicRemote::readValue(const QVariantMap &options)
Read the value of the GATT characteristic.
Issues a request to read the value of the characteristic and returns the value if the operation was successful.
Possible errors:
Returns QByteArray pending call.
BluezQt::GattServiceRemotePtr GattCharacteristicRemote::service() const
Returns a service that owns that characteristic.
Note: Getter function for property service.
BluezQt::PendingCall *GattCharacteristicRemote::setHandle(quint16 handle)
Sets the characteristic's handle.
Returns void pending call.
See also handle().
[slot]
BluezQt::PendingCall *GattCharacteristicRemote::startNotify()
Start notifying the value of the GATT characteristic.
Starts a notification session from this characteristic if it supports value notifications or indications.
Possible errors:
Returns void pending call.
[slot]
BluezQt::PendingCall *GattCharacteristicRemote::stopNotify()
Stop notifying the value of the GATT characteristic.
This method will cancel any previous StartNotify transaction. Note that notifications from a characteristic are shared between sessions thus calling StopNotify will release a single session.
Possible errors:
Returns void pending call.
BluezQt::GattCharacteristicRemotePtr GattCharacteristicRemote::toSharedPtr() const
Returns a shared pointer from this.
QString GattCharacteristicRemote::ubi() const
Returns the UBI of the GATT characteristic.
Example UBI: "/org/bluez/hci0/dev_40_79_6A_0C_39_75"
Note: Getter function for property ubi.
QString GattCharacteristicRemote::uuid() const
Returns the UUID of the characteristic.
Note: Getter function for property uuid.
[signal]
void GattCharacteristicRemote::uuidChanged(const QString &uuid)
Indicates that the characteristic's uuid has changed.
Note: Notifier signal for property uuid.
QByteArray GattCharacteristicRemote::value() const
Returns the value of the characteristic.
Note: Getter function for property value.
[signal]
void GattCharacteristicRemote::valueChanged(const QByteArray value)
Indicates that the characteristic's value has changed.
Note: Notifier signal for property value.
[signal]
void GattCharacteristicRemote::writeAcquiredChanged(bool writeAcquired)
Indicates that the characteristic's writeAcquired state has changed.
Note: Notifier signal for property writeAcquired.
[slot]
BluezQt::PendingCall *GattCharacteristicRemote::writeValue(const QByteArray &value, const QVariantMap &options)
Write the value of the GATT characteristic.
Issues a request to write the value of the characteristic.
Possible errors:
Returns void pending call.