Commit e909991e authored by aligungr's avatar aligungr

RLS improvements

parent 45996520
...@@ -105,7 +105,7 @@ void RlsControlTask::handleRlsMessage(int cellId, rls::RlsMessage &msg) ...@@ -105,7 +105,7 @@ void RlsControlTask::handleRlsMessage(int cellId, rls::RlsMessage &msg)
{ {
auto &m = (rls::RlsPduTransmission &)msg; auto &m = (rls::RlsPduTransmission &)msg;
if (m.pduId != 0) if (m.pduId != 0)
m_pendingAck[m.pduId] = cellId; m_pendingAck[cellId].push_back(m.pduId);
if (m.pduType == rls::EPduType::DATA) if (m.pduType == rls::EPduType::DATA)
{ {
...@@ -191,14 +191,10 @@ void RlsControlTask::onAckControlTimerExpired() ...@@ -191,14 +191,10 @@ void RlsControlTask::onAckControlTimerExpired()
void RlsControlTask::onAckSendTimerExpired() void RlsControlTask::onAckSendTimerExpired()
{ {
std::unordered_map<int, std::vector<uint32_t>> ackData; auto copy = m_pendingAck;
for (auto &pendingAck : m_pendingAck)
ackData[pendingAck.second].push_back(pendingAck.first);
m_pendingAck.clear(); m_pendingAck.clear();
for (auto &item : ackData) for (auto &item : copy)
{ {
rls::RlsPduTransmissionAck msg{m_sti}; rls::RlsPduTransmissionAck msg{m_sti};
msg.pduIds = std::move(item.second); msg.pduIds = std::move(item.second);
......
...@@ -36,7 +36,7 @@ class RlsControlTask : public NtsTask ...@@ -36,7 +36,7 @@ class RlsControlTask : public NtsTask
RlsUdpTask *m_udpTask; RlsUdpTask *m_udpTask;
std::unordered_map<uint32_t, PduInfo> m_pduMap; std::unordered_map<uint32_t, PduInfo> m_pduMap;
uint64_t m_sti; uint64_t m_sti;
std::unordered_map<uint32_t, int> m_pendingAck; std::unordered_map<int, std::vector<uint32_t>> m_pendingAck;
public: public:
explicit RlsControlTask(TaskBase *base, uint64_t sti); explicit RlsControlTask(TaskBase *base, uint64_t 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