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
93cd83c7
Commit
93cd83c7
authored
May 17, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
L3 RRC/NAS developments
parent
4fe5f473
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
5 deletions
+38
-5
src/ue/nas/storage.cpp
src/ue/nas/storage.cpp
+18
-4
src/ue/types.hpp
src/ue/types.hpp
+3
-0
src/utils/common_types.cpp
src/utils/common_types.cpp
+12
-0
src/utils/common_types.hpp
src/utils/common_types.hpp
+5
-1
No files found.
src/ue/nas/storage.cpp
View file @
93cd83c7
...
@@ -11,15 +11,29 @@
...
@@ -11,15 +11,29 @@
static
constexpr
const
size_t
FORBIDDEN_TAI_LIST_SIZE
=
40
;
static
constexpr
const
size_t
FORBIDDEN_TAI_LIST_SIZE
=
40
;
static
constexpr
const
int64_t
FORBIDDEN_TAI_CLEAR_PERIOD
=
1000ll
*
60ll
*
60ll
*
12ll
;
static
constexpr
const
int64_t
FORBIDDEN_TAI_CLEAR_PERIOD
=
1000ll
*
60ll
*
60ll
*
12ll
;
static
void
BackupTaiListInSharedCtx
(
const
std
::
vector
<
Tai
>
&
buffer
,
size_t
count
,
Locked
<
std
::
vector
<
Tai
>>
&
target
)
{
target
.
mutate
([
count
,
&
buffer
](
auto
&
value
)
{
value
.
clear
();
for
(
size_t
i
=
0
;
i
<
count
;
i
++
)
value
.
push_back
(
buffer
[
i
]);
});
}
namespace
nr
::
ue
namespace
nr
::
ue
{
{
MmStorage
::
MmStorage
(
TaskBase
*
base
)
:
m_base
{
base
}
MmStorage
::
MmStorage
(
TaskBase
*
base
)
:
m_base
{
base
}
{
{
m_forbiddenTaiListRoaming
=
m_forbiddenTaiListRoaming
=
std
::
make_unique
<
nas
::
NasListT1
<
Tai
>>
(
std
::
make_unique
<
nas
::
NasListT1
<
Tai
>>
(
FORBIDDEN_TAI_LIST_SIZE
,
FORBIDDEN_TAI_CLEAR_PERIOD
,
std
::
nullopt
);
FORBIDDEN_TAI_LIST_SIZE
,
FORBIDDEN_TAI_CLEAR_PERIOD
,
[
this
](
const
std
::
vector
<
Tai
>
&
buffer
,
size_t
count
)
{
m_forbiddenTaiListRps
=
BackupTaiListInSharedCtx
(
buffer
,
count
,
m_base
->
shCtx
.
forbiddenTaiRoaming
);
std
::
make_unique
<
nas
::
NasListT1
<
Tai
>>
(
FORBIDDEN_TAI_LIST_SIZE
,
FORBIDDEN_TAI_CLEAR_PERIOD
,
std
::
nullopt
);
});
m_forbiddenTaiListRps
=
std
::
make_unique
<
nas
::
NasListT1
<
Tai
>>
(
FORBIDDEN_TAI_LIST_SIZE
,
FORBIDDEN_TAI_CLEAR_PERIOD
,
[
this
](
const
std
::
vector
<
Tai
>
&
buffer
,
size_t
count
)
{
BackupTaiListInSharedCtx
(
buffer
,
count
,
m_base
->
shCtx
.
forbiddenTaiRps
);
});
}
}
}
// namespace nr::ue
}
// namespace nr::ue
\ No newline at end of file
src/ue/types.hpp
View file @
93cd83c7
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include <atomic>
#include <atomic>
#include <memory>
#include <memory>
#include <unordered_set>
#include <unordered_set>
#include <set>
#include <lib/app/monitor.hpp>
#include <lib/app/monitor.hpp>
#include <lib/app/ue_ctl.hpp>
#include <lib/app/ue_ctl.hpp>
...
@@ -161,6 +162,8 @@ struct UeSharedContext
...
@@ -161,6 +162,8 @@ struct UeSharedContext
Locked
<
std
::
unordered_set
<
Plmn
>>
availablePlmns
;
Locked
<
std
::
unordered_set
<
Plmn
>>
availablePlmns
;
Locked
<
Plmn
>
selectedPlmn
;
Locked
<
Plmn
>
selectedPlmn
;
Locked
<
CurrentCellInfo
>
currentCell
;
Locked
<
CurrentCellInfo
>
currentCell
;
Locked
<
std
::
vector
<
Tai
>>
forbiddenTaiRoaming
;
Locked
<
std
::
vector
<
Tai
>>
forbiddenTaiRps
;
};
};
struct
TaskBase
struct
TaskBase
...
...
src/utils/common_types.cpp
View file @
93cd83c7
...
@@ -170,3 +170,15 @@ bool Plmn::hasValue() const
...
@@ -170,3 +170,15 @@ bool Plmn::hasValue() const
{
{
return
this
->
mcc
!=
0
;
return
this
->
mcc
!=
0
;
}
}
Tai
::
Tai
()
:
plmn
{},
tac
{}
{
}
Tai
::
Tai
(
const
Plmn
&
plmn
,
int
tac
)
:
plmn
{
plmn
},
tac
{
tac
}
{
}
Tai
::
Tai
(
int
mcc
,
int
mnc
,
bool
longMnc
,
int
tac
)
:
plmn
{
mcc
,
mnc
,
longMnc
},
tac
{
tac
}
{
}
src/utils/common_types.hpp
View file @
93cd83c7
...
@@ -37,7 +37,11 @@ struct Plmn
...
@@ -37,7 +37,11 @@ struct Plmn
struct
Tai
struct
Tai
{
{
Plmn
plmn
;
Plmn
plmn
;
int
tac
{};
int
tac
;
Tai
();
Tai
(
const
Plmn
&
plmn
,
int
tac
);
Tai
(
int
mcc
,
int
mnc
,
bool
longMnc
,
int
tac
);
};
};
struct
SingleSlice
struct
SingleSlice
...
...
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