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
9684b8f5
Commit
9684b8f5
authored
May 15, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RRC developments
parent
85da3bc4
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
57 deletions
+62
-57
src/ue/nts.hpp
src/ue/nts.hpp
+4
-12
src/ue/rls/task.cpp
src/ue/rls/task.cpp
+6
-1
src/ue/rrc/channel.cpp
src/ue/rrc/channel.cpp
+11
-11
src/ue/rrc/rls_sap.cpp
src/ue/rrc/rls_sap.cpp
+30
-0
src/ue/rrc/task.cpp
src/ue/rrc/task.cpp
+1
-24
src/ue/rrc/task.hpp
src/ue/rrc/task.hpp
+10
-9
No files found.
src/ue/nts.hpp
View file @
9684b8f5
...
...
@@ -144,21 +144,13 @@ struct NwUeRlsToRrc : NtsMessage
{
enum
PR
{
PLMN_SEARCH_RESPONSE
,
SERVING_CELL_CHANGE
,
RRC_PDU_DELIVERY
,
RADIO_LINK_FAILURE
DOWNLINK_RRC_DELIVERY
}
present
;
// PLMN_SEARCH_RESPONSE
std
::
vector
<
UeCellMeasurement
>
measurements
{};
// SERVING_CELL_CHANGE
UeCellInfo
servingCell
{};
// RRC_PDU_DELIVERY
// DOWNLINK_RRC_DELIVERY
int
cellId
{};
rrc
::
RrcChannel
channel
{};
OctetString
pdu
{}
;
OctetString
pdu
;
explicit
NwUeRlsToRrc
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
UE_RLS_TO_RRC
),
present
(
present
)
{
...
...
src/ue/rls/task.cpp
View file @
9684b8f5
...
...
@@ -8,6 +8,7 @@
#include "task.hpp"
#include <ue/rrc/task.hpp>
#include <utils/common.hpp>
#include <utils/constants.hpp>
...
...
@@ -54,7 +55,11 @@ void UeRlsTask::onLoop()
break
;
}
case
NwUeRlsToRls
:
:
DOWNLINK_RRC
:
{
m_logger
->
debug
(
"downlink rrc cellId[%d]"
,
w
->
cellId
);
auto
*
m
=
new
NwUeRlsToRrc
(
NwUeRlsToRrc
::
DOWNLINK_RRC_DELIVERY
);
m
->
cellId
=
w
->
cellId
;
m
->
channel
=
w
->
rrcChannel
;
m
->
pdu
=
std
::
move
(
w
->
data
);
m_base
->
rrcTask
->
push
(
m
);
break
;
}
case
NwUeRlsToRls
:
:
RADIO_LINK_FAILURE
:
{
...
...
src/ue/rrc/channel.cpp
View file @
9684b8f5
...
...
@@ -19,7 +19,7 @@
namespace
nr
::
ue
{
void
UeRrcTask
::
handleDownlinkRrc
(
rrc
::
RrcChannel
channel
,
const
OctetString
&
rrcPdu
)
void
UeRrcTask
::
handleDownlinkRrc
(
int
cellId
,
rrc
::
RrcChannel
channel
,
const
OctetString
&
rrcPdu
)
{
switch
(
channel
)
{
...
...
@@ -28,7 +28,7 @@ void UeRrcTask::handleDownlinkRrc(rrc::RrcChannel channel, const OctetString &rr
if
(
pdu
==
nullptr
)
m_logger
->
err
(
"RRC BCCH-BCH PDU decoding failed."
);
else
receiveRrcMessage
(
pdu
);
receiveRrcMessage
(
cellId
,
pdu
);
asn
::
Free
(
asn_DEF_ASN_RRC_BCCH_BCH_Message
,
pdu
);
break
;
}
...
...
@@ -37,7 +37,7 @@ void UeRrcTask::handleDownlinkRrc(rrc::RrcChannel channel, const OctetString &rr
if
(
pdu
==
nullptr
)
m_logger
->
err
(
"RRC BCCH-DL-SCH PDU decoding failed."
);
else
receiveRrcMessage
(
pdu
);
receiveRrcMessage
(
cellId
,
pdu
);
asn
::
Free
(
asn_DEF_ASN_RRC_BCCH_DL_SCH_Message
,
pdu
);
break
;
}
...
...
@@ -46,7 +46,7 @@ void UeRrcTask::handleDownlinkRrc(rrc::RrcChannel channel, const OctetString &rr
if
(
pdu
==
nullptr
)
m_logger
->
err
(
"RRC DL-CCCH PDU decoding failed."
);
else
receiveRrcMessage
(
pdu
);
receiveRrcMessage
(
cellId
,
pdu
);
asn
::
Free
(
asn_DEF_ASN_RRC_DL_CCCH_Message
,
pdu
);
break
;
}
...
...
@@ -55,7 +55,7 @@ void UeRrcTask::handleDownlinkRrc(rrc::RrcChannel channel, const OctetString &rr
if
(
pdu
==
nullptr
)
m_logger
->
err
(
"RRC DL-DCCH PDU decoding failed."
);
else
receiveRrcMessage
(
pdu
);
receiveRrcMessage
(
cellId
,
pdu
);
asn
::
Free
(
asn_DEF_ASN_RRC_DL_DCCH_Message
,
pdu
);
break
;
};
...
...
@@ -64,7 +64,7 @@ void UeRrcTask::handleDownlinkRrc(rrc::RrcChannel channel, const OctetString &rr
if
(
pdu
==
nullptr
)
m_logger
->
err
(
"RRC PCCH PDU decoding failed."
);
else
receiveRrcMessage
(
pdu
);
receiveRrcMessage
(
cellId
,
pdu
);
asn
::
Free
(
asn_DEF_ASN_RRC_PCCH_Message
,
pdu
);
break
;
}
...
...
@@ -135,17 +135,17 @@ void UeRrcTask::sendRrcMessage(ASN_RRC_UL_DCCH_Message *msg)
m_base
->
rlsTask
->
push
(
nw
);
}
void
UeRrcTask
::
receiveRrcMessage
(
ASN_RRC_BCCH_BCH_Message
*
msg
)
void
UeRrcTask
::
receiveRrcMessage
(
int
,
ASN_RRC_BCCH_BCH_Message
*
msg
)
{
// TODO
}
void
UeRrcTask
::
receiveRrcMessage
(
ASN_RRC_BCCH_DL_SCH_Message
*
msg
)
void
UeRrcTask
::
receiveRrcMessage
(
int
,
ASN_RRC_BCCH_DL_SCH_Message
*
msg
)
{
// TODO
}
void
UeRrcTask
::
receiveRrcMessage
(
ASN_RRC_DL_CCCH_Message
*
msg
)
void
UeRrcTask
::
receiveRrcMessage
(
int
,
ASN_RRC_DL_CCCH_Message
*
msg
)
{
if
(
msg
->
message
.
present
!=
ASN_RRC_DL_CCCH_MessageType_PR_c1
)
return
;
...
...
@@ -164,7 +164,7 @@ void UeRrcTask::receiveRrcMessage(ASN_RRC_DL_CCCH_Message *msg)
}
}
void
UeRrcTask
::
receiveRrcMessage
(
ASN_RRC_DL_DCCH_Message
*
msg
)
void
UeRrcTask
::
receiveRrcMessage
(
int
,
ASN_RRC_DL_DCCH_Message
*
msg
)
{
if
(
msg
->
message
.
present
!=
ASN_RRC_DL_DCCH_MessageType_PR_c1
)
return
;
...
...
@@ -183,7 +183,7 @@ void UeRrcTask::receiveRrcMessage(ASN_RRC_DL_DCCH_Message *msg)
}
}
void
UeRrcTask
::
receiveRrcMessage
(
ASN_RRC_PCCH_Message
*
msg
)
void
UeRrcTask
::
receiveRrcMessage
(
int
,
ASN_RRC_PCCH_Message
*
msg
)
{
if
(
msg
->
message
.
present
!=
ASN_RRC_PCCH_MessageType_PR_c1
)
return
;
...
...
src/ue/rrc/rls_sap.cpp
0 → 100644
View file @
9684b8f5
//
// This file is a part of UERANSIM open source project.
// Copyright (c) 2021 ALİ GÜNGÖR.
//
// The software and all associated files are licensed under GPL-3.0
// and subject to the terms and conditions defined in LICENSE file.
//
#include "task.hpp"
#include <lib/asn/utils.hpp>
#include <lib/rrc/encode.hpp>
#include <ue/nas/task.hpp>
#include <ue/nts.hpp>
#include <utils/common.hpp>
namespace
nr
::
ue
{
void
UeRrcTask
::
handleRlsSapMessage
(
NwUeRlsToRrc
&
msg
)
{
switch
(
msg
.
present
)
{
case
NwUeRlsToRrc
:
:
DOWNLINK_RRC_DELIVERY
:
{
handleDownlinkRrc
(
msg
.
cellId
,
msg
.
channel
,
msg
.
pdu
);
break
;
}
}
}
}
// namespace nr::ue
\ No newline at end of file
src/ue/rrc/task.cpp
View file @
9684b8f5
...
...
@@ -77,30 +77,7 @@ void UeRrcTask::onLoop()
break
;
}
case
NtsMessageType
:
:
UE_RLS_TO_RRC
:
{
auto
*
w
=
dynamic_cast
<
NwUeRlsToRrc
*>
(
msg
);
switch
(
w
->
present
)
{
case
NwUeRlsToRrc
:
:
PLMN_SEARCH_RESPONSE
:
{
auto
*
wr
=
new
NwUeRrcToNas
(
NwUeRrcToNas
::
PLMN_SEARCH_RESPONSE
);
wr
->
measurements
=
std
::
move
(
w
->
measurements
);
m_base
->
nasTask
->
push
(
wr
);
break
;
}
case
NwUeRlsToRrc
:
:
SERVING_CELL_CHANGE
:
{
auto
*
wr
=
new
NwUeRrcToNas
(
NwUeRrcToNas
::
SERVING_CELL_CHANGE
);
wr
->
servingCell
=
w
->
servingCell
;
m_base
->
nasTask
->
push
(
wr
);
break
;
}
case
NwUeRlsToRrc
:
:
RRC_PDU_DELIVERY
:
{
handleDownlinkRrc
(
w
->
channel
,
w
->
pdu
);
break
;
}
case
NwUeRlsToRrc
:
:
RADIO_LINK_FAILURE
:
{
handleRadioLinkFailure
();
break
;
}
}
handleRlsSapMessage
(
*
dynamic_cast
<
NwUeRlsToRrc
*>
(
msg
));
break
;
}
default:
...
...
src/ue/rrc/task.hpp
View file @
9684b8f5
...
...
@@ -66,7 +66,7 @@ class UeRrcTask : public NtsTask
private:
/* Handlers */
void
handleDownlinkRrc
(
rrc
::
RrcChannel
channel
,
const
OctetString
&
pdu
);
void
handleDownlinkRrc
(
int
cellId
,
rrc
::
RrcChannel
channel
,
const
OctetString
&
pdu
);
void
deliverInitialNas
(
OctetString
&&
nasPdu
,
long
establishmentCause
);
void
deliverUplinkNas
(
OctetString
&&
nasPdu
);
...
...
@@ -78,18 +78,19 @@ class UeRrcTask : public NtsTask
void
handleRadioLinkFailure
();
/* RRC
channel send
message */
/* RRC
send and receive
message */
void
sendRrcMessage
(
ASN_RRC_BCCH_BCH_Message
*
msg
);
void
sendRrcMessage
(
ASN_RRC_UL_CCCH_Message
*
msg
);
void
sendRrcMessage
(
ASN_RRC_UL_CCCH1_Message
*
msg
);
void
sendRrcMessage
(
ASN_RRC_UL_DCCH_Message
*
msg
);
/* RRC channel receive message */
void
receiveRrcMessage
(
ASN_RRC_BCCH_BCH_Message
*
msg
);
void
receiveRrcMessage
(
ASN_RRC_BCCH_DL_SCH_Message
*
msg
);
void
receiveRrcMessage
(
ASN_RRC_DL_CCCH_Message
*
msg
);
void
receiveRrcMessage
(
ASN_RRC_DL_DCCH_Message
*
msg
);
void
receiveRrcMessage
(
ASN_RRC_PCCH_Message
*
msg
);
void
receiveRrcMessage
(
int
,
ASN_RRC_BCCH_BCH_Message
*
msg
);
void
receiveRrcMessage
(
int
,
ASN_RRC_BCCH_DL_SCH_Message
*
msg
);
void
receiveRrcMessage
(
int
,
ASN_RRC_DL_CCCH_Message
*
msg
);
void
receiveRrcMessage
(
int
,
ASN_RRC_DL_DCCH_Message
*
msg
);
void
receiveRrcMessage
(
int
,
ASN_RRC_PCCH_Message
*
msg
);
/* RLS Service Access Point */
void
handleRlsSapMessage
(
NwUeRlsToRrc
&
msg
);
};
}
// namespace nr::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