BluezQt 5.109.0
|
Bluetooth LE GATT characteristic. More...
#include <BluezQt/GattCharacteristicRemote>
Signals | |
void | characteristicChanged (GattCharacteristicRemotePtr characteristic) |
Indicates that at least one of the characteristic's properties have changed. | |
void | descriptorsChanged (QList< GattDescriptorRemotePtr > descriptors) |
Indicates that characteristic descriptors list has changed. | |
void | flagsChanged (QStringList flags) |
Indicates that characteristic's flags have changed. | |
void | gattDescriptorAdded (GattDescriptorRemotePtr descriptor) |
Indicates that a new descriptor was added (eg. | |
void | gattDescriptorChanged (GattDescriptorRemotePtr descriptor) |
Indicates that at least one of the descriptor's properties have changed. | |
void | gattDescriptorRemoved (GattDescriptorRemotePtr descriptor) |
Indicates that a descriptor was removed. | |
void | handleChanged (quint16 handle) |
Indicates that characteristic's handle have changed. | |
void | MTUChanged (quint16 MTU) |
Indicates that characteristic's MTU have changed. | |
void | notifyAcquiredChanged (bool notifyAcquired) |
Indicates that characteristic's notifyAcquired state have changed. | |
void | notifyingChanged (bool notifying) |
Indicates that characteristic's notifying state have changed. | |
void | uuidChanged (const QString &uuid) |
Indicates that characteristic's uuid have changed. | |
void | valueChanged (const QByteArray value) |
Indicates that characteristic's value have changed. | |
void | writeAcquiredChanged (bool writeAcquired) |
Indicates that characteristic's writeAcquired state have changed. | |
Public Slots | |
PendingCall * | confirm () |
Confirmation that value of the characteristic was received. | |
PendingCall * | readValue (const QVariantMap &options) |
Read the value of the GATT characteristic. | |
PendingCall * | startNotify () |
Start notifying the value of the GATT characteristic. | |
PendingCall * | stopNotify () |
Stop notifying the value of the GATT characteristic. | |
PendingCall * | writeValue (const QByteArray &value, const QVariantMap &options) |
Write the value of the GATT characteristic. | |
Public Member Functions | |
~GattCharacteristicRemote () override | |
Destroys a GattCharacteristic object. | |
QList< GattDescriptorRemotePtr > | descriptors () const |
Returns object paths representing the included services of this service. | |
QStringList | flags () const |
Returns flags the characteristic. | |
quint16 | handle () const |
Returns characteristic handle. | |
bool | isNotifyAcquired () const |
Returns whether notifyAcquired for the characteristic. | |
bool | isNotifying () const |
Returns whether the characteristic is notifying. | |
bool | isWriteAcquired () const |
Returns whether writeAcquired for the characteristic. | |
quint16 | MTU () const |
Returns characteristic MTU. | |
GattServiceRemotePtr | service () const |
Returns a service that owns that characteristic. | |
PendingCall * | setHandle (quint16 handle) |
Sets the characteristic handle. | |
GattCharacteristicRemotePtr | toSharedPtr () const |
Returns a shared pointer from this. | |
QString | ubi () const |
Returns an UBI of the GATT characteristic. | |
QString | uuid () const |
Returns an uuid of the characteristic. | |
QByteArray | value () const |
Returns an value of the characteristic. | |
Bluetooth LE GATT characteristic.
This class represents a Bluetooth LE GATT characteristic for the clients.
|
override |
Destroys a GattCharacteristic object.
|
signal |
Indicates that at least one of the characteristic's properties have changed.
|
slot |
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: PendingCall::NotReady, PendingCall::Failed, PendingCall::InProgress, PendingCall::AlreadyConnected
QList< GattDescriptorRemotePtr > BluezQt::GattCharacteristicRemote::descriptors | ( | ) | const |
Returns object paths representing the included services of this service.
|
signal |
Indicates that characteristic descriptors list has changed.
QStringList BluezQt::GattCharacteristicRemote::flags | ( | ) | const |
Returns flags the characteristic.
|
signal |
Indicates that characteristic's flags have changed.
|
signal |
Indicates that a new descriptor was added (eg.
found by connection).
|
signal |
Indicates that at least one of the descriptor's properties have changed.
|
signal |
Indicates that a descriptor was removed.
quint16 BluezQt::GattCharacteristicRemote::handle | ( | ) | const |
Returns characteristic handle.
|
signal |
Indicates that characteristic's handle have changed.
bool BluezQt::GattCharacteristicRemote::isNotifyAcquired | ( | ) | const |
Returns whether notifyAcquired for the characteristic.
bool BluezQt::GattCharacteristicRemote::isNotifying | ( | ) | const |
Returns whether the characteristic is notifying.
bool BluezQt::GattCharacteristicRemote::isWriteAcquired | ( | ) | const |
Returns whether writeAcquired for the characteristic.
quint16 BluezQt::GattCharacteristicRemote::MTU | ( | ) | const |
Returns characteristic MTU.
|
signal |
Indicates that characteristic's MTU have changed.
|
signal |
Indicates that characteristic's notifyAcquired state have changed.
|
signal |
Indicates that characteristic's notifying state have changed.
|
slot |
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: PendingCall::NotReady, PendingCall::Failed, PendingCall::InProgress, PendingCall::AlreadyConnected
GattServiceRemotePtr BluezQt::GattCharacteristicRemote::service | ( | ) | const |
Returns a service that owns that characteristic.
PendingCall * BluezQt::GattCharacteristicRemote::setHandle | ( | quint16 | handle | ) |
Sets the characteristic handle.
handle | characteristic handle |
|
slot |
Start notifying the value of the GATT characteristic.
Starts a notification session from this characteristic if it supports value notifications or indications.
Possible errors: PendingCall::NotReady, PendingCall::Failed, PendingCall::InProgress, PendingCall::AlreadyConnected
|
slot |
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: PendingCall::NotReady, PendingCall::Failed, PendingCall::InProgress, PendingCall::AlreadyConnected
GattCharacteristicRemotePtr BluezQt::GattCharacteristicRemote::toSharedPtr | ( | ) | const |
Returns a shared pointer from this.
QString BluezQt::GattCharacteristicRemote::ubi | ( | ) | const |
Returns an UBI of the GATT characteristic.
Example UBI: "/org/bluez/hci0/dev_40_79_6A_0C_39_75"
QString BluezQt::GattCharacteristicRemote::uuid | ( | ) | const |
Returns an uuid of the characteristic.
|
signal |
Indicates that characteristic's uuid have changed.
QByteArray BluezQt::GattCharacteristicRemote::value | ( | ) | const |
Returns an value of the characteristic.
|
signal |
Indicates that characteristic's value have changed.
|
signal |
Indicates that characteristic's writeAcquired state have changed.
|
slot |
Write the value of the GATT characteristic.
Issues a request to write the value of the characteristic.
Possible errors: PendingCall::NotReady, PendingCall::Failed, PendingCall::InProgress, PendingCall::AlreadyConnected