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:
h2zero committed 2020-05-29 18:26:41 -06:00
1 parent 5667c97efe
commit 10f544f80a
7 files changed
+37 -6

No files matched your search

+3 -1
View File
@@ -55,7 +55,8 @@ public:
uint8_t* getPayload();
size_t getPayloadLength();
uint8_t getAddressType();
void setAddressType(uint8_t type);
time_t getTimestamp();
void setAddressType(uint8_t type);
bool isAdvertisingService(const NimBLEUUID &uuid);
@@ -111,6 +112,7 @@ private:
uint8_t* m_payload;
size_t m_payloadLength = 0;
uint8_t m_addressType;
time_t m_timestamp;
};
/**