From a4e900fb65e2c30312c498f32662c0145d73bbff Mon Sep 17 00:00:00 2001 From: Niklas Jensen Date: Sat, 24 Jan 2026 14:31:47 +0100 Subject: [PATCH] Expanded comments to made endpoint and persistance easier to understand --- esp32/include/template/stateful_persistence_pb.h | 3 ++- esp32/include/template/stateful_proto_endpoint.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/esp32/include/template/stateful_persistence_pb.h b/esp32/include/template/stateful_persistence_pb.h index e5bbde1..ce07c35 100644 --- a/esp32/include/template/stateful_persistence_pb.h +++ b/esp32/include/template/stateful_persistence_pb.h @@ -15,8 +15,9 @@ template class FSPersistencePB { public: + // Formats are passed as referenced const (local variable) we want to read from, and a reference (proto) we write to using ProtoStateReader = std::function; - // Formats are passed as referenced const (new object), and a reference to local variable we either want to read from or write to + // Formats are passed as referenced const (new object) we read from, and a reference to the local variable we write to using ProtoStateUpdater = std::function; FSPersistencePB(ProtoStateReader stateReader, ProtoStateUpdater stateUpdater, diff --git a/esp32/include/template/stateful_proto_endpoint.h b/esp32/include/template/stateful_proto_endpoint.h index 20e697f..7262e55 100644 --- a/esp32/include/template/stateful_proto_endpoint.h +++ b/esp32/include/template/stateful_proto_endpoint.h @@ -24,8 +24,10 @@ template class StatefulProtoEndpoint { public: /** Converts internal state to protobuf message for responses */ + // Formats are passed as referenced const (local variable) we want to read from, and a reference (proto) we write to using ProtoStateReader = std::function; /** Converts incoming protobuf message to internal state */ + // Formats are passed as referenced const (new object) we read from, and a reference to the local variable we write to using ProtoStateUpdater = std::function; /** Extracts the specific proto type from Request oneof */ using RequestExtractor = std::function;