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
52eb0de5
Commit
52eb0de5
authored
Apr 03, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE SAS dev.
parent
14fe33e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
src/gnb/sas/handler.cpp
src/gnb/sas/handler.cpp
+10
-1
No files found.
src/gnb/sas/handler.cpp
View file @
52eb0de5
...
@@ -9,6 +9,8 @@
...
@@ -9,6 +9,8 @@
#include "task.hpp"
#include "task.hpp"
#include <cmath>
#include <cmath>
static
int
MIN_ALLOWED_DBM
=
-
100
;
static
int
EstimateSimulatedDbm
(
const
Vector3
&
myPos
,
const
Vector3
&
uePos
)
static
int
EstimateSimulatedDbm
(
const
Vector3
&
myPos
,
const
Vector3
&
uePos
)
{
{
int
deltaX
=
myPos
.
x
-
uePos
.
x
;
int
deltaX
=
myPos
.
x
-
uePos
.
x
;
...
@@ -24,11 +26,18 @@ namespace nr::gnb
...
@@ -24,11 +26,18 @@ namespace nr::gnb
void
GnbSasTask
::
handleCellInfoRequest
(
const
InetAddress
&
addr
,
const
sas
::
SasCellInfoRequest
&
msg
)
void
GnbSasTask
::
handleCellInfoRequest
(
const
InetAddress
&
addr
,
const
sas
::
SasCellInfoRequest
&
msg
)
{
{
int
dbm
=
EstimateSimulatedDbm
(
m_base
->
config
->
phyLocation
,
msg
.
simPos
);
if
(
dbm
<
MIN_ALLOWED_DBM
)
{
// if the simulated signal strength is such low, then do not send a response to this message
return
;
}
sas
::
SasCellInfoResponse
resp
{};
sas
::
SasCellInfoResponse
resp
{};
resp
.
cellId
.
nci
=
m_base
->
config
->
nci
;
resp
.
cellId
.
nci
=
m_base
->
config
->
nci
;
resp
.
cellId
.
plmn
=
m_base
->
config
->
plmn
;
resp
.
cellId
.
plmn
=
m_base
->
config
->
plmn
;
resp
.
tac
=
m_base
->
config
->
tac
;
resp
.
tac
=
m_base
->
config
->
tac
;
resp
.
dbm
=
EstimateSimulatedDbm
(
m_base
->
config
->
phyLocation
,
msg
.
simPos
)
;
resp
.
dbm
=
dbm
;
sendSasMessage
(
addr
,
resp
);
sendSasMessage
(
addr
,
resp
);
}
}
...
...
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