summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergycharacteristic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bluetooth/qlowenergycharacteristic.cpp')
-rw-r--r--src/bluetooth/qlowenergycharacteristic.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/bluetooth/qlowenergycharacteristic.cpp b/src/bluetooth/qlowenergycharacteristic.cpp
index aa1795c3..d1c1a14c 100644
--- a/src/bluetooth/qlowenergycharacteristic.cpp
+++ b/src/bluetooth/qlowenergycharacteristic.cpp
@@ -162,6 +162,8 @@ QLowEnergyCharacteristic::PropertyTypes QLowEnergyCharacteristic::properties() c
/*!
Returns value of the gatt characteristic.
+
+ The returned QByteArray contains the hex representation of the value.
*/
QByteArray QLowEnergyCharacteristic::value() const
{
@@ -186,17 +188,6 @@ QLowEnergyHandle QLowEnergyCharacteristic::handle() const
}
/*!
- Sets the value \a value of the characteristic. This only caches the value. To write
- a value directly to the device QLowEnergyController class must be used.
-
- \sa QLowEnergyController::writeCharacteristic()
-*/
-void QLowEnergyCharacteristic::setValue(const QByteArray &value)
-{
- //d_ptr->value = value;
-}
-
-/*!
Makes a copy of \a other and assigns it to this QLowEnergyCharacteristic object.
The two copies continue to share the same service and registration details.
*/
@@ -276,7 +267,13 @@ bool QLowEnergyCharacteristic::isValid() const
return true;
}
+QLowEnergyHandle QLowEnergyCharacteristic::attributeHandle() const
+{
+ if (d_ptr.isNull() || !data)
+ return 0;
+ return data->handle;
+}
/*!
Returns the list of characteristic descriptors.