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
e5fdd868
Commit
e5fdd868
authored
Mar 17, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SM context refactor
parent
89825f99
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
+6
-11
src/ue/sm/allocation.cpp
src/ue/sm/allocation.cpp
+3
-11
src/ue/sm/base.cpp
src/ue/sm/base.cpp
+3
-0
No files found.
src/ue/sm/allocation.cpp
View file @
e5fdd868
...
@@ -25,7 +25,7 @@ int NasSm::allocatePduSessionId(const SessionConfig &config)
...
@@ -25,7 +25,7 @@ int NasSm::allocatePduSessionId(const SessionConfig &config)
int
id
=
-
1
;
int
id
=
-
1
;
for
(
int
i
=
PduSession
::
MIN_ID
;
i
<=
PduSession
::
MAX_ID
;
i
++
)
for
(
int
i
=
PduSession
::
MIN_ID
;
i
<=
PduSession
::
MAX_ID
;
i
++
)
{
{
if
(
arr
[
i
]
.
id
==
0
)
if
(
arr
[
i
]
->
psState
==
EPsState
::
INACTIVE
)
{
{
id
=
i
;
id
=
i
;
break
;
break
;
...
@@ -38,13 +38,6 @@ int NasSm::allocatePduSessionId(const SessionConfig &config)
...
@@ -38,13 +38,6 @@ int NasSm::allocatePduSessionId(const SessionConfig &config)
return
0
;
return
0
;
}
}
arr
[
id
]
=
{};
arr
[
id
].
id
=
id
;
arr
[
id
].
isEstablished
=
false
;
arr
[
id
].
apn
=
config
.
apn
;
arr
[
id
].
sessionType
=
config
.
type
;
arr
[
id
].
sNssai
=
config
.
sNssai
;
return
id
;
return
id
;
}
}
...
@@ -55,7 +48,7 @@ int NasSm::allocateProcedureTransactionId()
...
@@ -55,7 +48,7 @@ int NasSm::allocateProcedureTransactionId()
int
id
=
-
1
;
int
id
=
-
1
;
for
(
int
i
=
ProcedureTransaction
::
MIN_ID
;
i
<=
ProcedureTransaction
::
MAX_ID
;
i
++
)
for
(
int
i
=
ProcedureTransaction
::
MIN_ID
;
i
<=
ProcedureTransaction
::
MAX_ID
;
i
++
)
{
{
if
(
arr
[
i
].
id
==
0
)
if
(
!
arr
[
i
].
isUsed
)
{
{
id
=
i
;
id
=
i
;
break
;
break
;
...
@@ -69,7 +62,6 @@ int NasSm::allocateProcedureTransactionId()
...
@@ -69,7 +62,6 @@ int NasSm::allocateProcedureTransactionId()
}
}
arr
[
id
]
=
{};
arr
[
id
]
=
{};
arr
[
id
].
id
=
id
;
return
id
;
return
id
;
}
}
...
@@ -81,7 +73,7 @@ void NasSm::freeProcedureTransactionId(int pti)
...
@@ -81,7 +73,7 @@ void NasSm::freeProcedureTransactionId(int pti)
void
NasSm
::
freePduSessionId
(
int
psi
)
void
NasSm
::
freePduSessionId
(
int
psi
)
{
{
m_pduSessions
[
psi
]
=
{}
;
m_pduSessions
[
psi
]
->
psState
=
EPsState
::
INACTIVE
;
}
}
}
// namespace nr::ue
}
// namespace nr::ue
\ No newline at end of file
src/ue/sm/base.cpp
View file @
e5fdd868
...
@@ -14,6 +14,9 @@ namespace nr::ue
...
@@ -14,6 +14,9 @@ namespace nr::ue
NasSm
::
NasSm
(
TaskBase
*
base
,
UeTimers
*
timers
)
:
m_base
(
base
),
m_timers
(
timers
),
m_mm
(
nullptr
)
NasSm
::
NasSm
(
TaskBase
*
base
,
UeTimers
*
timers
)
:
m_base
(
base
),
m_timers
(
timers
),
m_mm
(
nullptr
)
{
{
m_logger
=
base
->
logBase
->
makeUniqueLogger
(
base
->
config
->
getLoggerPrefix
()
+
"nas"
);
m_logger
=
base
->
logBase
->
makeUniqueLogger
(
base
->
config
->
getLoggerPrefix
()
+
"nas"
);
for
(
int
i
=
0
;
i
<
16
;
i
++
)
m_pduSessions
[
i
]
=
new
PduSession
(
i
);
}
}
void
NasSm
::
onStart
(
NasMm
*
mm
)
void
NasSm
::
onStart
(
NasMm
*
mm
)
...
...
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