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
5805cdca
Commit
5805cdca
authored
May 11, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RLS improvements
parent
1139725c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
20 deletions
+38
-20
src/lib/rls/rls_base.hpp
src/lib/rls/rls_base.hpp
+12
-2
src/ue/nts.hpp
src/ue/nts.hpp
+5
-1
src/ue/rls/ctl_task.cpp
src/ue/rls/ctl_task.cpp
+20
-8
src/ue/rls/ctl_task.hpp
src/ue/rls/ctl_task.hpp
+1
-9
No files found.
src/lib/rls/rls_base.hpp
View file @
5805cdca
...
...
@@ -8,12 +8,22 @@
#include "rls_pdu.hpp"
#include <lib/rrc/rrc.hpp>
namespace
rls
{
enum
class
ERlfCause
struct
PduInfo
{
OctetString
pdu
;
rrc
::
RrcChannel
rrcChannel
{};
int64_t
sentTime
{};
};
enum
class
ERlfCause
{
PDU_ID_EXISTS
,
PDU_ID_FULL
};
}
\ No newline at end of file
}
// namespace rls
\ No newline at end of file
src/ue/nts.hpp
View file @
5805cdca
...
...
@@ -253,6 +253,7 @@ struct NwUeRlsToRls : NtsMessage
DOWNLINK_DATA
,
DOWNLINK_RRC
,
RADIO_LINK_FAILURE
,
TRANSMISSION_FAILURE
,
}
present
;
// RECEIVE_RLS_MESSAGE
...
...
@@ -280,12 +281,15 @@ struct NwUeRlsToRls : NtsMessage
// DOWNLINK_RRC
rrc
::
RrcChannel
rrcChannel
{};
//
DOWN
LINK_RRC
//
UP
LINK_RRC
uint32_t
pduId
{};
// RADIO_LINK_FAILURE
rls
::
ERlfCause
rlfCause
{};
// TRANSMISSION_FAILURE
std
::
vector
<
rls
::
PduInfo
>
pduList
;
explicit
NwUeRlsToRls
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
UE_RLS_TO_RLS
),
present
(
present
)
{
}
...
...
src/ue/rls/ctl_task.cpp
View file @
5805cdca
...
...
@@ -114,29 +114,35 @@ void RlsControlTask::handleRlsMessage(int cellId, rls::RlsMessage &msg)
// (This is not a problem for RRC, but for DATA), normally we should avoid this, no need for now.
(
void
)
cellId
;
int
psi
=
static_cast
<
int
>
(
m
.
payload
);
auto
*
w
=
new
NwUeRlsToRls
(
NwUeRlsToRls
::
DOWNLINK_DATA
);
w
->
psi
=
static_cast
<
int
>
(
m
.
payload
);
w
->
data
=
std
::
move
(
m
.
pdu
);
// TODO: send to upper layer [PSI, DATA]
}
else
if
(
m
.
pduType
==
rls
::
EPduType
::
RRC
)
{
auto
rrcChannel
=
static_cast
<
rrc
::
RrcChannel
>
(
m
.
payload
);
auto
*
w
=
new
NwUeRlsToRls
(
NwUeRlsToRls
::
DOWNLINK_RRC
);
w
->
cellId
=
cellId
;
w
->
rrcChannel
=
static_cast
<
rrc
::
RrcChannel
>
(
m
.
payload
);
w
->
data
=
std
::
move
(
m
.
pdu
);
// TODO: send to upper layer [rrcChannel, DATA]
}
else
{
// TODO: log
m_logger
->
err
(
"Unhandled RLS PDU type"
);
}
}
else
{
// TODO: log
m_logger
->
err
(
"Unhandled RLS message type"
);
}
}
void
RlsControlTask
::
handleSignalChange
(
int
cellId
,
int
dbm
)
{
auto
*
w
=
new
NwUeRlsToRls
(
NwUeRlsToRls
::
SIGNAL_CHANGED
);
w
->
cellId
=
cellId
;
w
->
dbm
=
dbm
;
// TODO transparently send to the RRC
}
...
...
@@ -146,6 +152,8 @@ void RlsControlTask::handleUplinkRrcDelivery(int cellId, uint32_t pduId, rrc::Rr
{
if
(
m_pduMap
.
count
(
pduId
))
{
auto
*
w
=
new
NwUeRlsToRls
(
NwUeRlsToRls
::
RADIO_LINK_FAILURE
);
w
->
rlfCause
=
rls
::
ERlfCause
::
PDU_ID_EXISTS
;
// TODO: issue RLF
m_pduMap
.
clear
();
...
...
@@ -154,6 +162,8 @@ void RlsControlTask::handleUplinkRrcDelivery(int cellId, uint32_t pduId, rrc::Rr
if
(
m_pduMap
.
size
()
>
MAX_PDU_COUNT
)
{
auto
*
w
=
new
NwUeRlsToRls
(
NwUeRlsToRls
::
RADIO_LINK_FAILURE
);
w
->
rlfCause
=
rls
::
ERlfCause
::
PDU_ID_FULL
;
// TODO: issue RLF
m_pduMap
.
clear
();
...
...
@@ -189,7 +199,7 @@ void RlsControlTask::onAckControlTimerExpired()
{
int64_t
current
=
utils
::
CurrentTimeMillis
();
std
::
vector
<
PduInfo
>
transmissionFailures
;
std
::
vector
<
rls
::
PduInfo
>
transmissionFailures
;
for
(
auto
&
pdu
:
m_pduMap
)
{
...
...
@@ -200,7 +210,9 @@ void RlsControlTask::onAckControlTimerExpired()
m_pduMap
.
clear
();
// TODO: Notify transmisson failures
auto
*
w
=
new
NwUeRlsToRls
(
NwUeRlsToRls
::
TRANSMISSION_FAILURE
);
w
->
pduList
=
std
::
move
(
transmissionFailures
);
// TODO: Notify transmission failures
}
void
RlsControlTask
::
onAckSendTimerExpired
()
...
...
src/ue/rls/ctl_task.hpp
View file @
5805cdca
...
...
@@ -23,18 +23,10 @@ namespace nr::ue
class
RlsControlTask
:
public
NtsTask
{
private:
struct
PduInfo
{
OctetString
pdu
;
rrc
::
RrcChannel
rrcChannel
{};
int64_t
sentTime
{};
};
private:
std
::
unique_ptr
<
Logger
>
m_logger
;
RlsUdpTask
*
m_udpTask
;
std
::
unordered_map
<
uint32_t
,
PduInfo
>
m_pduMap
;
std
::
unordered_map
<
uint32_t
,
rls
::
PduInfo
>
m_pduMap
;
uint64_t
m_sti
;
std
::
unordered_map
<
int
,
std
::
vector
<
uint32_t
>>
m_pendingAck
;
...
...
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