diff options
author | kolban <kolban1@kolban.com> | 2017-10-13 10:52:17 -0500 |
---|---|---|
committer | kolban <kolban1@kolban.com> | 2017-10-13 10:52:17 -0500 |
commit | 34902f4e7fc6926a005a5ccfd4e530d6a6321613 (patch) | |
tree | 512593068ed656012ee31fced9526bff80ecad55 /src/BLEValue.cpp | |
parent | Merge pull request #5 from sebastiankliem/master (diff) | |
download | thermostat-34902f4e7fc6926a005a5ccfd4e530d6a6321613.tar.gz thermostat-34902f4e7fc6926a005a5ccfd4e530d6a6321613.tar.bz2 thermostat-34902f4e7fc6926a005a5ccfd4e530d6a6321613.zip |
Sync update for 0.4.3 take 2
Diffstat (limited to 'src/BLEValue.cpp')
-rw-r--r-- | src/BLEValue.cpp | 23 |
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 |