fix alignment + refactor
Reviewed-on: #1 Co-authored-by: Persson-dev <sim16.prib@gmail.com> Co-committed-by: Persson-dev <sim16.prib@gmail.com>
This commit was merged in pull request #1.
This commit is contained in:
@@ -4,10 +4,19 @@
|
||||
#include <sp/protocol/Field.h>
|
||||
#include <sp/protocol/MessageBase.h>
|
||||
|
||||
enum KeepAlivePacketFields {
|
||||
KeepAliveId = 0
|
||||
enum class KeepAliveFieldsE {
|
||||
KeepAliveId = 0,
|
||||
};
|
||||
|
||||
using KeepAliveFields = std::tuple<std::uint64_t /*KeepAliveId*/>;
|
||||
using KeepAliveFields = std::tuple<
|
||||
std::uint64_t //<- KeepAliveId
|
||||
>;
|
||||
|
||||
DeclarePacket(KeepAlive);
|
||||
DeclarePacket(KeepAlive){
|
||||
public:
|
||||
PacketConstructor(KeepAlive)
|
||||
|
||||
std::uint64_t GetKeepAliveId() const {
|
||||
return GetField<KeepAliveFieldsE, KeepAliveFieldsE::KeepAliveId>();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user