enum class field access

This commit is contained in:
2025-02-18 19:33:02 +01:00
parent e16ad84865
commit 66835554f1
5 changed files with 20 additions and 8 deletions

View File

@@ -4,9 +4,8 @@
#include <sp/protocol/Field.h>
#include <sp/protocol/MessageBase.h>
enum KeepAlivePacketFields {
enum class KeepAliveFieldsE {
KeepAliveId = 0,
TestAlignField = 1,
};
using KeepAliveFields = std::tuple<
@@ -18,6 +17,6 @@ DeclarePacket(KeepAlive){
PacketConstructor(KeepAlive)
std::uint64_t GetKeepAliveId() const {
return GetField<KeepAlive>();
return GetField<KeepAliveFieldsE, KeepAliveFieldsE::KeepAliveId>();
}
};