mirror of
https://github.com/ratspeak/microReticulum
synced 2026-11-27 13:52:14 +00:00
WIP: Initial implementation of persistence
Persistence implemented with the help of the ArduinoJson library using MessagePack format.
This commit is contained in:
1 parent
c39e9e7fee
commit
f9a679ffc2
20 files changed
+1031
-54
No files matched your search
@@ -554,3 +554,15 @@ void PacketReceipt::check_timeout() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ArduinoJson::convertFromJson(JsonVariantConst src, RNS::Packet& dst) {
|
||||
if (!src.isNull()) {
|
||||
RNS::Bytes hash;
|
||||
hash.assignHex(src.as<const char*>());
|
||||
// Query transport for matching interface
|
||||
dst = Transport::get_cached_packet(hash);
|
||||
}
|
||||
else {
|
||||
dst = {RNS::Type::NONE};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user