Commit 16dbe1ad authored by aligungr's avatar aligungr

RLS developments

parent fb77d5bc
......@@ -13,6 +13,12 @@
static constexpr const size_t MAX_PDU_COUNT = 4096;
static constexpr const int MAX_PDU_TTL = 3000;
static constexpr const int TIMER_ID_ACK_CONTROL = 1;
static constexpr const int TIMER_ID_ACK_SEND = 2;
static constexpr const int TIMER_PERIOD_ACK_CONTROL = 1500;
static constexpr const int TIMER_PERIOD_ACK_SEND = 2250;
namespace nr::gnb
{
......@@ -28,6 +34,8 @@ void RlsControlTask::initialize(RlsUdpTask *udpTask)
void RlsControlTask::onStart()
{
setTimer(TIMER_ID_ACK_CONTROL, TIMER_PERIOD_ACK_CONTROL);
setTimer(TIMER_ID_ACK_SEND, TIMER_PERIOD_ACK_SEND);
}
void RlsControlTask::onLoop()
......@@ -63,6 +71,20 @@ void RlsControlTask::onLoop()
}
break;
}
case NtsMessageType::TIMER_EXPIRED: {
auto *w = dynamic_cast<NwTimerExpired *>(msg);
if (w->timerId == TIMER_ID_ACK_CONTROL)
{
setTimer(TIMER_ID_ACK_CONTROL, TIMER_PERIOD_ACK_CONTROL);
onAckControlTimerExpired();
}
else if (w->timerId == TIMER_ID_ACK_SEND)
{
setTimer(TIMER_ID_ACK_SEND, TIMER_PERIOD_ACK_SEND);
onAckSendTimerExpired();
}
break;
}
default:
m_logger->unhandledNts(msg);
break;
......
......@@ -44,6 +44,8 @@ class RlsControlTask : public NtsTask
void handleRlsMessage(int ueId, rls::RlsMessage &msg);
void handleDownlinkRrcDelivery(int ueId, uint32_t pduId, rrc::RrcChannel channel, OctetString &&data);
void handleDownlinkDataDelivery(int ueId, int psi, OctetString &&data);
void onAckControlTimerExpired();
void onAckSendTimerExpired();
};
} // namespace nr::gnb
\ No newline at end of file
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