Commit e1e36f76 authored by aligungr's avatar aligungr

RLS developments

parent 279e9150
......@@ -95,29 +95,47 @@ struct NwGnbRlsToRls : NtsMessage
SIGNAL_LOST,
RECEIVE_RLS_MESSAGE,
DOWNLINK_RRC,
DOWNLINK_DATA
DOWNLINK_DATA,
UPLINK_RRC,
UPLINK_DATA,
RADIO_LINK_FAILURE,
TRANSMISSION_FAILURE,
} present;
// SIGNAL_DETECTED
// SIGNAL_LOST
// DOWNLINK_RRC
// DOWNLINK_DATA
// UPLINK_DATA
// UPLINK_RRC
int ueId{};
// RECEIVE_RLS_MESSAGE
std::unique_ptr<rls::RlsMessage> msg{};
// DOWNLINK_DATA
// UPLINK_DATA
int psi{};
// DOWNLINK_DATA
// DOWNLINK_RRC
// UPLINK_DATA
// UPLINK_RRC
OctetString data;
// DOWNLINK_RRC
uint32_t pduId{};
// DOWNLINK_RRC
// UPLINK_RRC
rrc::RrcChannel rrcChannel{};
// RADIO_LINK_FAILURE
rls::ERlfCause rlfCause{};
// TRANSMISSION_FAILURE
std::vector<rls::PduInfo> pduList;
explicit NwGnbRlsToRls(PR present) : NtsMessage(NtsMessageType::GNB_RLS_TO_RLS), present(present)
{
}
......
......@@ -99,12 +99,16 @@ void RlsControlTask::onQuit()
void RlsControlTask::handleSignalDetected(int ueId)
{
// TODO: tranparently notify upper layer
auto *w = new NwGnbRlsToRls(NwGnbRlsToRls::SIGNAL_DETECTED);
w->ueId = ueId;
// TODO: push msg
}
void RlsControlTask::handleSignalLost(int ueId)
{
// TODO: tranparently notify upper layer
auto *w = new NwGnbRlsToRls(NwGnbRlsToRls::SIGNAL_LOST);
w->ueId = ueId;
// TODO: push msg
}
void RlsControlTask::handleRlsMessage(int ueId, rls::RlsMessage &msg)
......@@ -123,11 +127,19 @@ void RlsControlTask::handleRlsMessage(int ueId, rls::RlsMessage &msg)
if (m.pduType == rls::EPduType::DATA)
{
// TODO: send to the upper layer
auto *w = new NwGnbRlsToRls(NwGnbRlsToRls::UPLINK_DATA);
w->ueId = ueId;
w->psi = static_cast<int>(m.payload);
w->data = std::move(m.pdu);
// TODO push msg
}
else if (m.pduType == rls::EPduType::RRC)
{
// TODO: send to the upper layer
auto *w = new NwGnbRlsToRls(NwGnbRlsToRls::UPLINK_RRC);
w->ueId = ueId;
w->rrcChannel = static_cast<rrc::RrcChannel>(m.payload);
w->data = std::move(m.pdu);
// TODO push msg
}
else
{
......@@ -148,7 +160,9 @@ void RlsControlTask::handleDownlinkRrcDelivery(int ueId, uint32_t pduId, rrc::Rr
{
m_pduMap.clear();
// TODO: Send RLF
auto *w = new NwGnbRlsToRls(NwGnbRlsToRls::RADIO_LINK_FAILURE);
w->rlfCause = rls::ERlfCause::PDU_ID_EXISTS;
// TODO: push msg
return;
}
......@@ -156,6 +170,8 @@ void RlsControlTask::handleDownlinkRrcDelivery(int ueId, uint32_t pduId, rrc::Rr
{
m_pduMap.clear();
auto *w = new NwGnbRlsToRls(NwGnbRlsToRls::RADIO_LINK_FAILURE);
w->rlfCause = rls::ERlfCause::PDU_ID_FULL;
// TODO: Send RLF
return;
}
......@@ -202,7 +218,9 @@ void RlsControlTask::onAckControlTimerExpired()
if (!transmissionFailures.empty())
{
// TODO: send to upper layer
auto *w = new NwGnbRlsToRls(NwGnbRlsToRls::TRANSMISSION_FAILURE);
w->pduList = std::move(transmissionFailures);
// TODO: push msg
}
}
......
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