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
d3623907
Commit
d3623907
authored
Apr 17, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RRC paging handling
parent
fee7dfd3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
117 deletions
+27
-117
src/gnb/rrc/channel.cpp
src/gnb/rrc/channel.cpp
+7
-106
src/gnb/rrc/handler.cpp
src/gnb/rrc/handler.cpp
+19
-3
src/gnb/rrc/task.hpp
src/gnb/rrc/task.hpp
+1
-8
No files found.
src/gnb/rrc/channel.cpp
View file @
d3623907
...
...
@@ -28,42 +28,6 @@ void GnbRrcTask::handleUplinkRrc(int ueId, rrc::RrcChannel channel, const OctetS
asn
::
Free
(
asn_DEF_ASN_RRC_BCCH_BCH_Message
,
pdu
);
break
;
}
case
rrc
:
:
RrcChannel
::
BCCH_DL_SCH
:
{
auto
*
pdu
=
rrc
::
encode
::
Decode
<
ASN_RRC_BCCH_DL_SCH_Message
>
(
asn_DEF_ASN_RRC_BCCH_DL_SCH_Message
,
rrcPdu
);
if
(
pdu
==
nullptr
)
m_logger
->
err
(
"RRC BCCH-DL-SCH PDU decoding failed."
);
else
receiveRrcMessage
(
ueId
,
pdu
);
asn
::
Free
(
asn_DEF_ASN_RRC_BCCH_DL_SCH_Message
,
pdu
);
break
;
}
case
rrc
:
:
RrcChannel
::
DL_CCCH
:
{
auto
*
pdu
=
rrc
::
encode
::
Decode
<
ASN_RRC_DL_CCCH_Message
>
(
asn_DEF_ASN_RRC_DL_CCCH_Message
,
rrcPdu
);
if
(
pdu
==
nullptr
)
m_logger
->
err
(
"RRC DL-CCCH PDU decoding failed."
);
else
receiveRrcMessage
(
ueId
,
pdu
);
asn
::
Free
(
asn_DEF_ASN_RRC_DL_CCCH_Message
,
pdu
);
break
;
}
case
rrc
:
:
RrcChannel
::
DL_DCCH
:
{
auto
*
pdu
=
rrc
::
encode
::
Decode
<
ASN_RRC_DL_DCCH_Message
>
(
asn_DEF_ASN_RRC_DL_DCCH_Message
,
rrcPdu
);
if
(
pdu
==
nullptr
)
m_logger
->
err
(
"RRC DL-DCCH PDU decoding failed."
);
else
receiveRrcMessage
(
ueId
,
pdu
);
asn
::
Free
(
asn_DEF_ASN_RRC_DL_DCCH_Message
,
pdu
);
break
;
}
case
rrc
:
:
RrcChannel
::
PCCH
:
{
auto
*
pdu
=
rrc
::
encode
::
Decode
<
ASN_RRC_PCCH_Message
>
(
asn_DEF_ASN_RRC_PCCH_Message
,
rrcPdu
);
if
(
pdu
==
nullptr
)
m_logger
->
err
(
"RRC PCCH PDU decoding failed."
);
else
receiveRrcMessage
(
ueId
,
pdu
);
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
)
...
...
@@ -91,6 +55,11 @@ void GnbRrcTask::handleUplinkRrc(int ueId, rrc::RrcChannel channel, const OctetS
asn
::
Free
(
asn_DEF_ASN_RRC_UL_DCCH_Message
,
pdu
);
break
;
}
case
rrc
:
:
RrcChannel
::
PCCH
:
case
rrc
:
:
RrcChannel
::
BCCH_DL_SCH
:
case
rrc
:
:
RrcChannel
::
DL_CCCH
:
case
rrc
:
:
RrcChannel
::
DL_DCCH
:
break
;
}
}
...
...
@@ -158,7 +127,7 @@ void GnbRrcTask::sendRrcMessage(int ueId, ASN_RRC_DL_DCCH_Message *msg)
m_base
->
rlsTask
->
push
(
w
);
}
void
GnbRrcTask
::
sendRrcMessage
(
int
ueId
,
ASN_RRC_PCCH_Message
*
msg
)
void
GnbRrcTask
::
sendRrcMessage
(
ASN_RRC_PCCH_Message
*
msg
)
{
OctetString
pdu
=
rrc
::
encode
::
EncodeS
(
asn_DEF_ASN_RRC_PCCH_Message
,
msg
);
if
(
pdu
.
length
()
==
0
)
...
...
@@ -168,85 +137,17 @@ void GnbRrcTask::sendRrcMessage(int ueId, ASN_RRC_PCCH_Message *msg)
}
auto
*
w
=
new
NwGnbRrcToRls
(
NwGnbRrcToRls
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
ueId
=
0
;
w
->
channel
=
rrc
::
RrcChannel
::
PCCH
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
rlsTask
->
push
(
w
);
}
void
GnbRrcTask
::
sendRrcMessage
(
int
ueId
,
ASN_RRC_UL_CCCH_Message
*
msg
)
{
OctetString
pdu
=
rrc
::
encode
::
EncodeS
(
asn_DEF_ASN_RRC_UL_CCCH_Message
,
msg
);
if
(
pdu
.
length
()
==
0
)
{
m_logger
->
err
(
"RRC UL-CCCH encoding failed."
);
return
;
}
auto
*
w
=
new
NwGnbRrcToRls
(
NwGnbRrcToRls
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
channel
=
rrc
::
RrcChannel
::
UL_CCCH
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
rlsTask
->
push
(
w
);
}
void
GnbRrcTask
::
sendRrcMessage
(
int
ueId
,
ASN_RRC_UL_CCCH1_Message
*
msg
)
{
OctetString
pdu
=
rrc
::
encode
::
EncodeS
(
asn_DEF_ASN_RRC_UL_CCCH1_Message
,
msg
);
if
(
pdu
.
length
()
==
0
)
{
m_logger
->
err
(
"RRC UL-CCCH1 encoding failed."
);
return
;
}
auto
*
w
=
new
NwGnbRrcToRls
(
NwGnbRrcToRls
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
channel
=
rrc
::
RrcChannel
::
UL_CCCH1
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
rlsTask
->
push
(
w
);
}
void
GnbRrcTask
::
sendRrcMessage
(
int
ueId
,
ASN_RRC_UL_DCCH_Message
*
msg
)
{
OctetString
pdu
=
rrc
::
encode
::
EncodeS
(
asn_DEF_ASN_RRC_UL_DCCH_Message
,
msg
);
if
(
pdu
.
length
()
==
0
)
{
m_logger
->
err
(
"RRC UL-DCCH encoding failed."
);
return
;
}
auto
*
w
=
new
NwGnbRrcToRls
(
NwGnbRrcToRls
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
channel
=
rrc
::
RrcChannel
::
UL_DCCH
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
rlsTask
->
push
(
w
);
}
void
GnbRrcTask
::
receiveRrcMessage
(
int
ueId
,
ASN_RRC_BCCH_BCH_Message
*
msg
)
{
// TODO
}
void
GnbRrcTask
::
receiveRrcMessage
(
int
ueId
,
ASN_RRC_BCCH_DL_SCH_Message
*
msg
)
{
// TODO
}
void
GnbRrcTask
::
receiveRrcMessage
(
int
ueId
,
ASN_RRC_DL_CCCH_Message
*
msg
)
{
// TODO
}
void
GnbRrcTask
::
receiveRrcMessage
(
int
ueId
,
ASN_RRC_DL_DCCH_Message
*
msg
)
{
// TODO
}
void
GnbRrcTask
::
receiveRrcMessage
(
int
ueId
,
ASN_RRC_PCCH_Message
*
msg
)
{
// TODO
}
void
GnbRrcTask
::
receiveRrcMessage
(
int
ueId
,
ASN_RRC_UL_CCCH_Message
*
msg
)
{
if
(
msg
->
message
.
present
!=
ASN_RRC_UL_CCCH_MessageType_PR_c1
)
...
...
src/gnb/rrc/handler.cpp
View file @
d3623907
...
...
@@ -19,6 +19,9 @@
#include <asn/rrc/ASN_RRC_DLInformationTransfer-IEs.h>
#include <asn/rrc/ASN_RRC_DLInformationTransfer.h>
#include <asn/rrc/ASN_RRC_PCCH-Message.h>
#include <asn/rrc/ASN_RRC_Paging.h>
#include <asn/rrc/ASN_RRC_PagingRecord.h>
#include <asn/rrc/ASN_RRC_PagingRecordList.h>
#include <asn/rrc/ASN_RRC_RRCRelease-IEs.h>
#include <asn/rrc/ASN_RRC_RRCRelease.h>
#include <asn/rrc/ASN_RRC_RRCSetup-IEs.h>
...
...
@@ -169,10 +172,23 @@ void GnbRrcTask::handleRadioLinkFailure(int ueId)
m_ueCtx
.
erase
(
ueId
);
}
void
GnbRrcTask
::
handlePaging
(
const
asn
::
Unique
<
ASN_NGAP_FiveG_S_TMSI
>
&
tmsi
,
const
asn
::
Unique
<
ASN_NGAP_TAIListForPaging
>
&
taiList
)
void
GnbRrcTask
::
handlePaging
(
const
OctetString
&
tmsi
,
const
asn
::
Unique
<
ASN_NGAP_TAIListForPaging
>
&
taiList
)
{
// TODO
// Construct and send a Paging message
auto
*
pdu
=
asn
::
New
<
ASN_RRC_PCCH_Message
>
();
pdu
->
message
.
present
=
ASN_RRC_PCCH_MessageType_PR_c1
;
pdu
->
message
.
choice
.
c1
=
asn
::
NewFor
(
pdu
->
message
.
choice
.
c1
);
pdu
->
message
.
choice
.
c1
->
present
=
ASN_RRC_PCCH_MessageType__c1_PR_paging
;
auto
&
paging
=
pdu
->
message
.
choice
.
c1
->
choice
.
paging
=
asn
::
New
<
ASN_RRC_Paging
>
();
auto
*
record
=
asn
::
New
<
ASN_RRC_PagingRecord
>
();
record
->
ue_Identity
.
present
=
ASN_RRC_PagingUE_Identity_PR_ng_5G_S_TMSI
;
asn
::
SetBitString
(
record
->
ue_Identity
.
choice
.
ng_5G_S_TMSI
,
tmsi
);
paging
->
pagingRecordList
=
asn
::
NewFor
(
paging
->
pagingRecordList
);
asn
::
SequenceAdd
(
*
paging
->
pagingRecordList
,
record
);
sendRrcMessage
(
pdu
);
}
}
// namespace nr::gnb
\ No newline at end of file
src/gnb/rrc/task.hpp
View file @
d3623907
...
...
@@ -81,17 +81,10 @@ class GnbRrcTask : public NtsTask
void
sendRrcMessage
(
int
ueId
,
ASN_RRC_BCCH_DL_SCH_Message
*
msg
);
void
sendRrcMessage
(
int
ueId
,
ASN_RRC_DL_CCCH_Message
*
msg
);
void
sendRrcMessage
(
int
ueId
,
ASN_RRC_DL_DCCH_Message
*
msg
);
void
sendRrcMessage
(
int
ueId
,
ASN_RRC_PCCH_Message
*
msg
);
void
sendRrcMessage
(
int
ueId
,
ASN_RRC_UL_CCCH_Message
*
msg
);
void
sendRrcMessage
(
int
ueId
,
ASN_RRC_UL_CCCH1_Message
*
msg
);
void
sendRrcMessage
(
int
ueId
,
ASN_RRC_UL_DCCH_Message
*
msg
);
void
sendRrcMessage
(
ASN_RRC_PCCH_Message
*
msg
);
/* RRC channel receive message */
void
receiveRrcMessage
(
int
ueId
,
ASN_RRC_BCCH_BCH_Message
*
msg
);
void
receiveRrcMessage
(
int
ueId
,
ASN_RRC_BCCH_DL_SCH_Message
*
msg
);
void
receiveRrcMessage
(
int
ueId
,
ASN_RRC_DL_CCCH_Message
*
msg
);
void
receiveRrcMessage
(
int
ueId
,
ASN_RRC_DL_DCCH_Message
*
msg
);
void
receiveRrcMessage
(
int
ueId
,
ASN_RRC_PCCH_Message
*
msg
);
void
receiveRrcMessage
(
int
ueId
,
ASN_RRC_UL_CCCH_Message
*
msg
);
void
receiveRrcMessage
(
int
ueId
,
ASN_RRC_UL_CCCH1_Message
*
msg
);
void
receiveRrcMessage
(
int
ueId
,
ASN_RRC_UL_DCCH_Message
*
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