forked from h2zero/esp-nimble-cpp
Remove getRawData() and getDataLength()
Previously getRawData() made an unnecessary copy of the remote characteristic value data in order to return a uint8_t*. The resources used for this was unjustified by the value it provided as templates to retrieve such data have been added. Also the application writer could cast the std::string result of readValue() and/or getValue() however they choose using the data() method on the container if desired. getDataLength() is also an unnecessary function as the length can be retrieved by the returned std::string from readValue() and/or getValue() with the length() method.
This commit is contained in:
1 parent
99ad62cdd4
commit
ffcb325aea
2 files changed
+1
-39
No files matched your search
@@ -87,8 +87,6 @@ public:
|
||||
bool writeValue(uint8_t newValue,
|
||||
bool response = false);
|
||||
std::string toString();
|
||||
uint8_t* readRawData();
|
||||
size_t getDataLength();
|
||||
NimBLERemoteService* getRemoteService();
|
||||
|
||||
private:
|
||||
@@ -121,8 +119,6 @@ private:
|
||||
FreeRTOS::Semaphore m_semaphoreReadCharEvt = FreeRTOS::Semaphore("ReadCharEvt");
|
||||
FreeRTOS::Semaphore m_semaphoreWriteCharEvt = FreeRTOS::Semaphore("WriteCharEvt");
|
||||
std::string m_value;
|
||||
uint8_t* m_rawData;
|
||||
size_t m_dataLen;
|
||||
notify_callback m_notifyCallback;
|
||||
time_t m_timestamp;
|
||||
|
||||
|
||||
Reference in new issue
Block a user