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
c4c9ea6a
Commit
c4c9ea6a
authored
May 28, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
L3 RRC/NAS developments
parent
cc3c83e7
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
5 deletions
+25
-5
src/lib/nas/storage.hpp
src/lib/nas/storage.hpp
+12
-0
src/ue/app/cmd_handler.cpp
src/ue/app/cmd_handler.cpp
+1
-1
src/utils/common_types.cpp
src/utils/common_types.cpp
+7
-0
src/utils/common_types.hpp
src/utils/common_types.hpp
+1
-0
src/utils/json.cpp
src/utils/json.cpp
+2
-2
src/utils/json.hpp
src/utils/json.hpp
+2
-2
No files found.
src/lib/nas/storage.hpp
View file @
c4c9ea6a
...
...
@@ -13,6 +13,7 @@
#include <vector>
#include <utils/common.hpp>
#include <utils/json.hpp>
namespace
nas
{
...
...
@@ -207,6 +208,11 @@ class NasSlot
return
m_value
;
}
const
T
&
getPure
()
const
{
return
m_value
;
}
void
clear
()
{
set
(
T
{});
...
...
@@ -267,3 +273,9 @@ class NasSlot
};
}
// namespace nas
template
<
typename
T
>
inline
Json
ToJson
(
const
nas
::
NasSlot
<
T
>
&
v
)
{
return
ToJson
(
v
.
getPure
());
}
src/ue/app/cmd_handler.cpp
View file @
c4c9ea6a
...
...
@@ -128,7 +128,7 @@ void UeCmdHandler::handleCmdImpl(NmUeCliCommand &msg)
{
"current-plmn"
,
::
ToJson
(
currentPlmn
)},
{
"current-tac"
,
::
ToJson
(
currentTac
)},
{
"tai-list"
,
""
},
{
"last-tai"
,
""
},
{
"last-tai"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_storage
->
lastVisitedRegisteredTai
)
},
{
"stored-suci"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_storage
->
storedSuci
->
get
())},
{
"stored-guti"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_storage
->
storedGuti
->
get
())},
{
"has-emergency"
,
::
ToJson
(
m_base
->
nasTask
->
mm
->
hasEmergency
())},
...
...
src/utils/common_types.cpp
View file @
c4c9ea6a
...
...
@@ -175,6 +175,13 @@ Json ToJson(const EInitialRegCause &v)
}
}
Json
ToJson
(
const
Tai
&
v
)
{
if
(
!
v
.
hasValue
())
return
nullptr
;
return
"PLMN["
+
ToJson
(
v
.
plmn
).
str
()
+
"] TAC["
+
std
::
to_string
(
v
.
tac
)
+
"]"
;
}
void
NetworkSlice
::
addIfNotExists
(
const
SingleSlice
&
slice
)
{
if
(
!
std
::
any_of
(
slices
.
begin
(),
slices
.
end
(),
[
&
slice
](
auto
&
s
)
{
return
s
==
slice
;
}))
...
...
src/utils/common_types.hpp
View file @
c4c9ea6a
...
...
@@ -206,6 +206,7 @@ bool operator!=(const GlobalNci &lhs, const GlobalNci &rhs);
Json
ToJson
(
const
Supi
&
v
);
Json
ToJson
(
const
Plmn
&
v
);
Json
ToJson
(
const
Tai
&
v
);
Json
ToJson
(
const
SingleSlice
&
v
);
Json
ToJson
(
const
NetworkSlice
&
v
);
Json
ToJson
(
const
PlmnSupport
&
v
);
...
...
src/utils/json.cpp
View file @
c4c9ea6a
...
...
@@ -161,7 +161,7 @@ Json::Json() : m_type{Type::NULL_TYPE}
{
}
Json
::
Json
(
nullptr_t
)
:
m_type
{
Type
::
NULL_TYPE
}
Json
::
Json
(
std
::
nullptr_t
)
:
m_type
{
Type
::
NULL_TYPE
}
{
}
...
...
@@ -362,7 +362,7 @@ void Json::put(std::string key, Json value)
m_children
.
emplace_back
(
std
::
move
(
key
),
std
::
move
(
value
));
}
Json
ToJson
(
nullptr_t
)
Json
ToJson
(
std
::
nullptr_t
)
{
return
nullptr
;
}
...
...
src/utils/json.hpp
View file @
c4c9ea6a
...
...
@@ -47,7 +47,7 @@ class Json
public:
Json
();
/* no-explicit */
Json
(
nullptr_t
v
);
/* no-explicit */
Json
(
std
::
nullptr_t
v
);
/* no-explicit */
Json
(
std
::
string
str
);
/* no-explicit */
Json
(
bool
v
);
/* no-explicit */
Json
(
uint8_t
v
);
...
...
@@ -105,7 +105,7 @@ class Json
[[
nodiscard
]]
std
::
string
dumpYaml
()
const
;
};
Json
ToJson
(
nullptr_t
);
Json
ToJson
(
std
::
nullptr_t
);
Json
ToJson
(
bool
v
);
Json
ToJson
(
const
std
::
string
&
v
);
Json
ToJson
(
uint8_t
v
);
...
...
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