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
cb4899d2
Commit
cb4899d2
authored
May 27, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
L3 RRC/NAS developments
parent
748d53e5
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
16 deletions
+27
-16
src/ue/rls/ctl_task.cpp
src/ue/rls/ctl_task.cpp
+5
-5
src/ue/rls/ctl_task.hpp
src/ue/rls/ctl_task.hpp
+2
-2
src/ue/rls/task.cpp
src/ue/rls/task.cpp
+8
-3
src/ue/rls/task.hpp
src/ue/rls/task.hpp
+1
-1
src/ue/rls/udp_task.cpp
src/ue/rls/udp_task.cpp
+4
-3
src/ue/rls/udp_task.hpp
src/ue/rls/udp_task.hpp
+2
-2
src/ue/types.hpp
src/ue/types.hpp
+5
-0
No files found.
src/ue/rls/ctl_task.cpp
View file @
cb4899d2
...
...
@@ -22,8 +22,8 @@ static constexpr const int TIMER_PERIOD_ACK_SEND = 2250;
namespace
nr
::
ue
{
RlsControlTask
::
RlsControlTask
(
TaskBase
*
base
,
uint64_t
sti
)
:
m_s
ti
{
sti
},
m_servingCell
{},
m_mainTask
{},
m_udpTask
{},
m_pduMap
{},
m_pendingAck
{}
RlsControlTask
::
RlsControlTask
(
TaskBase
*
base
,
RlsSharedContext
*
shCtx
)
:
m_s
hCtx
{
shCtx
},
m_servingCell
{},
m_mainTask
{},
m_udpTask
{},
m_pduMap
{},
m_pendingAck
{}
{
m_logger
=
base
->
logBase
->
makeUniqueLogger
(
base
->
config
->
getLoggerPrefix
()
+
"rls-ctl"
);
}
...
...
@@ -185,7 +185,7 @@ void RlsControlTask::handleUplinkRrcDelivery(int cellId, uint32_t pduId, rrc::Rr
m_pduMap
[
pduId
].
sentTime
=
utils
::
CurrentTimeMillis
();
}
rls
::
RlsPduTransmission
msg
{
m_sti
};
rls
::
RlsPduTransmission
msg
{
m_s
hCtx
->
s
ti
};
msg
.
pduType
=
rls
::
EPduType
::
RRC
;
msg
.
pdu
=
std
::
move
(
data
);
msg
.
payload
=
static_cast
<
uint32_t
>
(
channel
);
...
...
@@ -196,7 +196,7 @@ void RlsControlTask::handleUplinkRrcDelivery(int cellId, uint32_t pduId, rrc::Rr
void
RlsControlTask
::
handleUplinkDataDelivery
(
int
psi
,
OctetString
&&
data
)
{
rls
::
RlsPduTransmission
msg
{
m_sti
};
rls
::
RlsPduTransmission
msg
{
m_s
hCtx
->
s
ti
};
msg
.
pduType
=
rls
::
EPduType
::
DATA
;
msg
.
pdu
=
std
::
move
(
data
);
msg
.
payload
=
static_cast
<
uint32_t
>
(
psi
);
...
...
@@ -243,7 +243,7 @@ void RlsControlTask::onAckSendTimerExpired()
if
(
!
item
.
second
.
empty
())
continue
;
rls
::
RlsPduTransmissionAck
msg
{
m_sti
};
rls
::
RlsPduTransmissionAck
msg
{
m_s
hCtx
->
s
ti
};
msg
.
pduIds
=
std
::
move
(
item
.
second
);
m_udpTask
->
send
(
item
.
first
,
msg
);
...
...
src/ue/rls/ctl_task.hpp
View file @
cb4899d2
...
...
@@ -25,7 +25,7 @@ class RlsControlTask : public NtsTask
{
private:
std
::
unique_ptr
<
Logger
>
m_logger
;
uint64_t
m_sti
;
RlsSharedContext
*
m_shCtx
;
int
m_servingCell
;
NtsTask
*
m_mainTask
;
RlsUdpTask
*
m_udpTask
;
...
...
@@ -33,7 +33,7 @@ class RlsControlTask : public NtsTask
std
::
unordered_map
<
int
,
std
::
vector
<
uint32_t
>>
m_pendingAck
;
public:
explicit
RlsControlTask
(
TaskBase
*
base
,
uint64_t
sti
);
explicit
RlsControlTask
(
TaskBase
*
base
,
RlsSharedContext
*
shCtx
);
~
RlsControlTask
()
override
=
default
;
protected:
...
...
src/ue/rls/task.cpp
View file @
cb4899d2
...
...
@@ -21,10 +21,11 @@ UeRlsTask::UeRlsTask(TaskBase *base) : m_base{base}
{
m_logger
=
m_base
->
logBase
->
makeUniqueLogger
(
m_base
->
config
->
getLoggerPrefix
()
+
"rls"
);
m_sti
=
utils
::
Random64
();
m_shCtx
=
new
RlsSharedContext
();
m_shCtx
->
sti
=
utils
::
Random64
();
m_udpTask
=
new
RlsUdpTask
(
base
,
m_s
ti
,
base
->
config
->
gnbSearchList
);
m_ctlTask
=
new
RlsControlTask
(
base
,
m_s
ti
);
m_udpTask
=
new
RlsUdpTask
(
base
,
m_s
hCtx
,
base
->
config
->
gnbSearchList
);
m_ctlTask
=
new
RlsControlTask
(
base
,
m_s
hCtx
);
m_udpTask
->
initialize
(
m_ctlTask
);
m_ctlTask
->
initialize
(
this
,
m_udpTask
);
...
...
@@ -107,6 +108,7 @@ void UeRlsTask::onLoop()
break
;
}
case
NmUeRrcToRls
:
:
RESET_STI
:
{
m_shCtx
->
sti
=
utils
::
Random64
();
break
;
}
}
...
...
@@ -138,8 +140,11 @@ void UeRlsTask::onQuit()
{
m_udpTask
->
quit
();
m_ctlTask
->
quit
();
delete
m_udpTask
;
delete
m_ctlTask
;
delete
m_shCtx
;
}
}
// namespace nr::ue
src/ue/rls/task.hpp
View file @
cb4899d2
...
...
@@ -34,7 +34,7 @@ class UeRlsTask : public NtsTask
TaskBase
*
m_base
;
std
::
unique_ptr
<
Logger
>
m_logger
;
uint64_t
m_sti
;
RlsSharedContext
*
m_shCtx
;
RlsUdpTask
*
m_udpTask
;
RlsControlTask
*
m_ctlTask
;
...
...
src/ue/rls/udp_task.cpp
View file @
cb4899d2
...
...
@@ -24,8 +24,9 @@ static constexpr const int HEARTBEAT_THRESHOLD = 2000; // (LOOP_PERIOD + RECEIVE
namespace
nr
::
ue
{
RlsUdpTask
::
RlsUdpTask
(
TaskBase
*
base
,
uint64_t
sti
,
const
std
::
vector
<
std
::
string
>
&
searchSpace
)
:
m_server
{},
m_ctlTask
{},
m_sti
{
sti
},
m_searchSpace
{},
m_cells
{},
m_cellIdToSti
{},
m_lastLoop
{},
m_cellIdCounter
{}
RlsUdpTask
::
RlsUdpTask
(
TaskBase
*
base
,
RlsSharedContext
*
shCtx
,
const
std
::
vector
<
std
::
string
>
&
searchSpace
)
:
m_server
{},
m_ctlTask
{},
m_shCtx
{
shCtx
},
m_searchSpace
{},
m_cells
{},
m_cellIdToSti
{},
m_lastLoop
{},
m_cellIdCounter
{}
{
m_logger
=
base
->
logBase
->
makeUniqueLogger
(
base
->
config
->
getLoggerPrefix
()
+
"rls-udp"
);
...
...
@@ -160,7 +161,7 @@ void RlsUdpTask::heartbeatCycle(uint64_t time, const Vector3 &simPos)
for
(
auto
&
addr
:
m_searchSpace
)
{
rls
::
RlsHeartBeat
msg
{
m_sti
};
rls
::
RlsHeartBeat
msg
{
m_s
hCtx
->
s
ti
};
msg
.
simPos
=
simPos
;
sendRlsPdu
(
addr
,
msg
);
}
...
...
src/ue/rls/udp_task.hpp
View file @
cb4899d2
...
...
@@ -35,7 +35,7 @@ class RlsUdpTask : public NtsTask
std
::
unique_ptr
<
Logger
>
m_logger
;
udp
::
UdpServer
*
m_server
;
NtsTask
*
m_ctlTask
;
uint64_t
m_sti
;
RlsSharedContext
*
m_shCtx
;
std
::
vector
<
InetAddress
>
m_searchSpace
;
std
::
unordered_map
<
uint64_t
,
CellInfo
>
m_cells
;
std
::
unordered_map
<
int
,
uint64_t
>
m_cellIdToSti
;
...
...
@@ -44,7 +44,7 @@ class RlsUdpTask : public NtsTask
int
m_cellIdCounter
;
public:
explicit
RlsUdpTask
(
TaskBase
*
base
,
uint64_t
sti
,
const
std
::
vector
<
std
::
string
>
&
searchSpace
);
explicit
RlsUdpTask
(
TaskBase
*
base
,
RlsSharedContext
*
shCtx
,
const
std
::
vector
<
std
::
string
>
&
searchSpace
);
~
RlsUdpTask
()
override
=
default
;
protected:
...
...
src/ue/types.hpp
View file @
cb4899d2
...
...
@@ -168,6 +168,11 @@ struct UeSharedContext
bool
hasActiveCell
();
};
struct
RlsSharedContext
{
std
::
atomic
<
uint64_t
>
sti
{};
};
struct
TaskBase
{
UserEquipment
*
ue
{};
...
...
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