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
e73b1cec
Commit
e73b1cec
authored
May 23, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
L3 RRC/NAS developments
parent
455524d6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
8 deletions
+42
-8
src/ue.cpp
src/ue.cpp
+2
-2
src/ue/nas/sm/resource.cpp
src/ue/nas/sm/resource.cpp
+38
-5
src/ue/nas/sm/sm.hpp
src/ue/nas/sm/sm.hpp
+1
-0
src/ue/types.hpp
src/ue/types.hpp
+1
-1
No files found.
src/ue.cpp
View file @
e73b1cec
...
@@ -201,7 +201,7 @@ static nr::ue::UeConfig *ReadConfigYaml()
...
@@ -201,7 +201,7 @@ static nr::ue::UeConfig *ReadConfigYaml()
s
.
isEmergency
=
yaml
::
GetBool
(
sess
,
"emergency"
);
s
.
isEmergency
=
yaml
::
GetBool
(
sess
,
"emergency"
);
result
->
ini
tSessions
.
push_back
(
s
);
result
->
defaul
tSessions
.
push_back
(
s
);
}
}
}
}
...
@@ -317,7 +317,7 @@ static nr::ue::UeConfig *GetConfigByUe(int ueIndex)
...
@@ -317,7 +317,7 @@ static nr::ue::UeConfig *GetConfigByUe(int ueIndex)
c
->
initials
=
g_refConfig
->
initials
;
c
->
initials
=
g_refConfig
->
initials
;
c
->
supportedAlgs
=
g_refConfig
->
supportedAlgs
;
c
->
supportedAlgs
=
g_refConfig
->
supportedAlgs
;
c
->
gnbSearchList
=
g_refConfig
->
gnbSearchList
;
c
->
gnbSearchList
=
g_refConfig
->
gnbSearchList
;
c
->
initSessions
=
g_refConfig
->
ini
tSessions
;
c
->
defaultSessions
=
g_refConfig
->
defaul
tSessions
;
c
->
configureRouting
=
g_refConfig
->
configureRouting
;
c
->
configureRouting
=
g_refConfig
->
configureRouting
;
c
->
prefixLogger
=
g_refConfig
->
prefixLogger
;
c
->
prefixLogger
=
g_refConfig
->
prefixLogger
;
c
->
integrityMaxRate
=
g_refConfig
->
integrityMaxRate
;
c
->
integrityMaxRate
=
g_refConfig
->
integrityMaxRate
;
...
...
src/ue/nas/sm/resource.cpp
View file @
e73b1cec
...
@@ -108,16 +108,49 @@ std::bitset<16> NasSm::getPduSessionStatus()
...
@@ -108,16 +108,49 @@ std::bitset<16> NasSm::getPduSessionStatus()
void
NasSm
::
establishRequiredSessions
()
void
NasSm
::
establishRequiredSessions
()
{
{
if
(
m_
base
->
config
->
initSessions
.
empt
y
())
if
(
m_
mm
->
hasEmergenc
y
())
{
{
m_logger
->
warn
(
"No initial PDU sessions are configured"
);
if
(
!
anyEmergencySession
())
{
SessionConfig
config
;
config
.
type
=
nas
::
EPduSessionType
::
IPV4
;
config
.
apn
=
std
::
nullopt
;
config
.
sNssai
=
std
::
nullopt
;
config
.
isEmergency
=
true
;
sendEstablishmentRequest
(
config
);
}
return
;
return
;
}
}
//m_logger->debug("Initial PDU sessions are establishing [%d#]", m_base->config->initSessions.size());
for
(
auto
&
config
:
m_base
->
config
->
defaultSessions
)
{
if
(
!
anySessionMatches
(
config
))
sendEstablishmentRequest
(
config
);
}
}
bool
NasSm
::
anySessionMatches
(
const
SessionConfig
&
config
)
{
// ACTIVE_PENDING etc. are also included
return
std
::
any_of
(
m_pduSessions
.
begin
(),
m_pduSessions
.
end
(),
[
&
config
](
auto
&
ps
)
{
if
(
ps
->
psState
==
EPsState
::
INACTIVE
)
return
false
;
if
(
config
.
isEmergency
)
return
ps
->
isEmergency
;
if
(
config
.
isEmergency
!=
ps
->
isEmergency
)
return
false
;
if
(
config
.
type
!=
ps
->
sessionType
)
return
false
;
if
(
config
.
apn
!=
ps
->
apn
)
return
false
;
if
(
config
.
sNssai
!=
ps
->
sNssai
)
return
false
;
for
(
auto
&
sess
:
m_base
->
config
->
initSessions
)
return
true
;
sendEstablishmentRequest
(
sess
);
}
);
}
}
}
// namespace nr::ue
}
// namespace nr::ue
\ No newline at end of file
src/ue/nas/sm/sm.hpp
View file @
e73b1cec
...
@@ -52,6 +52,7 @@ class NasSm
...
@@ -52,6 +52,7 @@ class NasSm
std
::
bitset
<
16
>
getUplinkDataStatus
();
std
::
bitset
<
16
>
getUplinkDataStatus
();
std
::
bitset
<
16
>
getPduSessionStatus
();
std
::
bitset
<
16
>
getPduSessionStatus
();
void
establishRequiredSessions
();
void
establishRequiredSessions
();
bool
anySessionMatches
(
const
SessionConfig
&
config
);
private:
/* Transport */
private:
/* Transport */
void
receiveSmMessage
(
const
nas
::
SmMessage
&
msg
);
void
receiveSmMessage
(
const
nas
::
SmMessage
&
msg
);
...
...
src/ue/types.hpp
View file @
e73b1cec
...
@@ -100,7 +100,7 @@ struct UeConfig
...
@@ -100,7 +100,7 @@ struct UeConfig
std
::
optional
<
std
::
string
>
imeiSv
{};
std
::
optional
<
std
::
string
>
imeiSv
{};
SupportedAlgs
supportedAlgs
{};
SupportedAlgs
supportedAlgs
{};
std
::
vector
<
std
::
string
>
gnbSearchList
{};
std
::
vector
<
std
::
string
>
gnbSearchList
{};
std
::
vector
<
SessionConfig
>
ini
tSessions
{};
std
::
vector
<
SessionConfig
>
defaul
tSessions
{};
IntegrityMaxDataRateConfig
integrityMaxRate
{};
IntegrityMaxDataRateConfig
integrityMaxRate
{};
/* Read from config file as well, but should be stored in non-volatile
/* Read from config file as well, but should be stored in non-volatile
...
...
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