Commit d662ad45 authored by aligungr's avatar aligungr

Performance improvements

parent 63f45a02
......@@ -63,10 +63,6 @@ void UeL3Task::onLoop()
m_nas->performCycle();
}
}
else if (msg->msgType == NtsMessageType::UE_NAS_TO_RRC)
{
m_rrc->handleNasSapMessage(dynamic_cast<NmUeNasToRrc &>(*msg));
}
else if (msg->msgType == NtsMessageType::UE_RLS_TO_RRC)
{
m_rrc->handleRlsSapMessage(dynamic_cast<NmUeRlsToRrc &>(*msg));
......
......@@ -23,7 +23,6 @@ class NasLayer
Usim *m_usim;
friend class UeCmdHandler;
friend class UeL3Task;
public:
explicit NasLayer(TaskBase *base);
......@@ -33,11 +32,9 @@ class NasLayer
void onStart();
void onQuit();
private:
public:
void performCycle();
void handleSapMessage(std::unique_ptr<NtsMessage> msg);
public:
void handleRrcConnectionRelease();
};
......
......@@ -182,11 +182,7 @@ EProcRc NasMm::sendNasMessage(const nas::PlainMmMessage &msg)
}
}
auto m = std::make_unique<NmUeNasToRrc>(NmUeNasToRrc::UPLINK_NAS_DELIVERY);
m->pduId = 0;
m->nasPdu = std::move(pdu);
m_base->l3Task->push(std::move(m));
m_base->l3Task->rrc().deliverUplinkNas(0, std::move(pdu));
return EProcRc::OK;
}
......
......@@ -84,22 +84,6 @@ struct NmUeRrcToNas : NtsMessage
}
};
struct NmUeNasToRrc : NtsMessage
{
enum PR
{
UPLINK_NAS_DELIVERY,
} present;
// UPLINK_NAS_DELIVERY
uint32_t pduId{};
OctetString nasPdu;
explicit NmUeNasToRrc(PR present) : NtsMessage(NtsMessageType::UE_NAS_TO_RRC), present(present)
{
}
};
struct NmUeRrcToRls : NtsMessage
{
enum PR
......
......@@ -57,7 +57,6 @@ class UeRrcLayer
OctetString m_initialNasPdu{};
friend class UeCmdHandler;
friend class UeL3Task;
public:
explicit UeRrcLayer(TaskBase *base);
......@@ -82,13 +81,8 @@ class UeRrcLayer
void receiveRrcMessage(ASN_RRC_DL_DCCH_Message *msg);
void receiveRrcMessage(ASN_RRC_PCCH_Message *msg);
/* Service Access Point */
void handleRlsSapMessage(NmUeRlsToRrc &msg);
void handleNasSapMessage(NmUeNasToRrc &msg);
/* State Management */
void triggerCycle();
void performCycle();
void switchState(ERrcState state);
void onSwitchState(ERrcState oldState, ERrcState newState);
......@@ -110,7 +104,6 @@ class UeRrcLayer
void receiveSib1(int cellId, const ASN_RRC_SIB1 &msg);
/* NAS Transport */
void deliverUplinkNas(uint32_t pduId, OctetString &&nasPdu);
void receiveDownlinkInformationTransfer(const ASN_RRC_DLInformationTransfer &msg);
/* Connection Control */
......@@ -130,6 +123,15 @@ class UeRrcLayer
/* Connection Control */
void performLocalRelease(bool treatBarred);
/* NAS Transport */
void deliverUplinkNas(uint32_t pduId, OctetString &&nasPdu);
/* Service Access Point */
void handleRlsSapMessage(NmUeRlsToRrc &msg);
/* State Management */
void performCycle();
};
} // namespace nr::ue
\ No newline at end of file
......@@ -35,15 +35,4 @@ void UeRrcLayer::handleRlsSapMessage(NmUeRlsToRrc &msg)
}
}
void UeRrcLayer::handleNasSapMessage(NmUeNasToRrc &msg)
{
switch (msg.present)
{
case NmUeNasToRrc::UPLINK_NAS_DELIVERY: {
deliverUplinkNas(msg.pduId, std::move(msg.nasPdu));
break;
}
}
}
} // namespace nr::ue
\ No newline at end of file
......@@ -49,7 +49,6 @@ enum class NtsMessageType
UE_APP_TO_TUN,
UE_TUN_TO_APP,
UE_RRC_TO_NAS,
UE_NAS_TO_RRC,
UE_RRC_TO_RLS,
UE_RLS_TO_RRC,
UE_RLS_TO_NAS,
......
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