21#include <wpi/struct/Struct.h>
43 static constexpr std::string_view
GetTypeName() {
return "TspPing"; }
44 static constexpr size_t GetSize() {
return 10; }
46 return "uint8 version;uint8 message_id;uint64 client_time";
51 wpi::UnpackStruct<uint8_t, 0>(data),
52 wpi::UnpackStruct<uint8_t, 1>(data),
53 wpi::UnpackStruct<uint64_t, 2>(data),
57 wpi::PackStruct<0>(data, value.
version);
65 static constexpr std::string_view
GetTypeName() {
return "TspPong"; }
66 static constexpr size_t GetSize() {
return 18; }
68 return "uint8 version;uint8 message_id;uint64 client_time;uint64_t "
75 wpi::UnpackStruct<uint8_t, 0>(data),
76 wpi::UnpackStruct<uint8_t, 1>(data),
77 wpi::UnpackStruct<uint64_t, 2>(data),
79 wpi::UnpackStruct<uint64_t, 10>(data),
83 wpi::PackStruct<0>(data, value.
version);
90static_assert(wpi::StructSerializable<wpi::tsp::TspPong>);
91static_assert(wpi::StructSerializable<wpi::tsp::TspPing>);
Definition TimeSyncServer.h:45
static constexpr std::string_view GetSchema()
Definition TimeSyncStructs.h:45
static constexpr size_t GetSize()
Definition TimeSyncStructs.h:44
static constexpr std::string_view GetTypeName()
Definition TimeSyncStructs.h:43
static void Pack(std::span< uint8_t > data, const wpi::tsp::TspPing &value)
Definition TimeSyncStructs.h:56
static wpi::tsp::TspPing Unpack(std::span< const uint8_t > data)
Definition TimeSyncStructs.h:49
static constexpr std::string_view GetTypeName()
Definition TimeSyncStructs.h:65
static constexpr size_t GetSize()
Definition TimeSyncStructs.h:66
static void Pack(std::span< uint8_t > data, const wpi::tsp::TspPong &value)
Definition TimeSyncStructs.h:82
static wpi::tsp::TspPong Unpack(std::span< const uint8_t > data)
Definition TimeSyncStructs.h:72
static constexpr std::string_view GetSchema()
Definition TimeSyncStructs.h:67
Definition TimeSyncStructs.h:26
uint8_t version
Definition TimeSyncStructs.h:27
uint8_t message_id
Definition TimeSyncStructs.h:28
uint64_t client_time
Definition TimeSyncStructs.h:29
Definition TimeSyncStructs.h:32
TspPong(TspPing ping, uint64_t servertime)
Definition TimeSyncStructs.h:33
uint64_t server_time
Definition TimeSyncStructs.h:35