Commit c8a6ae48 authored by aligungr's avatar aligungr

RLS improvements

parent a325feec
......@@ -91,6 +91,21 @@ void EncodeRlsMessage(const RlsMessage &msg, OctetString &stream)
auto &m = (const RlsHeartBeatAck &)msg;
stream.appendOctet4(m.dbm);
}
else if (msg.msgType == EMessageType::PDU_TRANSMISSION)
{
auto &m = (const RlsPduTransmission &)msg;
stream.appendOctet(static_cast<int8_t>(m.pduType));
stream.appendOctet4(m.pduId);
stream.appendOctet4(m.payload);
stream.append(m.pdu);
}
else if (msg.msgType == EMessageType::PDU_TRANSMISSION_ACK)
{
auto &m = (const RlsPduTransmissionAck &)msg;
stream.appendOctet4(static_cast<uint32_t>(m.pduIds.size()));
for (auto pduId : m.pduIds)
stream.appendOctet4(pduId);
}
}
std::unique_ptr<RlsMessage> DecodeRlsMessage(const OctetView &stream)
......
......@@ -105,9 +105,9 @@ struct RlsPduDelivery : RlsMessage
struct RlsPduTransmission : RlsMessage
{
EPduType pduType{};
OctetString pdu{};
uint32_t payload{};
uint32_t pduId{};
uint32_t payload{};
OctetString pdu{};
explicit RlsPduTransmission(uint64_t sti) : RlsMessage(EMessageType::PDU_TRANSMISSION, sti)
{
......@@ -116,7 +116,7 @@ struct RlsPduTransmission : RlsMessage
struct RlsPduTransmissionAck : RlsMessage
{
std::vector<uint32_t> sequences;
std::vector<uint32_t> pduIds;
explicit RlsPduTransmissionAck(uint64_t sti) : RlsMessage(EMessageType::PDU_TRANSMISSION_ACK, sti)
{
......
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