BluezQt 5.109.0
Properties | Signals | Public Slots | Public Member Functions | List of all members
BluezQt::GattCharacteristicRemote

Bluetooth LE GATT characteristic. More...

#include <BluezQt/GattCharacteristicRemote>

Properties

QList< GattDescriptorRemotePtr > descriptors
 
QStringList flags
 
quint16 handle
 
quint16 MTU
 
bool notifyAcquired
 
bool notifying
 
GattServiceRemotePtr service
 
QString ubi
 
QString uuid
 
QByteArray value
 
bool writeAcquired
 

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

PendingCallconfirm ()
 Confirmation that value of the characteristic was received.
 
PendingCallreadValue (const QVariantMap &options)
 Read the value of the GATT characteristic.
 
PendingCallstartNotify ()
 Start notifying the value of the GATT characteristic.
 
PendingCallstopNotify ()
 Stop notifying the value of the GATT characteristic.
 
PendingCallwriteValue (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.
 
PendingCallsetHandle (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.
 

Detailed Description

Bluetooth LE GATT characteristic.

This class represents a Bluetooth LE GATT characteristic for the clients.

Constructor & Destructor Documentation

◆ ~GattCharacteristicRemote()

BluezQt::GattCharacteristicRemote::~GattCharacteristicRemote ( )
override

Destroys a GattCharacteristic object.

Member Function Documentation

◆ characteristicChanged

void BluezQt::GattCharacteristicRemote::characteristicChanged ( GattCharacteristicRemotePtr  characteristic)
signal

Indicates that at least one of the characteristic's properties have changed.

◆ confirm

PendingCall * BluezQt::GattCharacteristicRemote::confirm ( )
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

Returns
void pending call

◆ descriptors()

QList< GattDescriptorRemotePtr > BluezQt::GattCharacteristicRemote::descriptors ( ) const

Returns object paths representing the included services of this service.

Returns
Object paths of included services

◆ descriptorsChanged

void BluezQt::GattCharacteristicRemote::descriptorsChanged ( QList< GattDescriptorRemotePtr >  descriptors)
signal

Indicates that characteristic descriptors list has changed.

◆ flags()

QStringList BluezQt::GattCharacteristicRemote::flags ( ) const

Returns flags the characteristic.

Returns
flags of characteristic

◆ flagsChanged

void BluezQt::GattCharacteristicRemote::flagsChanged ( QStringList  flags)
signal

Indicates that characteristic's flags have changed.

◆ gattDescriptorAdded

void BluezQt::GattCharacteristicRemote::gattDescriptorAdded ( GattDescriptorRemotePtr  descriptor)
signal

Indicates that a new descriptor was added (eg.

found by connection).

◆ gattDescriptorChanged

void BluezQt::GattCharacteristicRemote::gattDescriptorChanged ( GattDescriptorRemotePtr  descriptor)
signal

Indicates that at least one of the descriptor's properties have changed.

◆ gattDescriptorRemoved

void BluezQt::GattCharacteristicRemote::gattDescriptorRemoved ( GattDescriptorRemotePtr  descriptor)
signal

Indicates that a descriptor was removed.

◆ handle()

quint16 BluezQt::GattCharacteristicRemote::handle ( ) const

Returns characteristic handle.

Returns
qint16 characteristic handle

◆ handleChanged

void BluezQt::GattCharacteristicRemote::handleChanged ( quint16  handle)
signal

Indicates that characteristic's handle have changed.

◆ isNotifyAcquired()

bool BluezQt::GattCharacteristicRemote::isNotifyAcquired ( ) const

Returns whether notifyAcquired for the characteristic.

Returns
true if notify is acquired

◆ isNotifying()

bool BluezQt::GattCharacteristicRemote::isNotifying ( ) const

Returns whether the characteristic is notifying.

Returns
true if notifying

◆ isWriteAcquired()

bool BluezQt::GattCharacteristicRemote::isWriteAcquired ( ) const

Returns whether writeAcquired for the characteristic.

Returns
true if write is acquired

◆ MTU()

quint16 BluezQt::GattCharacteristicRemote::MTU ( ) const

Returns characteristic MTU.

Returns
qint16 characteristic MTU

◆ MTUChanged

void BluezQt::GattCharacteristicRemote::MTUChanged ( quint16  MTU)
signal

Indicates that characteristic's MTU have changed.

◆ notifyAcquiredChanged

void BluezQt::GattCharacteristicRemote::notifyAcquiredChanged ( bool  notifyAcquired)
signal

Indicates that characteristic's notifyAcquired state have changed.

◆ notifyingChanged

void BluezQt::GattCharacteristicRemote::notifyingChanged ( bool  notifying)
signal

Indicates that characteristic's notifying state have changed.

◆ readValue

PendingCall * BluezQt::GattCharacteristicRemote::readValue ( const QVariantMap &  options)
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

Returns
QByteArray pending call

◆ service()

GattServiceRemotePtr BluezQt::GattCharacteristicRemote::service ( ) const

Returns a service that owns that characteristic.

Returns
service of characteristic

◆ setHandle()

PendingCall * BluezQt::GattCharacteristicRemote::setHandle ( quint16  handle)

Sets the characteristic handle.

Parameters
handlecharacteristic handle
Returns
void pending call

◆ startNotify

PendingCall * BluezQt::GattCharacteristicRemote::startNotify ( )
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

Returns
void pending call

◆ stopNotify

PendingCall * BluezQt::GattCharacteristicRemote::stopNotify ( )
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

Returns
void pending call

◆ toSharedPtr()

GattCharacteristicRemotePtr BluezQt::GattCharacteristicRemote::toSharedPtr ( ) const

Returns a shared pointer from this.

Returns
DevicePtr

◆ ubi()

QString BluezQt::GattCharacteristicRemote::ubi ( ) const

Returns an UBI of the GATT characteristic.

Example UBI: "/org/bluez/hci0/dev_40_79_6A_0C_39_75"

Returns
UBI of device

◆ uuid()

QString BluezQt::GattCharacteristicRemote::uuid ( ) const

Returns an uuid of the characteristic.

Returns
uuid of the characteristic

◆ uuidChanged

void BluezQt::GattCharacteristicRemote::uuidChanged ( const QString &  uuid)
signal

Indicates that characteristic's uuid have changed.

◆ value()

QByteArray BluezQt::GattCharacteristicRemote::value ( ) const

Returns an value of the characteristic.

Returns
value of the characteristic

◆ valueChanged

void BluezQt::GattCharacteristicRemote::valueChanged ( const QByteArray  value)
signal

Indicates that characteristic's value have changed.

◆ writeAcquiredChanged

void BluezQt::GattCharacteristicRemote::writeAcquiredChanged ( bool  writeAcquired)
signal

Indicates that characteristic's writeAcquired state have changed.

◆ writeValue

PendingCall * BluezQt::GattCharacteristicRemote::writeValue ( const QByteArray &  value,
const QVariantMap &  options 
)
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

Returns
void pending call