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
4b392a25
Commit
4b392a25
authored
May 28, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
L3 RRC/NAS developments
parent
96073581
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
src/lib/nas/ie4.cpp
src/lib/nas/ie4.cpp
+23
-0
src/lib/nas/ie4.hpp
src/lib/nas/ie4.hpp
+1
-0
src/ue/app/cmd_handler.cpp
src/ue/app/cmd_handler.cpp
+4
-1
No files found.
src/lib/nas/ie4.cpp
View file @
4b392a25
...
@@ -1093,4 +1093,27 @@ Json ToJson(const IEPduAddress &v)
...
@@ -1093,4 +1093,27 @@ Json ToJson(const IEPduAddress &v)
}
}
}
}
Json
ToJson
(
const
IESessionAmbr
&
v
)
{
int
downlinkValue
=
static_cast
<
int
>
(
v
.
sessionAmbrForDownlink
);
int
uplinkValue
=
static_cast
<
int
>
(
v
.
sessionAmbrForUplink
);
int
downlinkUnit
=
static_cast
<
int
>
(
v
.
unitForSessionAmbrForDownlink
);
int
uplinkUnit
=
static_cast
<
int
>
(
v
.
unitForSessionAmbrForUplink
);
int
downlinkFactor
=
1
<<
(
2
*
((
downlinkUnit
-
1
)
%
5
));
int
uplinkFactor
=
1
<<
(
2
*
((
uplinkUnit
-
1
)
%
5
));
int
downlinkMagnitude
=
(
downlinkUnit
-
1
)
/
5
;
int
uplinkMagnitude
=
(
uplinkUnit
-
1
)
/
5
;
int
downlink
=
downlinkValue
*
downlinkFactor
;
int
uplink
=
uplinkValue
*
uplinkFactor
;
static
const
std
::
string
units
[
5
]
=
{
"Kb/s"
,
"Mb/s"
,
"Gb/s"
,
"Tb/s"
,
"Pb/s"
};
return
"up["
+
std
::
to_string
(
uplink
)
+
units
[
uplinkMagnitude
]
+
"] down["
+
std
::
to_string
(
downlink
)
+
units
[
downlinkMagnitude
]
+
"]"
;
}
}
// namespace nas
}
// namespace nas
\ No newline at end of file
src/lib/nas/ie4.hpp
View file @
4b392a25
...
@@ -573,5 +573,6 @@ struct IE5gsTrackingAreaIdentityList : InformationElement4
...
@@ -573,5 +573,6 @@ struct IE5gsTrackingAreaIdentityList : InformationElement4
};
};
Json
ToJson
(
const
IEPduAddress
&
v
);
Json
ToJson
(
const
IEPduAddress
&
v
);
Json
ToJson
(
const
IESessionAmbr
&
v
);
}
// namespace nas
}
// namespace nas
src/ue/app/cmd_handler.cpp
View file @
4b392a25
...
@@ -160,6 +160,9 @@ void UeCmdHandler::handleCmdImpl(NmUeCliCommand &msg)
...
@@ -160,6 +160,9 @@ void UeCmdHandler::handleCmdImpl(NmUeCliCommand &msg)
std
::
vector
<
Json
>
arr
{};
std
::
vector
<
Json
>
arr
{};
for
(
auto
*
pduSession
:
m_base
->
nasTask
->
sm
->
m_pduSessions
)
for
(
auto
*
pduSession
:
m_base
->
nasTask
->
sm
->
m_pduSessions
)
{
{
if
(
pduSession
->
psi
==
0
)
continue
;
arr
.
push_back
(
Json
::
Obj
({
arr
.
push_back
(
Json
::
Obj
({
{
"ID"
,
pduSession
->
psi
},
{
"ID"
,
pduSession
->
psi
},
{
"state"
,
ToJson
(
pduSession
->
psState
)},
{
"state"
,
ToJson
(
pduSession
->
psState
)},
...
@@ -168,7 +171,7 @@ void UeCmdHandler::handleCmdImpl(NmUeCliCommand &msg)
...
@@ -168,7 +171,7 @@ void UeCmdHandler::handleCmdImpl(NmUeCliCommand &msg)
{
"s-nssai"
,
ToJson
(
pduSession
->
sNssai
)},
{
"s-nssai"
,
ToJson
(
pduSession
->
sNssai
)},
{
"emergency"
,
pduSession
->
isEmergency
},
{
"emergency"
,
pduSession
->
isEmergency
},
{
"address"
,
::
ToJson
(
pduSession
->
pduAddress
)},
{
"address"
,
::
ToJson
(
pduSession
->
pduAddress
)},
{
"ambr"
,
""
},
// TODO
{
"ambr"
,
::
ToJson
(
pduSession
->
sessionAmbr
)},
{
"data-pending"
,
pduSession
->
uplinkPending
},
{
"data-pending"
,
pduSession
->
uplinkPending
},
}));
}));
}
}
...
...
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