summaryrefslogtreecommitdiff
path: root/src/BLEValue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/BLEValue.cpp')
-rw-r--r--src/BLEValue.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/BLEValue.cpp b/src/BLEValue.cpp
index 1989993..d36d207 100644
--- a/src/BLEValue.cpp
+++ b/src/BLEValue.cpp
@@ -72,6 +72,24 @@ void BLEValue::commit() {
/**
+ * @brief Get a pointer to the data.
+ * @return A pointer to the data.
+ */
+uint8_t* BLEValue::getData() {
+ return (uint8_t*)m_value.data();
+}
+
+
+/**
+ * @brief Get the length of the data in bytes.
+ * @return The length of the data in bytes.
+ */
+size_t BLEValue::getLength() {
+ return m_value.length();
+} // getLength
+
+
+/**
* @brief Get the read offset.
* @return The read offset into the read.
*/
@@ -113,4 +131,9 @@ void BLEValue::setValue(std::string value) {
void BLEValue::setValue(uint8_t* pData, size_t length) {
m_value = std::string((char*)pData, length);
} // setValue
+
+
+
+
+
#endif // CONFIG_BT_ENABLED