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
4b1a40a3
Commit
4b1a40a3
authored
Dec 30, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Performance improvements
parent
cffae166
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
18 deletions
+10
-18
src/ue/rls/task.cpp
src/ue/rls/task.cpp
+1
-3
src/ue/rls/udp_task.cpp
src/ue/rls/udp_task.cpp
+7
-12
src/ue/rls/udp_task.hpp
src/ue/rls/udp_task.hpp
+2
-3
No files found.
src/ue/rls/task.cpp
View file @
4b1a40a3
...
@@ -28,10 +28,8 @@ UeRlsTask::UeRlsTask(TaskBase *base) : m_base{base}
...
@@ -28,10 +28,8 @@ UeRlsTask::UeRlsTask(TaskBase *base) : m_base{base}
m_shCtx
=
new
RlsSharedContext
();
m_shCtx
=
new
RlsSharedContext
();
m_shCtx
->
sti
=
Random
::
Mixed
(
base
->
config
->
getNodeName
()).
nextL
();
m_shCtx
->
sti
=
Random
::
Mixed
(
base
->
config
->
getNodeName
()).
nextL
();
m_udpTask
=
new
RlsUdpTask
(
base
,
m_shCtx
,
base
->
config
->
gnbSearchList
);
m_udpTask
=
new
RlsUdpTask
(
base
,
m_shCtx
);
m_ctlLayer
=
std
::
make_unique
<
RlsCtlLayer
>
(
base
,
m_shCtx
);
m_ctlLayer
=
std
::
make_unique
<
RlsCtlLayer
>
(
base
,
m_shCtx
);
m_udpTask
->
initialize
(
this
);
}
}
void
UeRlsTask
::
onStart
()
void
UeRlsTask
::
onStart
()
...
...
src/ue/rls/udp_task.cpp
View file @
4b1a40a3
...
@@ -9,10 +9,10 @@
...
@@ -9,10 +9,10 @@
#include "udp_task.hpp"
#include "udp_task.hpp"
#include <cstdint>
#include <cstdint>
#include <cstring>
#include <set>
#include <set>
#include <ue/nts.hpp>
#include <ue/nts.hpp>
#include <ue/rls/task.hpp>
#include <utils/common.hpp>
#include <utils/common.hpp>
#include <utils/constants.hpp>
#include <utils/constants.hpp>
...
@@ -22,15 +22,15 @@ static constexpr const int HEARTBEAT_THRESHOLD = 2000; // (LOOP_PERIOD + RECEIVE
...
@@ -22,15 +22,15 @@ static constexpr const int HEARTBEAT_THRESHOLD = 2000; // (LOOP_PERIOD + RECEIVE
namespace
nr
::
ue
namespace
nr
::
ue
{
{
RlsUdpTask
::
RlsUdpTask
(
TaskBase
*
base
,
RlsSharedContext
*
shCtx
,
const
std
::
vector
<
std
::
string
>
&
searchSpace
)
RlsUdpTask
::
RlsUdpTask
(
TaskBase
*
base
,
RlsSharedContext
*
shCtx
)
:
m_
server
{},
m_mainTask
{},
m_shCtx
{
shCtx
},
m_searchSpace
{},
m_cells
{},
m_cellIdToSti
{},
m_lastLoop
{},
:
m_
base
{
base
},
m_server
{},
m_shCtx
{
shCtx
},
m_searchSpace
{},
m_cells
{},
m_cellIdToSti
{},
m_lastLoop
{},
m_cellIdCounter
{}
m_cellIdCounter
{}
{
{
m_logger
=
base
->
logBase
->
makeUniqueLogger
(
base
->
config
->
getLoggerPrefix
()
+
"rls-udp"
);
m_logger
=
base
->
logBase
->
makeUniqueLogger
(
base
->
config
->
getLoggerPrefix
()
+
"rls-udp"
);
m_server
=
new
udp
::
UdpServerTask
(
this
);
m_server
=
new
udp
::
UdpServerTask
(
this
);
for
(
auto
&
ip
:
searchSpace
)
for
(
auto
&
ip
:
base
->
config
->
gnbSearchList
)
m_searchSpace
.
emplace_back
(
ip
,
cons
::
RadioLinkPort
);
m_searchSpace
.
emplace_back
(
ip
,
cons
::
RadioLinkPort
);
m_simPos
=
Vector3
{};
m_simPos
=
Vector3
{};
...
@@ -56,7 +56,7 @@ void RlsUdpTask::onLoop()
...
@@ -56,7 +56,7 @@ void RlsUdpTask::onLoop()
{
{
if
(
msg
->
msgType
==
NtsMessageType
::
UDP_SERVER_RECEIVE
)
if
(
msg
->
msgType
==
NtsMessageType
::
UDP_SERVER_RECEIVE
)
{
{
auto
&
w
=
dynamic_cast
<
udp
::
NwUdpServerReceive
&>
(
*
msg
);
auto
&
w
=
dynamic_cast
<
udp
::
NwUdpServerReceive
&>
(
*
msg
);
auto
rlsMsg
=
rls
::
DecodeRlsMessage
(
OctetView
{
w
.
packet
});
auto
rlsMsg
=
rls
::
DecodeRlsMessage
(
OctetView
{
w
.
packet
});
if
(
rlsMsg
==
nullptr
)
if
(
rlsMsg
==
nullptr
)
m_logger
->
err
(
"Unable to decode RLS message"
);
m_logger
->
err
(
"Unable to decode RLS message"
);
...
@@ -123,7 +123,7 @@ void RlsUdpTask::receiveRlsPdu(const InetAddress &addr, std::unique_ptr<rls::Rls
...
@@ -123,7 +123,7 @@ void RlsUdpTask::receiveRlsPdu(const InetAddress &addr, std::unique_ptr<rls::Rls
auto
w
=
std
::
make_unique
<
NmUeRlsToRls
>
(
NmUeRlsToRls
::
RECEIVE_RLS_MESSAGE
);
auto
w
=
std
::
make_unique
<
NmUeRlsToRls
>
(
NmUeRlsToRls
::
RECEIVE_RLS_MESSAGE
);
w
->
cellId
=
m_cells
[
msg
->
sti
].
cellId
;
w
->
cellId
=
m_cells
[
msg
->
sti
].
cellId
;
w
->
msg
=
std
::
move
(
msg
);
w
->
msg
=
std
::
move
(
msg
);
m_
main
Task
->
push
(
std
::
move
(
w
));
m_
base
->
rls
Task
->
push
(
std
::
move
(
w
));
}
}
void
RlsUdpTask
::
onSignalChangeOrLost
(
int
cellId
)
void
RlsUdpTask
::
onSignalChangeOrLost
(
int
cellId
)
...
@@ -138,7 +138,7 @@ void RlsUdpTask::onSignalChangeOrLost(int cellId)
...
@@ -138,7 +138,7 @@ void RlsUdpTask::onSignalChangeOrLost(int cellId)
auto
w
=
std
::
make_unique
<
NmUeRlsToRls
>
(
NmUeRlsToRls
::
SIGNAL_CHANGED
);
auto
w
=
std
::
make_unique
<
NmUeRlsToRls
>
(
NmUeRlsToRls
::
SIGNAL_CHANGED
);
w
->
cellId
=
cellId
;
w
->
cellId
=
cellId
;
w
->
dbm
=
dbm
;
w
->
dbm
=
dbm
;
m_
main
Task
->
push
(
std
::
move
(
w
));
m_
base
->
rls
Task
->
push
(
std
::
move
(
w
));
}
}
void
RlsUdpTask
::
heartbeatCycle
(
uint64_t
time
,
const
Vector3
&
simPos
)
void
RlsUdpTask
::
heartbeatCycle
(
uint64_t
time
,
const
Vector3
&
simPos
)
...
@@ -169,9 +169,4 @@ void RlsUdpTask::heartbeatCycle(uint64_t time, const Vector3 &simPos)
...
@@ -169,9 +169,4 @@ void RlsUdpTask::heartbeatCycle(uint64_t time, const Vector3 &simPos)
}
}
}
}
void
RlsUdpTask
::
initialize
(
NtsTask
*
mainTask
)
{
m_mainTask
=
mainTask
;
}
}
// namespace nr::ue
}
// namespace nr::ue
src/ue/rls/udp_task.hpp
View file @
4b1a40a3
...
@@ -33,9 +33,9 @@ class RlsUdpTask : public NtsTask
...
@@ -33,9 +33,9 @@ class RlsUdpTask : public NtsTask
};
};
private:
private:
TaskBase
*
m_base
;
std
::
unique_ptr
<
Logger
>
m_logger
;
std
::
unique_ptr
<
Logger
>
m_logger
;
udp
::
UdpServerTask
*
m_server
;
udp
::
UdpServerTask
*
m_server
;
NtsTask
*
m_mainTask
;
RlsSharedContext
*
m_shCtx
;
RlsSharedContext
*
m_shCtx
;
std
::
vector
<
InetAddress
>
m_searchSpace
;
std
::
vector
<
InetAddress
>
m_searchSpace
;
std
::
unordered_map
<
uint64_t
,
CellInfo
>
m_cells
;
std
::
unordered_map
<
uint64_t
,
CellInfo
>
m_cells
;
...
@@ -47,7 +47,7 @@ class RlsUdpTask : public NtsTask
...
@@ -47,7 +47,7 @@ class RlsUdpTask : public NtsTask
friend
class
UeCmdHandler
;
friend
class
UeCmdHandler
;
public:
public:
explicit
RlsUdpTask
(
TaskBase
*
base
,
RlsSharedContext
*
shCtx
,
const
std
::
vector
<
std
::
string
>
&
searchSpace
);
explicit
RlsUdpTask
(
TaskBase
*
base
,
RlsSharedContext
*
shCtx
);
~
RlsUdpTask
()
override
=
default
;
~
RlsUdpTask
()
override
=
default
;
protected:
protected:
...
@@ -62,7 +62,6 @@ class RlsUdpTask : public NtsTask
...
@@ -62,7 +62,6 @@ class RlsUdpTask : public NtsTask
void
heartbeatCycle
(
uint64_t
time
,
const
Vector3
&
simPos
);
void
heartbeatCycle
(
uint64_t
time
,
const
Vector3
&
simPos
);
public:
public:
void
initialize
(
NtsTask
*
mainTask
);
void
send
(
int
cellId
,
const
rls
::
RlsMessage
&
msg
);
void
send
(
int
cellId
,
const
rls
::
RlsMessage
&
msg
);
};
};
...
...
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