This commit is contained in:
2025-02-08 20:11:02 +01:00
parent ee865021c2
commit 0b28bde25b
2 changed files with 11 additions and 3 deletions

View File

@@ -5,9 +5,16 @@
#include <sp/protocol/MessageBase.h>
enum KeepAlivePacketFields {
KeepAliveId = 0
KeepAliveId = 0,
TestAlignField = 1,
};
using KeepAliveFields = std::tuple<std::uint64_t /*KeepAliveId*/>;
using KeepAliveFields = std::tuple<
std::uint64_t, //<- KeepAliveId
sp::BitField<std::uint16_t,
sp::Field<std::uint16_t, 12>, //<- m_Tower
sp::Field<std::uint8_t, 4> //<- m_Upgrade
>
>;
DeclarePacket(KeepAlive);

View File

@@ -14,7 +14,8 @@ class KeepAliveHandler : public sp::PacketHandler {
};
int main() {
auto keepAlive = std::make_unique<KeepAlivePacket>(69);
auto keepAlive = std::make_unique<KeepAlivePacket>(69, std::make_tuple(666, 9));
sp::PacketMessage* msg = keepAlive.get();
KeepAliveHandler handler;