Commit 07ed4cbf authored by aligungr's avatar aligungr

L3 RRC/NAS developments

parent f267bee9
......@@ -123,7 +123,7 @@ void NasMm::sendNasMessage(const nas::PlainMmMessage &msg)
if (msg.messageType == nas::EMessageType::REGISTRATION_REQUEST ||
msg.messageType == nas::EMessageType::SERVICE_REQUEST)
{
if (HasNonCleartext(msg))
if (HasNonCleartext(msg) && m_cmState == ECmState::CM_IDLE)
{
OctetString originalPdu;
nas::EncodeNasMessage(msg, originalPdu);
......
......@@ -32,25 +32,6 @@
namespace nr::ue
{
void UeRrcTask::deliverUplinkNas(OctetString &&nasPdu)
{
auto *pdu = asn::New<ASN_RRC_UL_DCCH_Message>();
pdu->message.present = ASN_RRC_UL_DCCH_MessageType_PR_c1;
pdu->message.choice.c1 =
asn::New<ASN_RRC_UL_DCCH_MessageType::ASN_RRC_UL_DCCH_MessageType_u::ASN_RRC_UL_DCCH_MessageType__c1>();
pdu->message.choice.c1->present = ASN_RRC_UL_DCCH_MessageType__c1_PR_ulInformationTransfer;
pdu->message.choice.c1->choice.ulInformationTransfer = asn::New<ASN_RRC_ULInformationTransfer>();
auto &c1 = pdu->message.choice.c1->choice.ulInformationTransfer->criticalExtensions;
c1.present = ASN_RRC_ULInformationTransfer__criticalExtensions_PR_ulInformationTransfer;
c1.choice.ulInformationTransfer = asn::New<ASN_RRC_ULInformationTransfer_IEs>();
c1.choice.ulInformationTransfer->dedicatedNAS_Message = asn::New<ASN_RRC_DedicatedNAS_Message_t>();
asn::SetOctetString(*c1.choice.ulInformationTransfer->dedicatedNAS_Message, nasPdu);
sendRrcMessage(pdu);
}
void UeRrcTask::receiveDownlinkInformationTransfer(const ASN_RRC_DLInformationTransfer &msg)
{
OctetString nasPdu =
......
......@@ -12,6 +12,9 @@
#include <ue/nas/task.hpp>
#include <ue/nts.hpp>
#include <asn/rrc/ASN_RRC_ULInformationTransfer-IEs.h>
#include <asn/rrc/ASN_RRC_ULInformationTransfer.h>
namespace nr::ue
{
......@@ -23,18 +26,35 @@ void UeRrcTask::deliverUplinkNas(uint32_t pduId, OctetString &&nasPdu)
return;
}
if (m_state == ERrcState::RRC_CONNECTED)
if (nasPdu.length() == 0)
return;
if (m_state == ERrcState::RRC_IDLE)
{
// TODO
startConnectionSetup(std::move(nasPdu));
return;
}
else if (m_state == ERrcState::RRC_INACTIVE)
{
// TODO
return;
}
else if (m_state == ERrcState::RRC_IDLE)
{
startConnectionSetup(std::move(nasPdu));
}
auto *pdu = asn::New<ASN_RRC_UL_DCCH_Message>();
pdu->message.present = ASN_RRC_UL_DCCH_MessageType_PR_c1;
pdu->message.choice.c1 =
asn::New<ASN_RRC_UL_DCCH_MessageType::ASN_RRC_UL_DCCH_MessageType_u::ASN_RRC_UL_DCCH_MessageType__c1>();
pdu->message.choice.c1->present = ASN_RRC_UL_DCCH_MessageType__c1_PR_ulInformationTransfer;
pdu->message.choice.c1->choice.ulInformationTransfer = asn::New<ASN_RRC_ULInformationTransfer>();
auto &c1 = pdu->message.choice.c1->choice.ulInformationTransfer->criticalExtensions;
c1.present = ASN_RRC_ULInformationTransfer__criticalExtensions_PR_ulInformationTransfer;
c1.choice.ulInformationTransfer = asn::New<ASN_RRC_ULInformationTransfer_IEs>();
c1.choice.ulInformationTransfer->dedicatedNAS_Message = asn::New<ASN_RRC_DedicatedNAS_Message_t>();
asn::SetOctetString(*c1.choice.ulInformationTransfer->dedicatedNAS_Message, nasPdu);
sendRrcMessage(pdu);
}
} // namespace nr::ue
\ No newline at end of file
......@@ -75,7 +75,6 @@ class UeRrcTask : public NtsTask
private:
/* Handlers */
void handleDownlinkRrc(int cellId, rrc::RrcChannel channel, const OctetString &pdu);
void deliverUplinkNas(OctetString &&nasPdu);
void receiveRrcRelease(const ASN_RRC_RRCRelease &msg);
void receiveDownlinkInformationTransfer(const ASN_RRC_DLInformationTransfer &msg);
void receivePaging(const ASN_RRC_Paging &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