Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
UERANSIM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
UERANSIM
Commits
61d09a6e
Commit
61d09a6e
authored
Mar 14, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MM refactor
parent
e3df4898
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
37 deletions
+58
-37
src/ue/mm/interface.cpp
src/ue/mm/interface.cpp
+50
-0
src/ue/mm/mm.hpp
src/ue/mm/mm.hpp
+7
-6
src/ue/nas/task.cpp
src/ue/nas/task.cpp
+1
-31
No files found.
src/ue/mm/interface.cpp
0 → 100644
View file @
61d09a6e
//
// This file is a part of UERANSIM open source project.
// Copyright (c) 2021 ALİ GÜNGÖR.
//
// The software and all associated files are licensed under GPL-3.0
// and subject to the terms and conditions defined in LICENSE file.
//
#include "mm.hpp"
#include <utils/common.hpp>
namespace
nr
::
ue
{
void
NasMm
::
handleRrcEvent
(
const
NwUeRrcToNas
&
msg
)
{
switch
(
msg
.
present
)
{
case
NwUeRrcToNas
:
:
RRC_CONNECTION_SETUP
:
{
handleRrcConnectionSetup
();
break
;
}
case
NwUeRrcToNas
:
:
PLMN_SEARCH_RESPONSE
:
{
handlePlmnSearchResponse
(
msg
.
gnbName
);
break
;
}
case
NwUeRrcToNas
:
:
PLMN_SEARCH_FAILURE
:
{
handlePlmnSearchFailure
();
break
;
}
case
NwUeRrcToNas
:
:
NAS_DELIVERY
:
{
OctetView
buffer
{
msg
.
nasPdu
};
auto
nasMessage
=
nas
::
DecodeNasMessage
(
buffer
);
if
(
nasMessage
!=
nullptr
)
receiveNasMessage
(
*
nasMessage
);
break
;
}
case
NwUeRrcToNas
:
:
RRC_CONNECTION_RELEASE
:
{
handleRrcConnectionRelease
();
break
;
}
case
NwUeRrcToNas
:
:
RADIO_LINK_FAILURE
:
{
handleRadioLinkFailure
();
break
;
}
}
}
}
// namespace nr::ue
src/ue/mm/mm.hpp
View file @
61d09a6e
...
...
@@ -77,14 +77,14 @@ class NasMm
public:
/* Transport */
void
sendNasMessage
(
const
nas
::
PlainMmMessage
&
msg
);
void
receiveNasMessage
(
const
nas
::
NasMessage
&
msg
);
private:
/* Transport */
void
sendMmStatus
(
nas
::
EMmCause
cause
);
void
receiveNasMessage
(
const
nas
::
NasMessage
&
msg
);
void
receiveMmMessage
(
const
nas
::
PlainMmMessage
&
msg
);
void
receiveDlNasTransport
(
const
nas
::
DlNasTransport
&
msg
);
void
receiveMmStatus
(
const
nas
::
FiveGMmStatus
&
msg
);
void
receiveMmCause
(
const
nas
::
IE5gMmCause
&
msg
);
void
sendMmStatus
(
nas
::
EMmCause
cause
);
private:
/* Registration */
void
sendInitialRegistration
(
bool
isEmergencyReg
,
bool
dueToDereg
);
...
...
@@ -141,16 +141,14 @@ class NasMm
NetworkSlice
makeRequestedNssai
(
bool
&
isDefaultNssai
)
const
;
void
handleNetworkSlicingSubscriptionChange
();
public:
/* Radio */
private:
/* Radio */
void
localReleaseConnection
();
void
handlePlmnSearchResponse
(
const
std
::
string
&
gnbName
);
void
handlePlmnSearchFailure
();
void
handleRrcConnectionSetup
();
void
handleRrcConnectionRelease
();
void
handleRadioLinkFailure
();
private:
/* Radio */
void
localReleaseConnection
();
private:
/* Access Control */
bool
isHighPriority
();
bool
hasEmergency
();
...
...
@@ -161,6 +159,9 @@ class NasMm
public:
/* Timer */
void
onTimerExpire
(
nas
::
NasTimer
&
timer
);
public:
/* Interface */
void
handleRrcEvent
(
const
NwUeRrcToNas
&
msg
);
};
}
// namespace nr::ue
\ No newline at end of file
src/ue/nas/task.cpp
View file @
61d09a6e
...
...
@@ -56,37 +56,7 @@ void NasTask::onLoop()
switch
(
msg
->
msgType
)
{
case
NtsMessageType
:
:
UE_RRC_TO_NAS
:
{
auto
*
w
=
dynamic_cast
<
NwUeRrcToNas
*>
(
msg
);
switch
(
w
->
present
)
{
case
NwUeRrcToNas
:
:
RRC_CONNECTION_SETUP
:
{
mm
->
handleRrcConnectionSetup
();
break
;
}
case
NwUeRrcToNas
:
:
PLMN_SEARCH_RESPONSE
:
{
mm
->
handlePlmnSearchResponse
(
w
->
gnbName
);
break
;
}
case
NwUeRrcToNas
:
:
PLMN_SEARCH_FAILURE
:
{
mm
->
handlePlmnSearchFailure
();
break
;
}
case
NwUeRrcToNas
:
:
NAS_DELIVERY
:
{
OctetView
buffer
{
w
->
nasPdu
};
auto
nasMessage
=
nas
::
DecodeNasMessage
(
buffer
);
if
(
nasMessage
!=
nullptr
)
mm
->
receiveNasMessage
(
*
nasMessage
);
break
;
}
case
NwUeRrcToNas
:
:
RRC_CONNECTION_RELEASE
:
{
mm
->
handleRrcConnectionRelease
();
break
;
}
case
NwUeRrcToNas
:
:
RADIO_LINK_FAILURE
:
{
mm
->
handleRadioLinkFailure
();
break
;
}
}
mm
->
handleRrcEvent
(
*
dynamic_cast
<
NwUeRrcToNas
*>
(
msg
));
break
;
}
case
NtsMessageType
:
:
UE_NAS_TO_NAS
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment