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
bf553cba
Commit
bf553cba
authored
Apr 04, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE SRA dev.
parent
bf351954
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
64 additions
and
24 deletions
+64
-24
src/gnb/nts.hpp
src/gnb/nts.hpp
+17
-0
src/gnb/rrc/channel.cpp
src/gnb/rrc/channel.cpp
+17
-17
src/gnb/sra/handler.cpp
src/gnb/sra/handler.cpp
+16
-7
src/gnb/sra/task.cpp
src/gnb/sra/task.cpp
+12
-0
src/gnb/sra/task.hpp
src/gnb/sra/task.hpp
+1
-0
src/utils/nts.hpp
src/utils/nts.hpp
+1
-0
No files found.
src/gnb/nts.hpp
View file @
bf553cba
...
...
@@ -80,6 +80,23 @@ struct NwGnbRrcToMr : NtsMessage
}
};
struct
NwGnbRrcToSra
:
NtsMessage
{
enum
PR
{
RRC_PDU_DELIVERY
,
}
present
;
// RRC_PDU_DELIVERY
int
ueId
{};
rrc
::
RrcChannel
channel
{};
OctetString
pdu
{};
explicit
NwGnbRrcToSra
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
GNB_RRC_TO_SRA
),
present
(
present
)
{
}
};
struct
NwGnbNgapToRrc
:
NtsMessage
{
enum
PR
...
...
src/gnb/rrc/channel.cpp
View file @
bf553cba
...
...
@@ -9,8 +9,8 @@
#include "task.hpp"
#include <asn/rrc/ASN_RRC_UL-CCCH-Message.h>
#include <asn/rrc/ASN_RRC_UL-DCCH-Message.h>
#include <gnb/sra/task.hpp>
#include <rrc/encode.hpp>
#include <gnb/mr/task.hpp>
namespace
nr
::
gnb
{
...
...
@@ -103,11 +103,11 @@ void GnbRrcTask::sendRrcMessage(int ueId, ASN_RRC_BCCH_BCH_Message *msg)
return
;
}
auto
*
w
=
new
NwGnbRrcTo
Mr
(
NwGnbRrcToMr
::
RRC_PDU_DELIVERY
);
auto
*
w
=
new
NwGnbRrcTo
Sra
(
NwGnbRrcToSra
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
channel
=
rrc
::
RrcChannel
::
BCCH_BCH
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
mr
Task
->
push
(
w
);
m_base
->
sra
Task
->
push
(
w
);
}
void
GnbRrcTask
::
sendRrcMessage
(
int
ueId
,
ASN_RRC_BCCH_DL_SCH_Message
*
msg
)
...
...
@@ -119,11 +119,11 @@ void GnbRrcTask::sendRrcMessage(int ueId, ASN_RRC_BCCH_DL_SCH_Message *msg)
return
;
}
auto
*
w
=
new
NwGnbRrcTo
Mr
(
NwGnbRrcToMr
::
RRC_PDU_DELIVERY
);
auto
*
w
=
new
NwGnbRrcTo
Sra
(
NwGnbRrcToSra
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
channel
=
rrc
::
RrcChannel
::
BCCH_DL_SCH
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
mr
Task
->
push
(
w
);
m_base
->
sra
Task
->
push
(
w
);
}
void
GnbRrcTask
::
sendRrcMessage
(
int
ueId
,
ASN_RRC_DL_CCCH_Message
*
msg
)
...
...
@@ -135,11 +135,11 @@ void GnbRrcTask::sendRrcMessage(int ueId, ASN_RRC_DL_CCCH_Message *msg)
return
;
}
auto
*
w
=
new
NwGnbRrcTo
Mr
(
NwGnbRrcToMr
::
RRC_PDU_DELIVERY
);
auto
*
w
=
new
NwGnbRrcTo
Sra
(
NwGnbRrcToSra
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
channel
=
rrc
::
RrcChannel
::
DL_CCCH
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
mr
Task
->
push
(
w
);
m_base
->
sra
Task
->
push
(
w
);
}
void
GnbRrcTask
::
sendRrcMessage
(
int
ueId
,
ASN_RRC_DL_DCCH_Message
*
msg
)
...
...
@@ -151,11 +151,11 @@ void GnbRrcTask::sendRrcMessage(int ueId, ASN_RRC_DL_DCCH_Message *msg)
return
;
}
auto
*
w
=
new
NwGnbRrcTo
Mr
(
NwGnbRrcToMr
::
RRC_PDU_DELIVERY
);
auto
*
w
=
new
NwGnbRrcTo
Sra
(
NwGnbRrcToSra
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
channel
=
rrc
::
RrcChannel
::
DL_DCCH
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
mr
Task
->
push
(
w
);
m_base
->
sra
Task
->
push
(
w
);
}
void
GnbRrcTask
::
sendRrcMessage
(
int
ueId
,
ASN_RRC_PCCH_Message
*
msg
)
...
...
@@ -167,11 +167,11 @@ void GnbRrcTask::sendRrcMessage(int ueId, ASN_RRC_PCCH_Message *msg)
return
;
}
auto
*
w
=
new
NwGnbRrcTo
Mr
(
NwGnbRrcToMr
::
RRC_PDU_DELIVERY
);
auto
*
w
=
new
NwGnbRrcTo
Sra
(
NwGnbRrcToSra
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
channel
=
rrc
::
RrcChannel
::
PCCH
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
mr
Task
->
push
(
w
);
m_base
->
sra
Task
->
push
(
w
);
}
void
GnbRrcTask
::
sendRrcMessage
(
int
ueId
,
ASN_RRC_UL_CCCH_Message
*
msg
)
...
...
@@ -183,11 +183,11 @@ void GnbRrcTask::sendRrcMessage(int ueId, ASN_RRC_UL_CCCH_Message *msg)
return
;
}
auto
*
w
=
new
NwGnbRrcTo
Mr
(
NwGnbRrcToMr
::
RRC_PDU_DELIVERY
);
auto
*
w
=
new
NwGnbRrcTo
Sra
(
NwGnbRrcToSra
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
channel
=
rrc
::
RrcChannel
::
UL_CCCH
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
mr
Task
->
push
(
w
);
m_base
->
sra
Task
->
push
(
w
);
}
void
GnbRrcTask
::
sendRrcMessage
(
int
ueId
,
ASN_RRC_UL_CCCH1_Message
*
msg
)
...
...
@@ -199,11 +199,11 @@ void GnbRrcTask::sendRrcMessage(int ueId, ASN_RRC_UL_CCCH1_Message *msg)
return
;
}
auto
*
w
=
new
NwGnbRrcTo
Mr
(
NwGnbRrcToMr
::
RRC_PDU_DELIVERY
);
auto
*
w
=
new
NwGnbRrcTo
Sra
(
NwGnbRrcToSra
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
channel
=
rrc
::
RrcChannel
::
UL_CCCH1
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
mr
Task
->
push
(
w
);
m_base
->
sra
Task
->
push
(
w
);
}
void
GnbRrcTask
::
sendRrcMessage
(
int
ueId
,
ASN_RRC_UL_DCCH_Message
*
msg
)
...
...
@@ -215,11 +215,11 @@ void GnbRrcTask::sendRrcMessage(int ueId, ASN_RRC_UL_DCCH_Message *msg)
return
;
}
auto
*
w
=
new
NwGnbRrcTo
Mr
(
NwGnbRrcToMr
::
RRC_PDU_DELIVERY
);
auto
*
w
=
new
NwGnbRrcTo
Sra
(
NwGnbRrcToSra
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
channel
=
rrc
::
RrcChannel
::
UL_DCCH
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
mr
Task
->
push
(
w
);
m_base
->
sra
Task
->
push
(
w
);
}
void
GnbRrcTask
::
receiveRrcMessage
(
int
ueId
,
ASN_RRC_BCCH_BCH_Message
*
msg
)
...
...
src/gnb/sra/handler.cpp
View file @
bf553cba
...
...
@@ -27,7 +27,7 @@ static int EstimateSimulatedDbm(const Vector3 &myPos, const Vector3 &uePos)
namespace
nr
::
gnb
{
void
GnbSraTask
::
handleCellInfoRequest
(
int
ueId
,
const
sra
::
SraCellInfoRequest
&
msg
)
void
GnbSraTask
::
handleCellInfoRequest
(
int
ueId
,
const
sra
::
SraCellInfoRequest
&
msg
)
{
int
dbm
=
EstimateSimulatedDbm
(
m_base
->
config
->
phyLocation
,
msg
.
simPos
);
if
(
dbm
<
MIN_ALLOWED_DBM
)
...
...
@@ -50,13 +50,22 @@ void GnbSraTask::handleCellInfoRequest(int ueId,const sra::SraCellInfoRequest &m
void
GnbSraTask
::
handleUplinkPduDelivery
(
int
ueId
,
sra
::
SraPduDelivery
&
msg
)
{
if
(
msg
.
pduType
==
sra
::
EPduType
::
RRC
)
{
auto
*
nw
=
new
NwGnbSraToRrc
(
NwGnbSraToRrc
::
RRC_PDU_DELIVERY
);
nw
->
ueId
=
ueId
;
nw
->
channel
=
static_cast
<
rrc
::
RrcChannel
>
(
msg
.
payload
.
get4I
(
0
));
nw
->
pdu
=
std
::
move
(
msg
.
pdu
);
m_base
->
rrcTask
->
push
(
nw
);
{
auto
*
nw
=
new
NwGnbSraToRrc
(
NwGnbSraToRrc
::
RRC_PDU_DELIVERY
);
nw
->
ueId
=
ueId
;
nw
->
channel
=
static_cast
<
rrc
::
RrcChannel
>
(
msg
.
payload
.
get4I
(
0
));
nw
->
pdu
=
std
::
move
(
msg
.
pdu
);
m_base
->
rrcTask
->
push
(
nw
);
}
}
void
GnbSraTask
::
handleDownlinkDelivery
(
int
ueId
,
sra
::
EPduType
pduType
,
OctetString
&&
pdu
,
OctetString
&&
payload
)
{
sra
::
SraPduDelivery
resp
{
m_sti
};
resp
.
pduType
=
pduType
;
resp
.
pdu
=
std
::
move
(
pdu
);
resp
.
payload
=
std
::
move
(
payload
);
sendSraMessage
(
ueId
,
resp
);
}
}
// namespace nr::gnb
src/gnb/sra/task.cpp
View file @
bf553cba
...
...
@@ -51,6 +51,18 @@ void GnbSraTask::onLoop()
switch
(
msg
->
msgType
)
{
case
NtsMessageType
:
:
GNB_RRC_TO_SRA
:
{
auto
*
w
=
dynamic_cast
<
NwGnbRrcToSra
*>
(
msg
);
switch
(
w
->
present
)
{
case
NwGnbRrcToSra
:
:
RRC_PDU_DELIVERY
:
{
handleDownlinkDelivery
(
w
->
ueId
,
sra
::
EPduType
::
RRC
,
std
::
move
(
w
->
pdu
),
OctetString
::
FromOctet4
(
static_cast
<
int
>
(
w
->
channel
)));
break
;
}
}
break
;
}
case
NtsMessageType
:
:
UDP_SERVER_RECEIVE
:
{
auto
*
w
=
dynamic_cast
<
udp
::
NwUdpServerReceive
*>
(
msg
);
auto
sraMsg
=
sra
::
DecodeSraMessage
(
OctetView
{
w
->
packet
});
...
...
src/gnb/sra/task.hpp
View file @
bf553cba
...
...
@@ -52,6 +52,7 @@ class GnbSraTask : public NtsTask
private:
/* Handler */
void
handleCellInfoRequest
(
int
ueId
,
const
sra
::
SraCellInfoRequest
&
msg
);
void
handleUplinkPduDelivery
(
int
ueId
,
sra
::
SraPduDelivery
&
msg
);
void
handleDownlinkDelivery
(
int
ueId
,
sra
::
EPduType
pduType
,
OctetString
&&
pdu
,
OctetString
&&
payload
);
private:
/* UE Management */
int
updateUeInfo
(
const
InetAddress
&
addr
,
uint64_t
sti
);
...
...
src/utils/nts.hpp
View file @
bf553cba
...
...
@@ -38,6 +38,7 @@ enum class NtsMessageType
GNB_MR_TO_RRC
,
GNB_SRA_TO_RRC
,
GNB_RRC_TO_MR
,
GNB_RRC_TO_SRA
,
GNB_NGAP_TO_RRC
,
GNB_RRC_TO_NGAP
,
GNB_NGAP_TO_GTP
,
...
...
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