Pages
API Documentation
On this page

BluezQt::GattCharacteristic Class

Qt wrapper for BlueZ 5 DBus API. More...

  • Header: #include <BluezQt/GattCharacteristic>
  • CMake: find_package(KF6 REQUIRED COMPONENTS BluezQt)
    target_link_libraries(mytarget PRIVATE KF6::BluezQt)
  • Inherits: QObject

List of all members, including inherited members

Public Types

Public Functions

Signals

Protected Functions

Detailed Description

Member Type Documentation

[alias] GattCharacteristic::ReadCallback

Member Function Documentation

[explicit] GattCharacteristic::GattCharacteristic(const QString &uuid, BluezQt::GattService *service)

Creates a new GattCharacteristic object with the given uuid and a parent service.

This constructor creates a characteristic with the Read and Write flags set.

[since 6.0] GattCharacteristic::GattCharacteristic(const QString &uuid, const QStringList &flags, BluezQt::GattService *service)

Creates a new GattCharacteristic object with the given uuid and a parent service.

The flags can be used to indicate the characteristic usage.

This function was introduced in Qt 6.0.

[since 6.0] QStringList GattCharacteristic::flags() const

Returns flags associated with this characteristic.

This function was introduced in Qt 6.0.

[since 6.0] bool GattCharacteristic::isNotifying() const

Indicates if this characteristic currently has notifications enabled.

This function was introduced in Qt 6.0.

[virtual protected] QDBusObjectPath GattCharacteristic::objectPath() const

Returns the D-Bus object path of the GattCharacteristic.

The path where the GattCharacteristic will be registered.

Note: You must provide valid object path!

QByteArray GattCharacteristic::readValue()

Reads the value of the characteristic.

const BluezQt::GattService *GattCharacteristic::service() const

The GATT service the characteristic belongs to.

void GattCharacteristic::setReadCallback(BluezQt::GattCharacteristic::ReadCallback callback)

Provide a read callback to operate in pull mode.

[since 6.0] void GattCharacteristic::startNotify()

Enables notifications for this characteristic, if supported. Does nothing otherwise.

This function was introduced in Qt 6.0.

[since 6.0] void GattCharacteristic::stopNotify()

Disables notifications for this characteristic.

This function was introduced in Qt 6.0.

QString GattCharacteristic::uuid() const

Returns the 128-bit GATT characteristic UUID.

[signal] void GattCharacteristic::valueWritten(const QByteArray &value)

Indicates that a value was written.

void GattCharacteristic::writeValue(const QByteArray &value)

Writes the value of the characteristic.

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.