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
2a4de4ba
Commit
2a4de4ba
authored
Apr 17, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE RRC refactor
parent
0c9771a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
123 deletions
+3
-123
src/ue/rrc/channel.cpp
src/ue/rrc/channel.cpp
+3
-116
src/ue/rrc/task.hpp
src/ue/rrc/task.hpp
+0
-7
No files found.
src/ue/rrc/channel.cpp
View file @
2a4de4ba
...
...
@@ -68,34 +68,11 @@ void UeRrcTask::handleDownlinkRrc(rrc::RrcChannel channel, const OctetString &rr
asn
::
Free
(
asn_DEF_ASN_RRC_PCCH_Message
,
pdu
);
break
;
}
case
rrc
:
:
RrcChannel
::
UL_CCCH
:
{
auto
*
pdu
=
rrc
::
encode
::
Decode
<
ASN_RRC_UL_CCCH_Message
>
(
asn_DEF_ASN_RRC_UL_CCCH_Message
,
rrcPdu
);
if
(
pdu
==
nullptr
)
m_logger
->
err
(
"RRC UL-CCCH PDU decoding failed."
);
else
receiveRrcMessage
(
pdu
);
asn
::
Free
(
asn_DEF_ASN_RRC_UL_CCCH_Message
,
pdu
);
break
;
}
case
rrc
:
:
RrcChannel
::
UL_CCCH1
:
{
auto
*
pdu
=
rrc
::
encode
::
Decode
<
ASN_RRC_UL_CCCH1_Message
>
(
asn_DEF_ASN_RRC_UL_CCCH1_Message
,
rrcPdu
);
if
(
pdu
==
nullptr
)
m_logger
->
err
(
"RRC UL-CCCH1 PDU decoding failed."
);
else
receiveRrcMessage
(
pdu
);
asn
::
Free
(
asn_DEF_ASN_RRC_UL_CCCH1_Message
,
pdu
);
case
rrc
:
:
RrcChannel
::
UL_CCCH
:
case
rrc
:
:
RrcChannel
::
UL_CCCH1
:
case
rrc
:
:
RrcChannel
::
UL_DCCH
:
break
;
}
case
rrc
:
:
RrcChannel
::
UL_DCCH
:
{
auto
*
pdu
=
rrc
::
encode
::
Decode
<
ASN_RRC_UL_DCCH_Message
>
(
asn_DEF_ASN_RRC_UL_DCCH_Message
,
rrcPdu
);
if
(
pdu
==
nullptr
)
m_logger
->
err
(
"RRC UL-DCCH PDU decoding failed."
);
else
receiveRrcMessage
(
pdu
);
asn
::
Free
(
asn_DEF_ASN_RRC_UL_DCCH_Message
,
pdu
);
break
;
}
}
}
void
UeRrcTask
::
sendRrcMessage
(
ASN_RRC_BCCH_BCH_Message
*
msg
)
...
...
@@ -113,66 +90,6 @@ void UeRrcTask::sendRrcMessage(ASN_RRC_BCCH_BCH_Message *msg)
m_base
->
rlsTask
->
push
(
nw
);
}
void
UeRrcTask
::
sendRrcMessage
(
ASN_RRC_BCCH_DL_SCH_Message
*
msg
)
{
OctetString
pdu
=
rrc
::
encode
::
EncodeS
(
asn_DEF_ASN_RRC_BCCH_DL_SCH_Message
,
msg
);
if
(
pdu
.
length
()
==
0
)
{
m_logger
->
err
(
"RRC BCCH-DL-SCH encoding failed."
);
return
;
}
auto
*
nw
=
new
NwUeRrcToRls
(
NwUeRrcToRls
::
RRC_PDU_DELIVERY
);
nw
->
channel
=
rrc
::
RrcChannel
::
BCCH_DL_SCH
;
nw
->
pdu
=
std
::
move
(
pdu
);
m_base
->
rlsTask
->
push
(
nw
);
}
void
UeRrcTask
::
sendRrcMessage
(
ASN_RRC_DL_CCCH_Message
*
msg
)
{
OctetString
pdu
=
rrc
::
encode
::
EncodeS
(
asn_DEF_ASN_RRC_DL_CCCH_Message
,
msg
);
if
(
pdu
.
length
()
==
0
)
{
m_logger
->
err
(
"RRC DL-CCCH encoding failed."
);
return
;
}
auto
*
nw
=
new
NwUeRrcToRls
(
NwUeRrcToRls
::
RRC_PDU_DELIVERY
);
nw
->
channel
=
rrc
::
RrcChannel
::
DL_CCCH
;
nw
->
pdu
=
std
::
move
(
pdu
);
m_base
->
rlsTask
->
push
(
nw
);
}
void
UeRrcTask
::
sendRrcMessage
(
ASN_RRC_DL_DCCH_Message
*
msg
)
{
OctetString
pdu
=
rrc
::
encode
::
EncodeS
(
asn_DEF_ASN_RRC_DL_DCCH_Message
,
msg
);
if
(
pdu
.
length
()
==
0
)
{
m_logger
->
err
(
"RRC DL-DCCH encoding failed."
);
return
;
}
auto
*
nw
=
new
NwUeRrcToRls
(
NwUeRrcToRls
::
RRC_PDU_DELIVERY
);
nw
->
channel
=
rrc
::
RrcChannel
::
DL_DCCH
;
nw
->
pdu
=
std
::
move
(
pdu
);
m_base
->
rlsTask
->
push
(
nw
);
}
void
UeRrcTask
::
sendRrcMessage
(
ASN_RRC_PCCH_Message
*
msg
)
{
OctetString
pdu
=
rrc
::
encode
::
EncodeS
(
asn_DEF_ASN_RRC_PCCH_Message
,
msg
);
if
(
pdu
.
length
()
==
0
)
{
m_logger
->
err
(
"RRC PCCH encoding failed."
);
return
;
}
auto
*
nw
=
new
NwUeRrcToRls
(
NwUeRrcToRls
::
RRC_PDU_DELIVERY
);
nw
->
channel
=
rrc
::
RrcChannel
::
PCCH
;
nw
->
pdu
=
std
::
move
(
pdu
);
m_base
->
rlsTask
->
push
(
nw
);
}
void
UeRrcTask
::
sendRrcMessage
(
ASN_RRC_UL_CCCH_Message
*
msg
)
{
OctetString
pdu
=
rrc
::
encode
::
EncodeS
(
asn_DEF_ASN_RRC_UL_CCCH_Message
,
msg
);
...
...
@@ -271,34 +188,4 @@ void UeRrcTask::receiveRrcMessage(ASN_RRC_PCCH_Message *msg)
// TODO
}
void
UeRrcTask
::
receiveRrcMessage
(
ASN_RRC_UL_CCCH_Message
*
msg
)
{
if
(
msg
->
message
.
present
!=
ASN_RRC_UL_CCCH_MessageType_PR_c1
)
return
;
auto
&
c1
=
msg
->
message
.
choice
.
c1
;
switch
(
c1
->
present
)
{
case
ASN_RRC_UL_CCCH_MessageType__c1_PR_NOTHING
:
break
;
case
ASN_RRC_UL_CCCH_MessageType__c1_PR_rrcSetupRequest
:
break
;
// todo
case
ASN_RRC_UL_CCCH_MessageType__c1_PR_rrcResumeRequest
:
break
;
// todo
case
ASN_RRC_UL_CCCH_MessageType__c1_PR_rrcReestablishmentRequest
:
break
;
// todo
case
ASN_RRC_UL_CCCH_MessageType__c1_PR_rrcSystemInfoRequest
:
break
;
// todo
}
}
void
UeRrcTask
::
receiveRrcMessage
(
ASN_RRC_UL_CCCH1_Message
*
msg
)
{
// TODO
}
void
UeRrcTask
::
receiveRrcMessage
(
ASN_RRC_UL_DCCH_Message
*
msg
)
{
}
}
// namespace nr::ue
src/ue/rrc/task.hpp
View file @
2a4de4ba
...
...
@@ -78,10 +78,6 @@ class UeRrcTask : public NtsTask
/* RRC channel send message */
void
sendRrcMessage
(
ASN_RRC_BCCH_BCH_Message
*
msg
);
void
sendRrcMessage
(
ASN_RRC_BCCH_DL_SCH_Message
*
msg
);
void
sendRrcMessage
(
ASN_RRC_DL_CCCH_Message
*
msg
);
void
sendRrcMessage
(
ASN_RRC_DL_DCCH_Message
*
msg
);
void
sendRrcMessage
(
ASN_RRC_PCCH_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
);
...
...
@@ -92,9 +88,6 @@ class UeRrcTask : public NtsTask
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
(
ASN_RRC_UL_CCCH_Message
*
msg
);
void
receiveRrcMessage
(
ASN_RRC_UL_CCCH1_Message
*
msg
);
void
receiveRrcMessage
(
ASN_RRC_UL_DCCH_Message
*
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