28 WriteBEInt8(static_cast<Int8>(255 * a_Angle / 360));
46 for (
auto val : a_UUID.
ToRaw())
134 return Printf(
"Unknown packet type: 0x%02x", a_PacketType);
void WriteBEInt8(Int8 a_Value)
void WriteFPInt(double a_Value)
Writes the double value as a 27:5 fixed-point integer.
void WriteUUID(const cUUID &a_UUID)
Writes the specified UUID as a 128-bit BigEndian integer.
static AString PacketTypeToStr(cProtocol::ePacketType a_PacketType)
Returns the human-readable representation of the packet type.
cProtocol & m_Protocol
The protocol instance in which the packet is being constructed.
void WriteBEInt32(Int32 a_Value)
~cPacketizer()
Sends the packet via the contained protocol's SendPacket() function.
cByteBuffer & m_Out
The protocol's buffer for the constructed packet data.
void WriteByteAngle(double a_Angle)
Writes the specified angle using a single byte.
AString & Printf(AString &str, const char *format, fmt::ArgList args)
Output the formatted text into the string.
bool WriteBEUInt8(UInt8 a_Value)
virtual void SendPacket(cPacketizer &a_Packet)=0
Sends a single packet contained within the cPacketizer class.
ePacketType
Logical types of outgoing packets.
std::array< Byte, 16 > ToRaw() const
Converts UUID to raw memory representation, respecting UUID variant.