forked from h2zero/esp-nimble-cpp
Update remote characteristic value from a notification
* Add NimBLERemoteCharacteristic::getValue(time_t *timestamp = nullptr) to get the latest remote characteristic and (optionally) it's timestamp. * Added a timestamp to NimBLEAdvertisedDevice for the moment a device was scanned
This commit is contained in:
1 parent
5667c97efe
commit
10f544f80a
7 files changed
+37
-6
No files matched your search
@@ -57,6 +57,7 @@ public:
|
||||
uint8_t readUInt8();
|
||||
uint16_t readUInt16();
|
||||
uint32_t readUInt32();
|
||||
std::string getValue(time_t *timestamp = nullptr);
|
||||
bool registerForNotify(notify_callback _callback,
|
||||
bool notifications = true,
|
||||
bool response = true);
|
||||
@@ -105,6 +106,7 @@ private:
|
||||
uint8_t* m_rawData;
|
||||
size_t m_dataLen;
|
||||
notify_callback m_notifyCallback;
|
||||
time_t m_timestamp;
|
||||
|
||||
// We maintain a vector of descriptors owned by this characteristic.
|
||||
std::vector<NimBLERemoteDescriptor*> m_descriptorVector;
|
||||
|
||||
Reference in new issue
Block a user