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
80bf2caa
Commit
80bf2caa
authored
May 13, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RRC developments
parent
19e140bd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
33 deletions
+46
-33
src/gnb/rrc/broadcast.cpp
src/gnb/rrc/broadcast.cpp
+29
-1
src/gnb/rrc/channel.cpp
src/gnb/rrc/channel.cpp
+2
-2
src/gnb/rrc/task.hpp
src/gnb/rrc/task.hpp
+4
-1
src/ue/rls/task.hpp
src/ue/rls/task.hpp
+11
-29
No files found.
src/gnb/rrc/broadcast.cpp
View file @
80bf2caa
...
@@ -9,11 +9,35 @@
...
@@ -9,11 +9,35 @@
#include "task.hpp"
#include "task.hpp"
#include <gnb/ngap/task.hpp>
#include <gnb/ngap/task.hpp>
#include <lib/asn/utils.hpp>
#include <lib/rrc/encode.hpp>
#include <lib/rrc/encode.hpp>
#include <asn/rrc/ASN_RRC_MIB.h>
namespace
nr
::
gnb
namespace
nr
::
gnb
{
{
static
ASN_RRC_BCCH_BCH_Message
*
ConstructMibMessage
(
bool
barred
,
bool
intraFreqReselectAllowed
)
{
auto
*
pdu
=
asn
::
New
<
ASN_RRC_BCCH_BCH_Message
>
();
pdu
->
message
.
present
=
ASN_RRC_BCCH_BCH_MessageType_PR_mib
;
pdu
->
message
.
choice
.
mib
=
asn
::
New
<
ASN_RRC_MIB
>
();
auto
&
mib
=
*
pdu
->
message
.
choice
.
mib
;
asn
::
SetBitStringInt
<
6
>
(
0
,
mib
.
systemFrameNumber
);
mib
.
subCarrierSpacingCommon
=
ASN_RRC_MIB__subCarrierSpacingCommon_scs15or60
;
mib
.
ssb_SubcarrierOffset
=
0
;
mib
.
dmrs_TypeA_Position
=
ASN_RRC_MIB__dmrs_TypeA_Position_pos2
;
mib
.
cellBarred
=
barred
?
ASN_RRC_MIB__cellBarred_barred
:
ASN_RRC_MIB__cellBarred_notBarred
;
mib
.
intraFreqReselection
=
intraFreqReselectAllowed
?
ASN_RRC_MIB__intraFreqReselection_allowed
:
ASN_RRC_MIB__intraFreqReselection_notAllowed
;
asn
::
SetBitStringInt
<
1
>
(
0
,
mib
.
spare
);
mib
.
pdcch_ConfigSIB1
.
controlResourceSetZero
=
0
;
mib
.
pdcch_ConfigSIB1
.
searchSpaceZero
=
0
;
return
pdu
;
}
void
GnbRrcTask
::
onBroadcastTimerExpired
()
void
GnbRrcTask
::
onBroadcastTimerExpired
()
{
{
triggerSysInfoBroadcast
();
triggerSysInfoBroadcast
();
...
@@ -21,7 +45,11 @@ void GnbRrcTask::onBroadcastTimerExpired()
...
@@ -21,7 +45,11 @@ void GnbRrcTask::onBroadcastTimerExpired()
void
GnbRrcTask
::
triggerSysInfoBroadcast
()
void
GnbRrcTask
::
triggerSysInfoBroadcast
()
{
{
// TODO
ASN_RRC_BCCH_BCH_Message
*
msg
=
ConstructMibMessage
(
m_isBarred
,
m_intraFreqReselectAllowed
);
sendRrcMessage
(
msg
);
asn
::
Free
(
asn_DEF_ASN_RRC_BCCH_BCH_Message
,
msg
);
}
}
}
// namespace nr::gnb
}
// namespace nr::gnb
\ No newline at end of file
src/gnb/rrc/channel.cpp
View file @
80bf2caa
...
@@ -65,7 +65,7 @@ void GnbRrcTask::handleUplinkRrc(int ueId, rrc::RrcChannel channel, const OctetS
...
@@ -65,7 +65,7 @@ void GnbRrcTask::handleUplinkRrc(int ueId, rrc::RrcChannel channel, const OctetS
}
}
}
}
void
GnbRrcTask
::
sendRrcMessage
(
int
ueId
,
ASN_RRC_BCCH_BCH_Message
*
msg
)
void
GnbRrcTask
::
sendRrcMessage
(
ASN_RRC_BCCH_BCH_Message
*
msg
)
{
{
OctetString
pdu
=
rrc
::
encode
::
EncodeS
(
asn_DEF_ASN_RRC_BCCH_BCH_Message
,
msg
);
OctetString
pdu
=
rrc
::
encode
::
EncodeS
(
asn_DEF_ASN_RRC_BCCH_BCH_Message
,
msg
);
if
(
pdu
.
length
()
==
0
)
if
(
pdu
.
length
()
==
0
)
...
@@ -75,7 +75,7 @@ void GnbRrcTask::sendRrcMessage(int ueId, ASN_RRC_BCCH_BCH_Message *msg)
...
@@ -75,7 +75,7 @@ void GnbRrcTask::sendRrcMessage(int ueId, ASN_RRC_BCCH_BCH_Message *msg)
}
}
auto
*
w
=
new
NwGnbRrcToRls
(
NwGnbRrcToRls
::
RRC_PDU_DELIVERY
);
auto
*
w
=
new
NwGnbRrcToRls
(
NwGnbRrcToRls
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
ueId
=
0
;
w
->
channel
=
rrc
::
RrcChannel
::
BCCH_BCH
;
w
->
channel
=
rrc
::
RrcChannel
::
BCCH_BCH
;
w
->
pdu
=
std
::
move
(
pdu
);
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
rlsTask
->
push
(
w
);
m_base
->
rlsTask
->
push
(
w
);
...
...
src/gnb/rrc/task.hpp
View file @
80bf2caa
...
@@ -46,6 +46,9 @@ class GnbRrcTask : public NtsTask
...
@@ -46,6 +46,9 @@ class GnbRrcTask : public NtsTask
std
::
unordered_map
<
int
,
RrcUeContext
*>
m_ueCtx
;
std
::
unordered_map
<
int
,
RrcUeContext
*>
m_ueCtx
;
int
m_tidCounter
;
int
m_tidCounter
;
bool
m_isBarred
=
false
;
bool
m_intraFreqReselectAllowed
=
false
;
friend
class
GnbCmdHandler
;
friend
class
GnbCmdHandler
;
public:
public:
...
@@ -79,7 +82,7 @@ class GnbRrcTask : public NtsTask
...
@@ -79,7 +82,7 @@ class GnbRrcTask : public NtsTask
void
receiveRrcSetupComplete
(
int
ueId
,
const
ASN_RRC_RRCSetupComplete
&
msg
);
void
receiveRrcSetupComplete
(
int
ueId
,
const
ASN_RRC_RRCSetupComplete
&
msg
);
/* RRC channel send message */
/* RRC channel send message */
void
sendRrcMessage
(
int
ueId
,
ASN_RRC_BCCH_BCH_Message
*
msg
);
void
sendRrcMessage
(
ASN_RRC_BCCH_BCH_Message
*
msg
);
void
sendRrcMessage
(
int
ueId
,
ASN_RRC_BCCH_DL_SCH_Message
*
msg
);
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_CCCH_Message
*
msg
);
void
sendRrcMessage
(
int
ueId
,
ASN_RRC_DL_DCCH_Message
*
msg
);
void
sendRrcMessage
(
int
ueId
,
ASN_RRC_DL_DCCH_Message
*
msg
);
...
...
src/ue/rls/task.hpp
View file @
80bf2caa
...
@@ -8,18 +8,22 @@
...
@@ -8,18 +8,22 @@
#pragma once
#pragma once
#include
<lib/rrc/rrc.hpp>
#include
"ctl_task.hpp"
#include
<lib/udp/server_task.hpp>
#include
"udp_task.hpp"
#include <lib/rls/rls_pdu.hpp>
#include <memory>
#include <memory>
#include <optional>
#include <optional>
#include <thread>
#include <thread>
#include <ue/types.hpp>
#include <unordered_map>
#include <unordered_map>
#include <vector>
#include <lib/rls/rls_pdu.hpp>
#include <lib/rrc/rrc.hpp>
#include <lib/udp/server_task.hpp>
#include <ue/types.hpp>
#include <utils/common_types.hpp>
#include <utils/common_types.hpp>
#include <utils/logger.hpp>
#include <utils/logger.hpp>
#include <utils/nts.hpp>
#include <utils/nts.hpp>
#include <vector>
namespace
nr
::
ue
namespace
nr
::
ue
{
{
...
@@ -29,16 +33,10 @@ class UeRlsTask : public NtsTask
...
@@ -29,16 +33,10 @@ class UeRlsTask : public NtsTask
private:
private:
TaskBase
*
m_base
;
TaskBase
*
m_base
;
std
::
unique_ptr
<
Logger
>
m_logger
;
std
::
unique_ptr
<
Logger
>
m_logger
;
udp
::
UdpServerTask
*
m_udpTask
;
std
::
vector
<
InetAddress
>
m_cellSearchSpace
;
std
::
unordered_map
<
GlobalNci
,
UeCellMeasurement
>
m_pendingMeasurements
;
std
::
unordered_map
<
GlobalNci
,
UeCellMeasurement
>
m_activeMeasurements
;
bool
m_pendingPlmnResponse
;
int64_t
m_measurementPeriod
;
uint64_t
m_sti
;
uint64_t
m_sti
;
std
::
optional
<
UeCellInfo
>
m_servingCell
;
RlsUdpTask
*
m_udpTask
;
RlsControlTask
*
m_ctlTask
;
friend
class
UeCmdHandler
;
friend
class
UeCmdHandler
;
...
@@ -50,22 +48,6 @@ class UeRlsTask : public NtsTask
...
@@ -50,22 +48,6 @@ class UeRlsTask : public NtsTask
void
onStart
()
override
;
void
onStart
()
override
;
void
onLoop
()
override
;
void
onLoop
()
override
;
void
onQuit
()
override
;
void
onQuit
()
override
;
private:
/* Base */
void
slowDownMeasurements
();
private:
/* Transport */
void
receiveRlsMessage
(
const
InetAddress
&
address
,
rls
::
RlsMessage
&
msg
);
void
sendRlsMessage
(
const
InetAddress
&
address
,
const
rls
::
RlsMessage
&
msg
);
void
deliverUplinkPdu
(
rls
::
EPduType
pduType
,
OctetString
&&
pdu
,
OctetString
&&
payload
);
void
deliverDownlinkPdu
(
rls
::
RlsPduDelivery
&
msg
);
private:
/* Measurement */
void
onMeasurement
();
void
receiveCellInfoResponse
(
const
rls
::
RlsCellInfoResponse
&
msg
);
void
onCoverageChange
(
const
std
::
vector
<
GlobalNci
>
&
entered
,
const
std
::
vector
<
GlobalNci
>
&
exited
);
void
plmnSearchRequested
();
void
handleCellSelectionCommand
(
const
GlobalNci
&
cellId
,
bool
isSuitable
);
};
};
}
// namespace nr::ue
}
// namespace nr::ue
\ No newline at end of file
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