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
886d8eb5
Commit
886d8eb5
authored
Apr 03, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE SAS dev.
parent
8d211623
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
49 additions
and
0 deletions
+49
-0
src/app/cli_cmd.cpp
src/app/cli_cmd.cpp
+5
-0
src/app/cli_cmd.hpp
src/app/cli_cmd.hpp
+1
-0
src/gnb/sas/handler.cpp
src/gnb/sas/handler.cpp
+1
-0
src/ue/app/cmd_handler.cpp
src/ue/app/cmd_handler.cpp
+36
-0
src/ue/sas/measurement.cpp
src/ue/sas/measurement.cpp
+1
-0
src/urs/sas_pdu.cpp
src/urs/sas_pdu.cpp
+3
-0
src/urs/sas_pdu.hpp
src/urs/sas_pdu.hpp
+1
-0
src/utils/common_types.hpp
src/utils/common_types.hpp
+1
-0
No files found.
src/app/cli_cmd.cpp
View file @
886d8eb5
...
...
@@ -162,6 +162,7 @@ static OrderedMap<std::string, CmdEntry> g_ueCmdEntries = {
{
"ps-release-all"
,
{
"Trigger PDU session release procedures for all active sessions"
,
""
,
DefaultDesc
,
false
}},
{
"deregister"
,
{
"Perform a de-registration by the UE"
,
"<normal|disable-5g|switch-off|remove-sim>"
,
DefaultDesc
,
true
}},
{
"coverage"
,
{
"Show gNodeB cell coverage information"
,
""
,
DefaultDesc
,
false
}},
};
static
std
::
unique_ptr
<
GnbCliCommand
>
GnbCliParseImpl
(
const
std
::
string
&
subCmd
,
const
opt
::
OptionsResult
&
options
,
...
...
@@ -301,6 +302,10 @@ static std::unique_ptr<UeCliCommand> UeCliParseImpl(const std::string &subCmd, c
}
return
cmd
;
}
else
if
(
subCmd
==
"coverage"
)
{
return
std
::
make_unique
<
UeCliCommand
>
(
UeCliCommand
::
COVERAGE
);
}
return
nullptr
;
}
...
...
src/app/cli_cmd.hpp
View file @
886d8eb5
...
...
@@ -48,6 +48,7 @@ struct UeCliCommand
PS_RELEASE
,
PS_RELEASE_ALL
,
DE_REGISTER
,
COVERAGE
,
}
present
;
// DE_REGISTER
...
...
src/gnb/sas/handler.cpp
View file @
886d8eb5
...
...
@@ -40,6 +40,7 @@ void GnbSasTask::handleCellInfoRequest(const InetAddress &addr, const sas::SasCe
resp
.
cellId
.
plmn
=
m_base
->
config
->
plmn
;
resp
.
tac
=
m_base
->
config
->
tac
;
resp
.
dbm
=
dbm
;
resp
.
gnbName
=
m_base
->
config
->
name
;
sendSasMessage
(
addr
,
resp
);
}
...
...
src/ue/app/cmd_handler.cpp
View file @
886d8eb5
...
...
@@ -12,6 +12,7 @@
#include <ue/mr/task.hpp>
#include <ue/nas/task.hpp>
#include <ue/rrc/task.hpp>
#include <ue/sas/task.hpp>
#include <ue/tun/task.hpp>
#include <utils/common.hpp>
#include <utils/printer.hpp>
...
...
@@ -19,6 +20,17 @@
#define PAUSE_CONFIRM_TIMEOUT 3000
#define PAUSE_POLLING 10
static
std
::
string
SignalDescription
(
int
dbm
)
{
if
(
dbm
>
-
90
)
return
"Excellent"
;
if
(
dbm
>
-
105
)
return
"Good"
;
if
(
dbm
>
-
120
)
return
"Fair"
;
return
"Poor"
;
}
namespace
nr
::
ue
{
...
...
@@ -150,6 +162,30 @@ void UeCmdHandler::handleCmdImpl(NwUeCliCommand &msg)
sendResult
(
msg
.
address
,
"PDU session establishment procedure triggered"
);
break
;
}
case
app
:
:
UeCliCommand
::
COVERAGE
:
{
auto
&
map
=
m_base
->
sasTask
->
m_activeMeasurements
;
if
(
map
.
empty
())
{
sendResult
(
msg
.
address
,
"No cell exists in the range"
);
break
;
}
std
::
vector
<
Json
>
cellInfo
{};
for
(
auto
&
entry
:
map
)
{
auto
&
measurement
=
entry
.
second
;
cellInfo
.
push_back
(
Json
::
Obj
({
{
"gnb"
,
measurement
.
gnbName
},
{
"plmn"
,
ToJson
(
measurement
.
cellId
.
plmn
)},
{
"nci"
,
measurement
.
cellId
.
nci
},
{
"tac"
,
measurement
.
tac
},
{
"signal"
,
std
::
to_string
(
measurement
.
dbm
)
+
"dBm ["
+
SignalDescription
(
measurement
.
dbm
)
+
"]"
},
}));
}
sendResult
(
msg
.
address
,
Json
::
Arr
(
cellInfo
).
dumpYaml
());
break
;
}
}
}
...
...
src/ue/sas/measurement.cpp
View file @
886d8eb5
...
...
@@ -52,6 +52,7 @@ void UeSasTask::receiveCellInfoResponse(const sas::SasCellInfoResponse &msg)
meas
.
cellId
=
msg
.
cellId
;
meas
.
tac
=
msg
.
tac
;
meas
.
dbm
=
msg
.
dbm
;
meas
.
gnbName
=
msg
.
gnbName
;
meas
.
time
=
utils
::
CurrentTimeMillis
();
m_pendingMeasurements
[
meas
.
cellId
]
=
meas
;
...
...
src/urs/sas_pdu.cpp
View file @
886d8eb5
...
...
@@ -63,6 +63,8 @@ void EncodeSasMessage(const SasMessage &msg, OctetString &stream)
AppendGlobalNci
(
m
.
cellId
,
stream
);
stream
.
appendOctet4
(
m
.
tac
);
stream
.
appendOctet4
(
m
.
dbm
);
stream
.
appendOctet4
(
static_cast
<
int
>
(
m
.
gnbName
.
size
()));
stream
.
appendUtf8
(
m
.
gnbName
);
}
}
...
...
@@ -94,6 +96,7 @@ std::unique_ptr<SasMessage> DecodeSasMessage(const OctetView &stream)
res
->
cellId
=
DecodeGlobalNci
(
stream
);
res
->
tac
=
stream
.
read4I
();
res
->
dbm
=
stream
.
read4I
();
res
->
gnbName
=
stream
.
readUtf8String
(
stream
.
read4I
());
return
res
;
}
...
...
src/urs/sas_pdu.hpp
View file @
886d8eb5
...
...
@@ -47,6 +47,7 @@ struct SasCellInfoResponse : SasMessage
GlobalNci
cellId
{};
int
tac
{};
int
dbm
{};
std
::
string
gnbName
{};
SasCellInfoResponse
()
:
SasMessage
(
SasMessageType
::
CELL_INFO_RESPONSE
)
{
...
...
src/utils/common_types.hpp
View file @
886d8eb5
...
...
@@ -136,6 +136,7 @@ struct UeCellMeasurement
GlobalNci
cellId
{};
int
tac
{};
int
dbm
{};
std
::
string
gnbName
{};
uint64_t
time
{};
};
...
...
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