Commit a707dff4 authored by aligungr's avatar aligungr

RLS improvements

parent 557b47e6
...@@ -79,6 +79,18 @@ void EncodeRlsMessage(const RlsMessage &msg, OctetString &stream) ...@@ -79,6 +79,18 @@ void EncodeRlsMessage(const RlsMessage &msg, OctetString &stream)
stream.appendOctet4(m.payload.length()); stream.appendOctet4(m.payload.length());
stream.append(m.payload); stream.append(m.payload);
} }
else if (msg.msgType == EMessageType::HEARTBEAT)
{
auto &m = (const RlsHeartBeat &)msg;
stream.appendOctet4(m.simPos.x);
stream.appendOctet4(m.simPos.y);
stream.appendOctet4(m.simPos.z);
}
else if (msg.msgType == EMessageType::HEARTBEAT_ACK)
{
auto &m = (const RlsHeartBeatAck &)msg;
stream.appendOctet4(m.dbm);
}
} }
std::unique_ptr<RlsMessage> DecodeRlsMessage(const OctetView &stream) std::unique_ptr<RlsMessage> DecodeRlsMessage(const OctetView &stream)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment