Commit 31337c43 authored by aligungr's avatar aligungr

UE RRC paging handling

parent 4fa23821
......@@ -44,6 +44,11 @@ void NasMm::handleRrcEvent(const NwUeRrcToNas &msg)
}
case NwUeRrcToNas::SERVING_CELL_CHANGE: {
handleServingCellChange(msg.servingCell);
break;
}
case NwUeRrcToNas::PAGING: {
handlePaging(msg.pagingTmsi);
break;
}
}
}
......
......@@ -152,6 +152,7 @@ class NasMm
void handleRrcConnectionRelease();
void handleServingCellChange(const UeCellInfo &servingCell);
void handleRadioLinkFailure();
void handlePaging(const std::vector<GutiMobileIdentity> &tmsiIds);
private: /* Access Control */
bool isHighPriority();
......
......@@ -228,4 +228,9 @@ void NasMm::localReleaseConnection()
m_base->rrcTask->push(new NwUeNasToRrc(NwUeNasToRrc::LOCAL_RELEASE_CONNECTION));
}
void NasMm::handlePaging(const std::vector<GutiMobileIdentity> &tmsiIds)
{
// TODO
}
} // namespace nr::ue
\ No newline at end of file
......@@ -67,6 +67,7 @@ struct NwUeRrcToNas : NtsMessage
RRC_CONNECTION_RELEASE,
RADIO_LINK_FAILURE,
SERVING_CELL_CHANGE,
PAGING,
} present;
// NAS_DELIVERY
......@@ -78,6 +79,9 @@ struct NwUeRrcToNas : NtsMessage
// SERVING_CELL_CHANGE
UeCellInfo servingCell{};
// PAGING
std::vector<GutiMobileIdentity> pagingTmsi{};
explicit NwUeRrcToNas(PR present) : NtsMessage(NtsMessageType::UE_RRC_TO_NAS), present(present)
{
}
......
......@@ -15,6 +15,9 @@
#include <asn/rrc/ASN_RRC_DLInformationTransfer-IEs.h>
#include <asn/rrc/ASN_RRC_DLInformationTransfer.h>
#include <asn/rrc/ASN_RRC_Paging.h>
#include <asn/rrc/ASN_RRC_PagingRecord.h>
#include <asn/rrc/ASN_RRC_PagingRecordList.h>
#include <asn/rrc/ASN_RRC_RRCSetup-IEs.h>
#include <asn/rrc/ASN_RRC_RRCSetup.h>
#include <asn/rrc/ASN_RRC_RRCSetupComplete-IEs.h>
......@@ -133,8 +136,26 @@ void UeRrcTask::receiveRrcRelease(const ASN_RRC_RRCRelease &msg)
void UeRrcTask::receivePaging(const ASN_RRC_Paging &msg)
{
// TODO
m_logger->err("Paging received");
std::vector<GutiMobileIdentity> tmsiIds{};
asn::ForeachItem(*msg.pagingRecordList, [&tmsiIds](auto &pagingRecord) {
if (pagingRecord.ue_Identity.present == ASN_RRC_PagingUE_Identity_PR_ng_5G_S_TMSI)
{
auto recordTmsi = asn::GetOctetString(pagingRecord.ue_Identity.choice.ng_5G_S_TMSI);
auto tmsiOs = BitBuffer{recordTmsi.data()};
GutiMobileIdentity tmsi{};
tmsi.amfSetId = tmsiOs.readBits(10);
tmsi.amfPointer = tmsiOs.readBits(6);
tmsi.tmsi = octet4{static_cast<uint32_t>(tmsiOs.readBitsLong(32) & 0xFFFFFFFFu)};
tmsiIds.push_back(tmsi);
}
});
auto *w = new NwUeRrcToNas(NwUeRrcToNas::PAGING);
w->pagingTmsi = std::move(tmsiIds);
m_base->nasTask->push(w);
}
} // namespace nr::ue
\ 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