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
de9a3790
Commit
de9a3790
authored
Apr 04, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SRA dev.
parent
d526e59f
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
214 additions
and
214 deletions
+214
-214
src/gnb/app/cmd_handler.cpp
src/gnb/app/cmd_handler.cpp
+4
-4
src/gnb/gnb.cpp
src/gnb/gnb.cpp
+5
-6
src/gnb/gtp/task.cpp
src/gnb/gtp/task.cpp
+6
-6
src/gnb/nts.hpp
src/gnb/nts.hpp
+8
-8
src/gnb/rls/handler.cpp
src/gnb/rls/handler.cpp
+9
-9
src/gnb/rls/management.cpp
src/gnb/rls/management.cpp
+3
-3
src/gnb/rls/task.cpp
src/gnb/rls/task.cpp
+17
-16
src/gnb/rls/task.hpp
src/gnb/rls/task.hpp
+9
-9
src/gnb/rls/transport.cpp
src/gnb/rls/transport.cpp
+7
-7
src/gnb/rrc/channel.cpp
src/gnb/rrc/channel.cpp
+17
-17
src/gnb/rrc/task.cpp
src/gnb/rrc/task.cpp
+6
-6
src/gnb/types.hpp
src/gnb/types.hpp
+2
-2
src/ue/app/cmd_handler.cpp
src/ue/app/cmd_handler.cpp
+6
-6
src/ue/app/task.cpp
src/ue/app/task.cpp
+6
-6
src/ue/nts.hpp
src/ue/nts.hpp
+8
-8
src/ue/rls/measurement.cpp
src/ue/rls/measurement.cpp
+10
-10
src/ue/rls/task.cpp
src/ue/rls/task.cpp
+18
-18
src/ue/rls/task.hpp
src/ue/rls/task.hpp
+9
-9
src/ue/rls/transport.cpp
src/ue/rls/transport.cpp
+15
-15
src/ue/rrc/channel.cpp
src/ue/rrc/channel.cpp
+17
-17
src/ue/rrc/task.cpp
src/ue/rrc/task.cpp
+10
-10
src/ue/types.hpp
src/ue/types.hpp
+2
-2
src/ue/ue.cpp
src/ue/ue.cpp
+5
-5
src/urs/rls_pdu.cpp
src/urs/rls_pdu.cpp
+4
-4
src/urs/rls_pdu.hpp
src/urs/rls_pdu.hpp
+3
-3
src/utils/nts.hpp
src/utils/nts.hpp
+8
-8
No files found.
src/gnb/app/cmd_handler.cpp
View file @
de9a3790
...
...
@@ -12,7 +12,7 @@
#include <gnb/gtp/task.hpp>
#include <gnb/ngap/task.hpp>
#include <gnb/rrc/task.hpp>
#include <gnb/
sra
/task.hpp>
#include <gnb/
rls
/task.hpp>
#include <gnb/sctp/task.hpp>
#include <utils/common.hpp>
#include <utils/printer.hpp>
...
...
@@ -36,7 +36,7 @@ void GnbCmdHandler::sendError(const InetAddress &address, const std::string &out
void
GnbCmdHandler
::
pauseTasks
()
{
m_base
->
gtpTask
->
requestPause
();
m_base
->
sra
Task
->
requestPause
();
m_base
->
rls
Task
->
requestPause
();
m_base
->
ngapTask
->
requestPause
();
m_base
->
rrcTask
->
requestPause
();
m_base
->
sctpTask
->
requestPause
();
...
...
@@ -45,7 +45,7 @@ void GnbCmdHandler::pauseTasks()
void
GnbCmdHandler
::
unpauseTasks
()
{
m_base
->
gtpTask
->
requestUnpause
();
m_base
->
sra
Task
->
requestUnpause
();
m_base
->
rls
Task
->
requestUnpause
();
m_base
->
ngapTask
->
requestUnpause
();
m_base
->
rrcTask
->
requestUnpause
();
m_base
->
sctpTask
->
requestUnpause
();
...
...
@@ -55,7 +55,7 @@ bool GnbCmdHandler::isAllPaused()
{
if
(
!
m_base
->
gtpTask
->
isPauseConfirmed
())
return
false
;
if
(
!
m_base
->
sra
Task
->
isPauseConfirmed
())
if
(
!
m_base
->
rls
Task
->
isPauseConfirmed
())
return
false
;
if
(
!
m_base
->
ngapTask
->
isPauseConfirmed
())
return
false
;
...
...
src/gnb/gnb.cpp
View file @
de9a3790
...
...
@@ -9,10 +9,9 @@
#include "gnb.hpp"
#include "app/task.hpp"
#include "gtp/task.hpp"
#include "
sra
/task.hpp"
#include "
rls
/task.hpp"
#include "ngap/task.hpp"
#include "rrc/task.hpp"
#include "sra/task.hpp"
#include "sctp/task.hpp"
#include <app/cli_base.hpp>
...
...
@@ -33,7 +32,7 @@ GNodeB::GNodeB(GnbConfig *config, app::INodeListener *nodeListener, NtsTask *cli
base
->
ngapTask
=
new
NgapTask
(
base
);
base
->
rrcTask
=
new
GnbRrcTask
(
base
);
base
->
gtpTask
=
new
GtpTask
(
base
);
base
->
sraTask
=
new
GnbSra
Task
(
base
);
base
->
rlsTask
=
new
GnbRls
Task
(
base
);
taskBase
=
base
;
}
...
...
@@ -45,14 +44,14 @@ GNodeB::~GNodeB()
taskBase
->
ngapTask
->
quit
();
taskBase
->
rrcTask
->
quit
();
taskBase
->
gtpTask
->
quit
();
taskBase
->
sra
Task
->
quit
();
taskBase
->
rls
Task
->
quit
();
delete
taskBase
->
appTask
;
delete
taskBase
->
sctpTask
;
delete
taskBase
->
ngapTask
;
delete
taskBase
->
rrcTask
;
delete
taskBase
->
gtpTask
;
delete
taskBase
->
sra
Task
;
delete
taskBase
->
rls
Task
;
delete
taskBase
->
logBase
;
...
...
@@ -65,7 +64,7 @@ void GNodeB::start()
taskBase
->
sctpTask
->
start
();
taskBase
->
ngapTask
->
start
();
taskBase
->
rrcTask
->
start
();
taskBase
->
sra
Task
->
start
();
taskBase
->
rls
Task
->
start
();
taskBase
->
gtpTask
->
start
();
}
...
...
src/gnb/gtp/task.cpp
View file @
de9a3790
...
...
@@ -10,7 +10,7 @@
#include <asn/ngap/ASN_NGAP_QosFlowSetupRequestItem.h>
#include <gnb/gtp/proto.hpp>
#include <gnb/
sra
/task.hpp>
#include <gnb/
rls
/task.hpp>
#include <utils/constants.hpp>
#include <utils/libc_error.hpp>
...
...
@@ -76,11 +76,11 @@ void GtpTask::onLoop()
}
break
;
}
case
NtsMessageType
:
:
GNB_
SRA
_TO_GTP
:
{
auto
*
w
=
dynamic_cast
<
NwGnb
Sra
ToGtp
*>
(
msg
);
case
NtsMessageType
:
:
GNB_
RLS
_TO_GTP
:
{
auto
*
w
=
dynamic_cast
<
NwGnb
Rls
ToGtp
*>
(
msg
);
switch
(
w
->
present
)
{
case
NwGnb
Sra
ToGtp
:
:
DATA_PDU_DELIVERY
:
{
case
NwGnb
Rls
ToGtp
:
:
DATA_PDU_DELIVERY
:
{
handleUplinkData
(
w
->
ueId
,
w
->
psi
,
std
::
move
(
w
->
pdu
));
break
;
}
...
...
@@ -239,11 +239,11 @@ void GtpTask::handleUdpReceive(const udp::NwUdpServerReceive &msg)
if
(
m_rateLimiter
->
allowDownlinkPacket
(
sessionInd
,
gtp
->
payload
.
length
()))
{
auto
*
w
=
new
NwGnbGtpTo
Sra
(
NwGnbGtpToSra
::
DATA_PDU_DELIVERY
);
auto
*
w
=
new
NwGnbGtpTo
Rls
(
NwGnbGtpToRls
::
DATA_PDU_DELIVERY
);
w
->
ueId
=
GetUeId
(
sessionInd
);
w
->
psi
=
GetPsi
(
sessionInd
);
w
->
pdu
=
std
::
move
(
gtp
->
payload
);
m_base
->
sra
Task
->
push
(
w
);
m_base
->
rls
Task
->
push
(
w
);
}
delete
gtp
;
...
...
src/gnb/nts.hpp
View file @
de9a3790
...
...
@@ -23,7 +23,7 @@
namespace
nr
::
gnb
{
struct
NwGnb
Sra
ToRrc
:
NtsMessage
struct
NwGnb
Rls
ToRrc
:
NtsMessage
{
enum
PR
{
...
...
@@ -39,12 +39,12 @@ struct NwGnbSraToRrc : NtsMessage
rrc
::
RrcChannel
channel
{};
OctetString
pdu
{};
explicit
NwGnb
SraToRrc
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
GNB_SRA
_TO_RRC
),
present
(
present
)
explicit
NwGnb
RlsToRrc
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
GNB_RLS
_TO_RRC
),
present
(
present
)
{
}
};
struct
NwGnb
Sra
ToGtp
:
NtsMessage
struct
NwGnb
Rls
ToGtp
:
NtsMessage
{
enum
PR
{
...
...
@@ -56,12 +56,12 @@ struct NwGnbSraToGtp : NtsMessage
int
psi
{};
OctetString
pdu
{};
explicit
NwGnb
SraToGtp
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
GNB_SRA
_TO_GTP
),
present
(
present
)
explicit
NwGnb
RlsToGtp
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
GNB_RLS
_TO_GTP
),
present
(
present
)
{
}
};
struct
NwGnbGtpTo
Sra
:
NtsMessage
struct
NwGnbGtpTo
Rls
:
NtsMessage
{
enum
PR
{
...
...
@@ -73,12 +73,12 @@ struct NwGnbGtpToSra : NtsMessage
int
psi
{};
OctetString
pdu
{};
explicit
NwGnbGtpTo
Sra
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
GNB_GTP_TO_SRA
),
present
(
present
)
explicit
NwGnbGtpTo
Rls
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
GNB_GTP_TO_RLS
),
present
(
present
)
{
}
};
struct
NwGnbRrcTo
Sra
:
NtsMessage
struct
NwGnbRrcTo
Rls
:
NtsMessage
{
enum
PR
{
...
...
@@ -91,7 +91,7 @@ struct NwGnbRrcToSra : NtsMessage
rrc
::
RrcChannel
channel
{};
OctetString
pdu
{};
explicit
NwGnbRrcTo
Sra
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
GNB_RRC_TO_SRA
),
present
(
present
)
explicit
NwGnbRrcTo
Rls
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
GNB_RRC_TO_RLS
),
present
(
present
)
{
}
};
...
...
src/gnb/
sra
/handler.cpp
→
src/gnb/
rls
/handler.cpp
View file @
de9a3790
...
...
@@ -28,7 +28,7 @@ static int EstimateSimulatedDbm(const Vector3 &myPos, const Vector3 &uePos)
namespace
nr
::
gnb
{
void
Gnb
SraTask
::
handleCellInfoRequest
(
int
ueId
,
const
sra
::
SraCellInfoRequest
&
msg
)
void
Gnb
RlsTask
::
handleCellInfoRequest
(
int
ueId
,
const
rls
::
SraCellInfoRequest
&
msg
)
{
int
dbm
=
EstimateSimulatedDbm
(
m_base
->
config
->
phyLocation
,
msg
.
simPos
);
if
(
dbm
<
MIN_ALLOWED_DBM
)
...
...
@@ -37,7 +37,7 @@ void GnbSraTask::handleCellInfoRequest(int ueId, const sra::SraCellInfoRequest &
return
;
}
sra
::
SraCellInfoResponse
resp
{
m_sti
};
rls
::
SraCellInfoResponse
resp
{
m_sti
};
resp
.
cellId
.
nci
=
m_base
->
config
->
nci
;
resp
.
cellId
.
plmn
=
m_base
->
config
->
plmn
;
resp
.
tac
=
m_base
->
config
->
tac
;
...
...
@@ -48,19 +48,19 @@ void GnbSraTask::handleCellInfoRequest(int ueId, const sra::SraCellInfoRequest &
sendSraMessage
(
ueId
,
resp
);
}
void
Gnb
SraTask
::
handleUplinkPduDelivery
(
int
ueId
,
sra
::
SraPduDelivery
&
msg
)
void
Gnb
RlsTask
::
handleUplinkPduDelivery
(
int
ueId
,
rls
::
SraPduDelivery
&
msg
)
{
if
(
msg
.
pduType
==
sra
::
EPduType
::
RRC
)
if
(
msg
.
pduType
==
rls
::
EPduType
::
RRC
)
{
auto
*
nw
=
new
NwGnb
SraToRrc
(
NwGnbSra
ToRrc
::
RRC_PDU_DELIVERY
);
auto
*
nw
=
new
NwGnb
RlsToRrc
(
NwGnbRls
ToRrc
::
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
);
}
else
if
(
msg
.
pduType
==
sra
::
EPduType
::
DATA
)
else
if
(
msg
.
pduType
==
rls
::
EPduType
::
DATA
)
{
auto
*
nw
=
new
NwGnb
SraToGtp
(
NwGnbSra
ToGtp
::
DATA_PDU_DELIVERY
);
auto
*
nw
=
new
NwGnb
RlsToGtp
(
NwGnbRls
ToGtp
::
DATA_PDU_DELIVERY
);
nw
->
ueId
=
ueId
;
nw
->
psi
=
msg
.
payload
.
get4I
(
0
);
nw
->
pdu
=
std
::
move
(
msg
.
pdu
);
...
...
@@ -68,9 +68,9 @@ void GnbSraTask::handleUplinkPduDelivery(int ueId, sra::SraPduDelivery &msg)
}
}
void
Gnb
SraTask
::
handleDownlinkDelivery
(
int
ueId
,
sra
::
EPduType
pduType
,
OctetString
&&
pdu
,
OctetString
&&
payload
)
void
Gnb
RlsTask
::
handleDownlinkDelivery
(
int
ueId
,
rls
::
EPduType
pduType
,
OctetString
&&
pdu
,
OctetString
&&
payload
)
{
sra
::
SraPduDelivery
resp
{
m_sti
};
rls
::
SraPduDelivery
resp
{
m_sti
};
resp
.
pduType
=
pduType
;
resp
.
pdu
=
std
::
move
(
pdu
);
resp
.
payload
=
std
::
move
(
payload
);
...
...
src/gnb/
sra
/management.cpp
→
src/gnb/
rls
/management.cpp
View file @
de9a3790
...
...
@@ -16,7 +16,7 @@ static const int64_t LAST_SEEN_THRESHOLD = 3000;
namespace
nr
::
gnb
{
int
Gnb
Sra
Task
::
updateUeInfo
(
const
InetAddress
&
addr
,
uint64_t
sti
)
int
Gnb
Rls
Task
::
updateUeInfo
(
const
InetAddress
&
addr
,
uint64_t
sti
)
{
if
(
m_stiToUeId
.
count
(
sti
))
{
...
...
@@ -41,7 +41,7 @@ int GnbSraTask::updateUeInfo(const InetAddress &addr, uint64_t sti)
}
}
void
Gnb
Sra
Task
::
onPeriodicLostControl
()
void
Gnb
Rls
Task
::
onPeriodicLostControl
()
{
int64_t
current
=
utils
::
CurrentTimeMillis
();
...
...
@@ -64,7 +64,7 @@ void GnbSraTask::onPeriodicLostControl()
m_ueCtx
.
erase
(
ueId
);
m_logger
->
debug
(
"Signal lost detected for UE[%d]"
,
ueId
);
auto
*
w
=
new
NwGnb
SraToRrc
(
NwGnbSra
ToRrc
::
SIGNAL_LOST
);
auto
*
w
=
new
NwGnb
RlsToRrc
(
NwGnbRls
ToRrc
::
SIGNAL_LOST
);
w
->
ueId
=
ueId
;
m_base
->
rrcTask
->
push
(
w
);
}
...
...
src/gnb/
sra
/task.cpp
→
src/gnb/
rls
/task.cpp
View file @
de9a3790
...
...
@@ -20,13 +20,14 @@ static const int TIMER_PERIOD_LOST_CONTROL = 2000;
namespace
nr
::
gnb
{
GnbSraTask
::
GnbSraTask
(
TaskBase
*
base
)
:
m_base
{
base
},
m_udpTask
{},
m_ueCtx
{},
m_stiToUeId
{},
m_ueIdCounter
{}
GnbRlsTask
::
GnbRlsTask
(
TaskBase
*
base
)
:
m_base
{
base
},
m_udpTask
{},
m_powerOn
{},
m_ueCtx
{},
m_stiToUeId
{},
m_ueIdCounter
{}
{
m_logger
=
m_base
->
logBase
->
makeUniqueLogger
(
"
sra
"
);
m_logger
=
m_base
->
logBase
->
makeUniqueLogger
(
"
rls
"
);
m_sti
=
utils
::
Random64
();
}
void
Gnb
Sra
Task
::
onStart
()
void
Gnb
Rls
Task
::
onStart
()
{
try
{
...
...
@@ -35,7 +36,7 @@ void GnbSraTask::onStart()
}
catch
(
const
LibError
&
e
)
{
m_logger
->
err
(
"
SRA
failure [%s]"
,
e
.
what
());
m_logger
->
err
(
"
RLS
failure [%s]"
,
e
.
what
());
quit
();
return
;
}
...
...
@@ -43,7 +44,7 @@ void GnbSraTask::onStart()
setTimer
(
TIMER_ID_LOST_CONTROL
,
TIMER_PERIOD_LOST_CONTROL
);
}
void
Gnb
Sra
Task
::
onLoop
()
void
Gnb
Rls
Task
::
onLoop
()
{
NtsMessage
*
msg
=
take
();
if
(
!
msg
)
...
...
@@ -51,28 +52,28 @@ void GnbSraTask::onLoop()
switch
(
msg
->
msgType
)
{
case
NtsMessageType
:
:
GNB_RRC_TO_
SRA
:
{
auto
*
w
=
dynamic_cast
<
NwGnbRrcTo
Sra
*>
(
msg
);
case
NtsMessageType
:
:
GNB_RRC_TO_
RLS
:
{
auto
*
w
=
dynamic_cast
<
NwGnbRrcTo
Rls
*>
(
msg
);
switch
(
w
->
present
)
{
case
NwGnbRrcTo
Sra
:
:
RRC_PDU_DELIVERY
:
{
handleDownlinkDelivery
(
w
->
ueId
,
sra
::
EPduType
::
RRC
,
std
::
move
(
w
->
pdu
),
case
NwGnbRrcTo
Rls
:
:
RRC_PDU_DELIVERY
:
{
handleDownlinkDelivery
(
w
->
ueId
,
rls
::
EPduType
::
RRC
,
std
::
move
(
w
->
pdu
),
OctetString
::
FromOctet4
(
static_cast
<
int
>
(
w
->
channel
)));
break
;
}
case
NwGnbRrcTo
Sra
:
:
RADIO_POWER_ON
:
{
case
NwGnbRrcTo
Rls
:
:
RADIO_POWER_ON
:
{
m_powerOn
=
true
;
break
;
}
}
break
;
}
case
NtsMessageType
:
:
GNB_GTP_TO_
SRA
:
{
auto
*
w
=
dynamic_cast
<
NwGnbGtpTo
Sra
*>
(
msg
);
case
NtsMessageType
:
:
GNB_GTP_TO_
RLS
:
{
auto
*
w
=
dynamic_cast
<
NwGnbGtpTo
Rls
*>
(
msg
);
switch
(
w
->
present
)
{
case
NwGnbGtpTo
Sra
:
:
DATA_PDU_DELIVERY
:
{
handleDownlinkDelivery
(
w
->
ueId
,
sra
::
EPduType
::
DATA
,
std
::
move
(
w
->
pdu
),
case
NwGnbGtpTo
Rls
:
:
DATA_PDU_DELIVERY
:
{
handleDownlinkDelivery
(
w
->
ueId
,
rls
::
EPduType
::
DATA
,
std
::
move
(
w
->
pdu
),
OctetString
::
FromOctet4
(
static_cast
<
int
>
(
w
->
psi
)));
break
;
}
...
...
@@ -81,7 +82,7 @@ void GnbSraTask::onLoop()
}
case
NtsMessageType
:
:
UDP_SERVER_RECEIVE
:
{
auto
*
w
=
dynamic_cast
<
udp
::
NwUdpServerReceive
*>
(
msg
);
auto
sraMsg
=
sra
::
DecodeSra
Message
(
OctetView
{
w
->
packet
});
auto
sraMsg
=
rls
::
DecodeRls
Message
(
OctetView
{
w
->
packet
});
if
(
sraMsg
==
nullptr
)
{
m_logger
->
err
(
"Unable to decode SRA message"
);
...
...
@@ -107,7 +108,7 @@ void GnbSraTask::onLoop()
delete
msg
;
}
void
Gnb
Sra
Task
::
onQuit
()
void
Gnb
Rls
Task
::
onQuit
()
{
if
(
m_udpTask
!=
nullptr
)
m_udpTask
->
quit
();
...
...
src/gnb/
sra
/task.hpp
→
src/gnb/
rls
/task.hpp
View file @
de9a3790
...
...
@@ -14,7 +14,7 @@
#include <thread>
#include <udp/server_task.hpp>
#include <unordered_map>
#include <urs/
sra
_pdu.hpp>
#include <urs/
rls
_pdu.hpp>
#include <utils/logger.hpp>
#include <utils/nts.hpp>
#include <vector>
...
...
@@ -22,7 +22,7 @@
namespace
nr
::
gnb
{
class
Gnb
Sra
Task
:
public
NtsTask
class
Gnb
Rls
Task
:
public
NtsTask
{
private:
TaskBase
*
m_base
;
...
...
@@ -38,8 +38,8 @@ class GnbSraTask : public NtsTask
friend
class
GnbCmdHandler
;
public:
explicit
Gnb
Sra
Task
(
TaskBase
*
base
);
~
Gnb
Sra
Task
()
override
=
default
;
explicit
Gnb
Rls
Task
(
TaskBase
*
base
);
~
Gnb
Rls
Task
()
override
=
default
;
protected:
void
onStart
()
override
;
...
...
@@ -47,13 +47,13 @@ class GnbSraTask : public NtsTask
void
onQuit
()
override
;
private:
/* Transport */
void
receiveSraMessage
(
const
InetAddress
&
addr
,
sra
::
SraMessage
&
msg
);
void
sendSraMessage
(
int
ueId
,
const
sra
::
SraMessage
&
msg
);
void
receiveSraMessage
(
const
InetAddress
&
addr
,
rls
::
SraMessage
&
msg
);
void
sendSraMessage
(
int
ueId
,
const
rls
::
SraMessage
&
msg
);
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
);
void
handleCellInfoRequest
(
int
ueId
,
const
rls
::
SraCellInfoRequest
&
msg
);
void
handleUplinkPduDelivery
(
int
ueId
,
rls
::
SraPduDelivery
&
msg
);
void
handleDownlinkDelivery
(
int
ueId
,
rls
::
EPduType
pduType
,
OctetString
&&
pdu
,
OctetString
&&
payload
);
private:
/* UE Management */
int
updateUeInfo
(
const
InetAddress
&
addr
,
uint64_t
sti
);
...
...
src/gnb/
sra
/transport.cpp
→
src/gnb/
rls
/transport.cpp
View file @
de9a3790
...
...
@@ -11,7 +11,7 @@
namespace
nr
::
gnb
{
void
Gnb
SraTask
::
receiveSraMessage
(
const
InetAddress
&
addr
,
sra
::
SraMessage
&
msg
)
void
Gnb
RlsTask
::
receiveSraMessage
(
const
InetAddress
&
addr
,
rls
::
SraMessage
&
msg
)
{
if
(
!
m_powerOn
)
{
...
...
@@ -23,12 +23,12 @@ void GnbSraTask::receiveSraMessage(const InetAddress &addr, sra::SraMessage &msg
switch
(
msg
.
msgType
)
{
case
sra
:
:
EMessageType
::
CELL_INFO_REQUEST
:
{
handleCellInfoRequest
(
ueId
,
(
const
sra
::
SraCellInfoRequest
&
)
msg
);
case
rls
:
:
EMessageType
::
CELL_INFO_REQUEST
:
{
handleCellInfoRequest
(
ueId
,
(
const
rls
::
SraCellInfoRequest
&
)
msg
);
break
;
}
case
sra
:
:
EMessageType
::
PDU_DELIVERY
:
{
handleUplinkPduDelivery
(
ueId
,
(
sra
::
SraPduDelivery
&
)
msg
);
case
rls
:
:
EMessageType
::
PDU_DELIVERY
:
{
handleUplinkPduDelivery
(
ueId
,
(
rls
::
SraPduDelivery
&
)
msg
);
break
;
}
default:
...
...
@@ -37,7 +37,7 @@ void GnbSraTask::receiveSraMessage(const InetAddress &addr, sra::SraMessage &msg
}
}
void
Gnb
SraTask
::
sendSraMessage
(
int
ueId
,
const
sra
::
SraMessage
&
msg
)
void
Gnb
RlsTask
::
sendSraMessage
(
int
ueId
,
const
rls
::
SraMessage
&
msg
)
{
if
(
!
m_ueCtx
.
count
(
ueId
))
{
...
...
@@ -46,7 +46,7 @@ void GnbSraTask::sendSraMessage(int ueId, const sra::SraMessage &msg)
}
OctetString
stream
{};
sra
::
EncodeSra
Message
(
msg
,
stream
);
rls
::
EncodeRls
Message
(
msg
,
stream
);
m_udpTask
->
send
(
m_ueCtx
[
ueId
]
->
addr
,
stream
);
}
...
...
src/gnb/rrc/channel.cpp
View file @
de9a3790
...
...
@@ -9,7 +9,7 @@
#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 <gnb/
rls
/task.hpp>
#include <rrc/encode.hpp>
namespace
nr
::
gnb
...
...
@@ -103,11 +103,11 @@ void GnbRrcTask::sendRrcMessage(int ueId, ASN_RRC_BCCH_BCH_Message *msg)
return
;
}
auto
*
w
=
new
NwGnbRrcTo
Sra
(
NwGnbRrcToSra
::
RRC_PDU_DELIVERY
);
auto
*
w
=
new
NwGnbRrcTo
Rls
(
NwGnbRrcToRls
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
channel
=
rrc
::
RrcChannel
::
BCCH_BCH
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
sra
Task
->
push
(
w
);
m_base
->
rls
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
Sra
(
NwGnbRrcToSra
::
RRC_PDU_DELIVERY
);
auto
*
w
=
new
NwGnbRrcTo
Rls
(
NwGnbRrcToRls
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
channel
=
rrc
::
RrcChannel
::
BCCH_DL_SCH
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
sra
Task
->
push
(
w
);
m_base
->
rls
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
Sra
(
NwGnbRrcToSra
::
RRC_PDU_DELIVERY
);
auto
*
w
=
new
NwGnbRrcTo
Rls
(
NwGnbRrcToRls
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
channel
=
rrc
::
RrcChannel
::
DL_CCCH
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
sra
Task
->
push
(
w
);
m_base
->
rls
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
Sra
(
NwGnbRrcToSra
::
RRC_PDU_DELIVERY
);
auto
*
w
=
new
NwGnbRrcTo
Rls
(
NwGnbRrcToRls
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
channel
=
rrc
::
RrcChannel
::
DL_DCCH
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
sra
Task
->
push
(
w
);
m_base
->
rls
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
Sra
(
NwGnbRrcToSra
::
RRC_PDU_DELIVERY
);
auto
*
w
=
new
NwGnbRrcTo
Rls
(
NwGnbRrcToRls
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
channel
=
rrc
::
RrcChannel
::
PCCH
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
sra
Task
->
push
(
w
);
m_base
->
rls
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
Sra
(
NwGnbRrcToSra
::
RRC_PDU_DELIVERY
);
auto
*
w
=
new
NwGnbRrcTo
Rls
(
NwGnbRrcToRls
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
channel
=
rrc
::
RrcChannel
::
UL_CCCH
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
sra
Task
->
push
(
w
);
m_base
->
rls
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
Sra
(
NwGnbRrcToSra
::
RRC_PDU_DELIVERY
);
auto
*
w
=
new
NwGnbRrcTo
Rls
(
NwGnbRrcToRls
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
channel
=
rrc
::
RrcChannel
::
UL_CCCH1
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
sra
Task
->
push
(
w
);
m_base
->
rls
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
Sra
(
NwGnbRrcToSra
::
RRC_PDU_DELIVERY
);
auto
*
w
=
new
NwGnbRrcTo
Rls
(
NwGnbRrcToRls
::
RRC_PDU_DELIVERY
);
w
->
ueId
=
ueId
;
w
->
channel
=
rrc
::
RrcChannel
::
UL_DCCH
;
w
->
pdu
=
std
::
move
(
pdu
);
m_base
->
sra
Task
->
push
(
w
);
m_base
->
rls
Task
->
push
(
w
);
}
void
GnbRrcTask
::
receiveRrcMessage
(
int
ueId
,
ASN_RRC_BCCH_BCH_Message
*
msg
)
...
...
src/gnb/rrc/task.cpp
View file @
de9a3790
...
...
@@ -10,7 +10,7 @@
#include <asn/rrc/ASN_RRC_DLInformationTransfer-IEs.h>
#include <asn/rrc/ASN_RRC_DLInformationTransfer.h>
#include <gnb/nts.hpp>
#include <gnb/
sra
/task.hpp>
#include <gnb/
rls
/task.hpp>
#include <rrc/encode.hpp>
namespace
nr
::
gnb
...
...
@@ -38,15 +38,15 @@ void GnbRrcTask::onLoop()
switch
(
msg
->
msgType
)
{
case
NtsMessageType
:
:
GNB_
SRA
_TO_RRC
:
{
auto
*
w
=
dynamic_cast
<
NwGnb
Sra
ToRrc
*>
(
msg
);
case
NtsMessageType
:
:
GNB_
RLS
_TO_RRC
:
{
auto
*
w
=
dynamic_cast
<
NwGnb
Rls
ToRrc
*>
(
msg
);
switch
(
w
->
present
)
{
case
NwGnb
Sra
ToRrc
:
:
RRC_PDU_DELIVERY
:
{
case
NwGnb
Rls
ToRrc
:
:
RRC_PDU_DELIVERY
:
{
handleUplinkRrc
(
w
->
ueId
,
w
->
channel
,
w
->
pdu
);
break
;
}
case
NwGnb
Sra
ToRrc
:
:
SIGNAL_LOST
:
{
case
NwGnb
Rls
ToRrc
:
:
SIGNAL_LOST
:
{
handleRadioLinkFailure
(
w
->
ueId
);
break
;
}
...
...
@@ -58,7 +58,7 @@ void GnbRrcTask::onLoop()
switch
(
w
->
present
)
{
case
NwGnbNgapToRrc
:
:
RADIO_POWER_ON
:
{
m_base
->
sraTask
->
push
(
new
NwGnbRrcToSra
(
NwGnbRrcToSra
::
RADIO_POWER_ON
));
m_base
->
rlsTask
->
push
(
new
NwGnbRrcToRls
(
NwGnbRrcToRls
::
RADIO_POWER_ON
));
break
;
}
case
NwGnbNgapToRrc
:
:
NAS_DELIVERY
:
{
...
...
src/gnb/types.hpp
View file @
de9a3790
...
...
@@ -26,7 +26,7 @@ class GnbAppTask;
class
GtpTask
;
class
NgapTask
;
class
GnbRrcTask
;
class
Gnb
Sra
Task
;
class
Gnb
Rls
Task
;
class
SctpTask
;
enum
class
EAmfState
...
...
@@ -337,7 +337,7 @@ struct TaskBase
NgapTask
*
ngapTask
{};
GnbRrcTask
*
rrcTask
{};
SctpTask
*
sctpTask
{};
Gnb
SraTask
*
sra
Task
{};
Gnb
RlsTask
*
rls
Task
{};
};
Json
ToJson
(
const
GnbStatusInfo
&
v
);
...
...
src/ue/app/cmd_handler.cpp
View file @
de9a3790
...
...
@@ -11,7 +11,7 @@
#include <ue/app/task.hpp>
#include <ue/nas/task.hpp>
#include <ue/rrc/task.hpp>
#include <ue/
sra
/task.hpp>
#include <ue/
rls
/task.hpp>
#include <ue/tun/task.hpp>
#include <utils/common.hpp>
#include <utils/printer.hpp>
...
...
@@ -47,14 +47,14 @@ void UeCmdHandler::pauseTasks()
{
m_base
->
nasTask
->
requestPause
();
m_base
->
rrcTask
->
requestPause
();
m_base
->
sra
Task
->
requestPause
();
m_base
->
rls
Task
->
requestPause
();
}
void
UeCmdHandler
::
unpauseTasks
()
{
m_base
->
nasTask
->
requestUnpause
();
m_base
->
rrcTask
->
requestUnpause
();
m_base
->
sra
Task
->
requestUnpause
();
m_base
->
rls
Task
->
requestUnpause
();
}
bool
UeCmdHandler
::
isAllPaused
()
...
...
@@ -63,7 +63,7 @@ bool UeCmdHandler::isAllPaused()
return
false
;
if
(
!
m_base
->
rrcTask
->
isPauseConfirmed
())
return
false
;
if
(
!
m_base
->
sra
Task
->
isPauseConfirmed
())
if
(
!
m_base
->
rls
Task
->
isPauseConfirmed
())
return
false
;
return
true
;
}
...
...
@@ -115,7 +115,7 @@ void UeCmdHandler::handleCmdImpl(NwUeCliCommand &msg)
{
"mm-state"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_mmSubState
)},
{
"5u-state"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_usim
->
m_uState
)},
{
"camped-cell"
,
::
ToJson
(
m_base
->
sraTask
->
m_servingCell
.
has_value
()
?
m_base
->
sra
Task
->
m_servingCell
->
gnbName
:
""
)},
::
ToJson
(
m_base
->
rlsTask
->
m_servingCell
.
has_value
()
?
m_base
->
rls
Task
->
m_servingCell
->
gnbName
:
""
)},
{
"sim-inserted"
,
m_base
->
nasTask
->
mm
->
m_usim
->
isValid
()},
{
"stored-suci"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_usim
->
m_storedSuci
)},
{
"stored-guti"
,
ToJson
(
m_base
->
nasTask
->
mm
->
m_usim
->
m_storedGuti
)},
...
...
@@ -164,7 +164,7 @@ void UeCmdHandler::handleCmdImpl(NwUeCliCommand &msg)
break
;
}
case
app
:
:
UeCliCommand
::
COVERAGE
:
{
auto
&
map
=
m_base
->
sra
Task
->
m_activeMeasurements
;
auto
&
map
=
m_base
->
rls
Task
->
m_activeMeasurements
;
if
(
map
.
empty
())
{
sendResult
(
msg
.
address
,
"No cell exists in the range"
);
...
...
src/ue/app/task.cpp
View file @
de9a3790
...
...
@@ -9,7 +9,7 @@
#include "task.hpp"
#include "cmd_handler.hpp"
#include <nas/utils.hpp>
#include <ue/
sra
/task.hpp>
#include <ue/
rls
/task.hpp>
#include <ue/tun/tun.hpp>
#include <utils/common.hpp>
#include <utils/constants.hpp>
...
...
@@ -50,11 +50,11 @@ void UeAppTask::onLoop()
switch
(
msg
->
msgType
)
{
case
NtsMessageType
:
:
UE_
SRA
_TO_APP
:
{
auto
*
w
=
dynamic_cast
<
NwUe
Sra
ToApp
*>
(
msg
);
case
NtsMessageType
:
:
UE_
RLS
_TO_APP
:
{
auto
*
w
=
dynamic_cast
<
NwUe
Rls
ToApp
*>
(
msg
);
switch
(
w
->
present
)
{
case
NwUe
Sra
ToApp
:
:
DATA_PDU_DELIVERY
:
{
case
NwUe
Rls
ToApp
:
:
DATA_PDU_DELIVERY
:
{
auto
*
tunTask
=
m_tunTasks
[
w
->
psi
];
if
(
tunTask
)
{
...
...
@@ -226,10 +226,10 @@ void UeAppTask::handleUplinkDataRequest(int psi, OctetString &&data)
{
if
(
m_cmState
==
ECmState
::
CM_CONNECTED
)
{
auto
*
nw
=
new
NwUeAppTo
Sra
(
NwUeAppToSra
::
DATA_PDU_DELIVERY
);
auto
*
nw
=
new
NwUeAppTo
Rls
(
NwUeAppToRls
::
DATA_PDU_DELIVERY
);
nw
->
psi
=
psi
;
nw
->
pdu
=
std
::
move
(
data
);
m_base
->
sra
Task
->
push
(
nw
);
m_base
->
rls
Task
->
push
(
nw
);
}
else
{
...
...
src/ue/nts.hpp
View file @
de9a3790
...
...
@@ -110,7 +110,7 @@ struct NwUeNasToRrc : NtsMessage
}
};
struct
NwUeRrcTo
Sra
:
NtsMessage
struct
NwUeRrcTo
Rls
:
NtsMessage
{
enum
PR
{
...
...
@@ -127,12 +127,12 @@ struct NwUeRrcToSra : NtsMessage
rrc
::
RrcChannel
channel
{};
OctetString
pdu
{};
explicit
NwUeRrcTo
Sra
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
UE_RRC_TO_SRA
),
present
(
present
)
explicit
NwUeRrcTo
Rls
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
UE_RRC_TO_RLS
),
present
(
present
)
{
}
};
struct
NwUe
Sra
ToRrc
:
NtsMessage
struct
NwUe
Rls
ToRrc
:
NtsMessage
{
enum
PR
{
...
...
@@ -152,7 +152,7 @@ struct NwUeSraToRrc : NtsMessage
rrc
::
RrcChannel
channel
{};
OctetString
pdu
{};
explicit
NwUe
SraToRrc
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
UE_SRA
_TO_RRC
),
present
(
present
)
explicit
NwUe
RlsToRrc
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
UE_RLS
_TO_RRC
),
present
(
present
)
{
}
};
...
...
@@ -186,7 +186,7 @@ struct NwUeNasToApp : NtsMessage
}
};
struct
NwUeAppTo
Sra
:
NtsMessage
struct
NwUeAppTo
Rls
:
NtsMessage
{
enum
PR
{
...
...
@@ -197,12 +197,12 @@ struct NwUeAppToSra : NtsMessage
int
psi
{};
OctetString
pdu
{};
explicit
NwUeAppTo
Sra
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
UE_APP_TO_SRA
),
present
(
present
)
explicit
NwUeAppTo
Rls
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
UE_APP_TO_RLS
),
present
(
present
)
{
}
};
struct
NwUe
Sra
ToApp
:
NtsMessage
struct
NwUe
Rls
ToApp
:
NtsMessage
{
enum
PR
{
...
...
@@ -213,7 +213,7 @@ struct NwUeSraToApp : NtsMessage
int
psi
{};
OctetString
pdu
{};
explicit
NwUe
SraToApp
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
UE_SRA
_TO_APP
),
present
(
present
)
explicit
NwUe
RlsToApp
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
UE_RLS
_TO_APP
),
present
(
present
)
{
}
};
...
...
src/ue/
sra
/measurement.cpp
→
src/ue/
rls
/measurement.cpp
View file @
de9a3790
...
...
@@ -14,7 +14,7 @@
namespace
nr
::
ue
{
void
Ue
Sra
Task
::
onMeasurement
()
void
Ue
Rls
Task
::
onMeasurement
()
{
std
::
vector
<
GlobalNci
>
entered
{};
std
::
vector
<
GlobalNci
>
exited
{};
...
...
@@ -41,12 +41,12 @@ void UeSraTask::onMeasurement()
// Issue another cell info request for each address in the search space
for
(
auto
&
ip
:
m_cellSearchSpace
)
{
sra
::
SraCellInfoRequest
req
{
m_sti
};
send
Sra
Message
(
ip
,
req
);
rls
::
SraCellInfoRequest
req
{
m_sti
};
send
Rls
Message
(
ip
,
req
);
}
}
void
Ue
SraTask
::
receiveCellInfoResponse
(
const
sra
::
SraCellInfoResponse
&
msg
)
void
Ue
RlsTask
::
receiveCellInfoResponse
(
const
rls
::
SraCellInfoResponse
&
msg
)
{
UeCellMeasurement
meas
{};
meas
.
sti
=
msg
.
sti
;
...
...
@@ -59,7 +59,7 @@ void UeSraTask::receiveCellInfoResponse(const sra::SraCellInfoResponse &msg)
m_pendingMeasurements
[
meas
.
cellId
]
=
meas
;
}
void
Ue
Sra
Task
::
onCoverageChange
(
const
std
::
vector
<
GlobalNci
>
&
entered
,
const
std
::
vector
<
GlobalNci
>
&
exited
)
void
Ue
Rls
Task
::
onCoverageChange
(
const
std
::
vector
<
GlobalNci
>
&
entered
,
const
std
::
vector
<
GlobalNci
>
&
exited
)
{
m_logger
->
debug
(
"Coverage change detected. [%d] cell entered, [%d] cell exited"
,
static_cast
<
int
>
(
entered
.
size
()),
static_cast
<
int
>
(
exited
.
size
()));
...
...
@@ -71,22 +71,22 @@ void UeSraTask::onCoverageChange(const std::vector<GlobalNci> &entered, const st
{
m_logger
->
warn
(
"Signal lost from camped cell"
);
m_servingCell
=
std
::
nullopt
;
m_base
->
rrcTask
->
push
(
new
NwUe
SraToRrc
(
NwUeSra
ToRrc
::
RADIO_LINK_FAILURE
));
m_base
->
rrcTask
->
push
(
new
NwUe
RlsToRrc
(
NwUeRls
ToRrc
::
RADIO_LINK_FAILURE
));
}
}
void
Ue
Sra
Task
::
plmnSearchRequested
()
void
Ue
Rls
Task
::
plmnSearchRequested
()
{
std
::
vector
<
UeCellMeasurement
>
measurements
{};
for
(
auto
&
m
:
m_activeMeasurements
)
measurements
.
push_back
(
m
.
second
);
auto
*
w
=
new
NwUe
SraToRrc
(
NwUeSra
ToRrc
::
PLMN_SEARCH_RESPONSE
);
auto
*
w
=
new
NwUe
RlsToRrc
(
NwUeRls
ToRrc
::
PLMN_SEARCH_RESPONSE
);
w
->
measurements
=
std
::
move
(
measurements
);
m_base
->
rrcTask
->
push
(
w
);
}
void
Ue
Sra
Task
::
handleCellSelectionCommand
(
const
GlobalNci
&
cellId
,
bool
isSuitable
)
void
Ue
Rls
Task
::
handleCellSelectionCommand
(
const
GlobalNci
&
cellId
,
bool
isSuitable
)
{
if
(
!
m_activeMeasurements
.
count
(
cellId
))
{
...
...
@@ -104,7 +104,7 @@ void UeSraTask::handleCellSelectionCommand(const GlobalNci &cellId, bool isSuita
m_servingCell
->
linkIp
=
measurement
.
linkIp
;
m_servingCell
->
cellCategory
=
isSuitable
?
ECellCategory
::
SUITABLE_CELL
:
ECellCategory
::
ACCEPTABLE_CELL
;
auto
*
w
=
new
NwUe
SraToRrc
(
NwUeSra
ToRrc
::
SERVING_CELL_CHANGE
);
auto
*
w
=
new
NwUe
RlsToRrc
(
NwUeRls
ToRrc
::
SERVING_CELL_CHANGE
);
w
->
servingCell
=
*
m_servingCell
;
m_base
->
rrcTask
->
push
(
w
);
}
...
...
src/ue/
sra
/task.cpp
→
src/ue/
rls
/task.cpp
View file @
de9a3790
...
...
@@ -17,7 +17,7 @@ static const int TIMER_PERIOD_MEASUREMENT = 2000;
namespace
nr
::
ue
{
Ue
SraTask
::
UeSra
Task
(
TaskBase
*
base
)
Ue
RlsTask
::
UeRls
Task
(
TaskBase
*
base
)
:
m_base
{
base
},
m_udpTask
{},
m_cellSearchSpace
{},
m_pendingMeasurements
{},
m_activeMeasurements
{},
m_servingCell
{}
{
m_logger
=
m_base
->
logBase
->
makeUniqueLogger
(
m_base
->
config
->
getLoggerPrefix
()
+
"sra"
);
...
...
@@ -28,7 +28,7 @@ UeSraTask::UeSraTask(TaskBase *base)
m_sti
=
utils
::
Random64
();
}
void
Ue
Sra
Task
::
onStart
()
void
Ue
Rls
Task
::
onStart
()
{
m_udpTask
=
new
udp
::
UdpServerTask
(
this
);
...
...
@@ -42,7 +42,7 @@ void UeSraTask::onStart()
onMeasurement
();
}
void
Ue
Sra
Task
::
onLoop
()
void
Ue
Rls
Task
::
onLoop
()
{
NtsMessage
*
msg
=
take
();
if
(
!
msg
)
...
...
@@ -50,29 +50,29 @@ void UeSraTask::onLoop()
switch
(
msg
->
msgType
)
{
case
NtsMessageType
:
:
UE_RRC_TO_
SRA
:
{
auto
*
w
=
dynamic_cast
<
NwUeRrcTo
Sra
*>
(
msg
);
case
NtsMessageType
:
:
UE_RRC_TO_
RLS
:
{
auto
*
w
=
dynamic_cast
<
NwUeRrcTo
Rls
*>
(
msg
);
switch
(
w
->
present
)
{
case
NwUeRrcTo
Sra
:
:
PLMN_SEARCH_REQUEST
:
case
NwUeRrcTo
Rls
:
:
PLMN_SEARCH_REQUEST
:
plmnSearchRequested
();
break
;
case
NwUeRrcTo
Sra
:
:
CELL_SELECTION_COMMAND
:
case
NwUeRrcTo
Rls
:
:
CELL_SELECTION_COMMAND
:
handleCellSelectionCommand
(
w
->
cellId
,
w
->
isSuitableCell
);
break
;
case
NwUeRrcTo
Sra
:
:
RRC_PDU_DELIVERY
:
deliverUplinkPdu
(
sra
::
EPduType
::
RRC
,
std
::
move
(
w
->
pdu
),
case
NwUeRrcTo
Rls
:
:
RRC_PDU_DELIVERY
:
deliverUplinkPdu
(
rls
::
EPduType
::
RRC
,
std
::
move
(
w
->
pdu
),
OctetString
::
FromOctet4
(
static_cast
<
int
>
(
w
->
channel
)));
break
;
}
break
;
}
case
NtsMessageType
:
:
UE_APP_TO_
SRA
:
{
auto
*
w
=
dynamic_cast
<
NwUeAppTo
Sra
*>
(
msg
);
case
NtsMessageType
:
:
UE_APP_TO_
RLS
:
{
auto
*
w
=
dynamic_cast
<
NwUeAppTo
Rls
*>
(
msg
);
switch
(
w
->
present
)
{
case
NwUeAppTo
Sra
:
:
DATA_PDU_DELIVERY
:
{
deliverUplinkPdu
(
sra
::
EPduType
::
DATA
,
std
::
move
(
w
->
pdu
),
OctetString
::
FromOctet4
(
static_cast
<
int
>
(
w
->
psi
)));
case
NwUeAppTo
Rls
:
:
DATA_PDU_DELIVERY
:
{
deliverUplinkPdu
(
rls
::
EPduType
::
DATA
,
std
::
move
(
w
->
pdu
),
OctetString
::
FromOctet4
(
static_cast
<
int
>
(
w
->
psi
)));
break
;
}
}
...
...
@@ -89,13 +89,13 @@ void UeSraTask::onLoop()
}
case
NtsMessageType
:
:
UDP_SERVER_RECEIVE
:
{
auto
*
w
=
dynamic_cast
<
udp
::
NwUdpServerReceive
*>
(
msg
);
auto
sraMsg
=
sra
::
DecodeSra
Message
(
OctetView
{
w
->
packet
});
if
(
sra
Msg
==
nullptr
)
auto
rlsMsg
=
rls
::
DecodeRls
Message
(
OctetView
{
w
->
packet
});
if
(
rls
Msg
==
nullptr
)
{
m_logger
->
err
(
"Unable to decode
SRA
message"
);
m_logger
->
err
(
"Unable to decode
RLS
message"
);
break
;
}
receive
SraMessage
(
w
->
fromAddress
,
*
sra
Msg
);
receive
RlsMessage
(
w
->
fromAddress
,
*
rls
Msg
);
break
;
}
default:
...
...
@@ -106,7 +106,7 @@ void UeSraTask::onLoop()
delete
msg
;
}
void
Ue
Sra
Task
::
onQuit
()
void
Ue
Rls
Task
::
onQuit
()
{
m_udpTask
->
quit
();
delete
m_udpTask
;
...
...
src/ue/
sra
/task.hpp
→
src/ue/
rls
/task.hpp
View file @
de9a3790
...
...
@@ -15,7 +15,7 @@
#include <udp/server_task.hpp>
#include <ue/types.hpp>
#include <unordered_map>
#include <urs/
sra
_pdu.hpp>
#include <urs/
rls
_pdu.hpp>
#include <utils/common_types.hpp>
#include <utils/logger.hpp>
#include <utils/nts.hpp>
...
...
@@ -24,7 +24,7 @@
namespace
nr
::
ue
{
class
Ue
Sra
Task
:
public
NtsTask
class
Ue
Rls
Task
:
public
NtsTask
{
private:
TaskBase
*
m_base
;
...
...
@@ -41,8 +41,8 @@ class UeSraTask : public NtsTask
friend
class
UeCmdHandler
;
public:
explicit
Ue
Sra
Task
(
TaskBase
*
base
);
~
Ue
Sra
Task
()
override
=
default
;
explicit
Ue
Rls
Task
(
TaskBase
*
base
);
~
Ue
Rls
Task
()
override
=
default
;
protected:
void
onStart
()
override
;
...
...
@@ -50,14 +50,14 @@ class UeSraTask : public NtsTask
void
onQuit
()
override
;
private:
/* Transport */
void
receive
SraMessage
(
const
InetAddress
&
address
,
sra
::
SraMessage
&
msg
);
void
send
SraMessage
(
const
InetAddress
&
address
,
const
sra
::
SraMessage
&
msg
);
void
deliverUplinkPdu
(
sra
::
EPduType
pduType
,
OctetString
&&
pdu
,
OctetString
&&
payload
);
void
deliverDownlinkPdu
(
sra
::
SraPduDelivery
&
msg
);
void
receive
RlsMessage
(
const
InetAddress
&
address
,
rls
::
SraMessage
&
msg
);
void
send
RlsMessage
(
const
InetAddress
&
address
,
const
rls
::
SraMessage
&
msg
);
void
deliverUplinkPdu
(
rls
::
EPduType
pduType
,
OctetString
&&
pdu
,
OctetString
&&
payload
);
void
deliverDownlinkPdu
(
rls
::
SraPduDelivery
&
msg
);
private:
/* Measurement */
void
onMeasurement
();
void
receiveCellInfoResponse
(
const
sra
::
SraCellInfoResponse
&
msg
);
void
receiveCellInfoResponse
(
const
rls
::
SraCellInfoResponse
&
msg
);
void
onCoverageChange
(
const
std
::
vector
<
GlobalNci
>
&
entered
,
const
std
::
vector
<
GlobalNci
>
&
exited
);
void
plmnSearchRequested
();
void
handleCellSelectionCommand
(
const
GlobalNci
&
cellId
,
bool
isSuitable
);
...
...
src/ue/
sra
/transport.cpp
→
src/ue/
rls
/transport.cpp
View file @
de9a3790
...
...
@@ -15,15 +15,15 @@
namespace
nr
::
ue
{
void
Ue
SraTask
::
receiveSraMessage
(
const
InetAddress
&
address
,
sra
::
SraMessage
&
msg
)
void
Ue
RlsTask
::
receiveRlsMessage
(
const
InetAddress
&
address
,
rls
::
SraMessage
&
msg
)
{
switch
(
msg
.
msgType
)
{
case
sra
:
:
EMessageType
::
CELL_INFO_RESPONSE
:
{
receiveCellInfoResponse
((
const
sra
::
SraCellInfoResponse
&
)
msg
);
case
rls
:
:
EMessageType
::
CELL_INFO_RESPONSE
:
{
receiveCellInfoResponse
((
const
rls
::
SraCellInfoResponse
&
)
msg
);
break
;
case
sra
:
:
EMessageType
::
PDU_DELIVERY
:
{
deliverDownlinkPdu
((
sra
::
SraPduDelivery
&
)
msg
);
case
rls
:
:
EMessageType
::
PDU_DELIVERY
:
{
deliverDownlinkPdu
((
rls
::
SraPduDelivery
&
)
msg
);
break
;
}
default:
...
...
@@ -33,14 +33,14 @@ void UeSraTask::receiveSraMessage(const InetAddress &address, sra::SraMessage &m
}
}
void
Ue
SraTask
::
sendSraMessage
(
const
InetAddress
&
address
,
const
sra
::
SraMessage
&
msg
)
void
Ue
RlsTask
::
sendRlsMessage
(
const
InetAddress
&
address
,
const
rls
::
SraMessage
&
msg
)
{
OctetString
stream
{};
sra
::
EncodeSra
Message
(
msg
,
stream
);
rls
::
EncodeRls
Message
(
msg
,
stream
);
m_udpTask
->
send
(
address
,
stream
);
}
void
Ue
SraTask
::
deliverUplinkPdu
(
sra
::
EPduType
pduType
,
OctetString
&&
pdu
,
OctetString
&&
payload
)
void
Ue
RlsTask
::
deliverUplinkPdu
(
rls
::
EPduType
pduType
,
OctetString
&&
pdu
,
OctetString
&&
payload
)
{
if
(
!
m_servingCell
.
has_value
())
{
...
...
@@ -48,25 +48,25 @@ void UeSraTask::deliverUplinkPdu(sra::EPduType pduType, OctetString &&pdu, Octet
return
;
}
sra
::
SraPduDelivery
msg
{
m_sti
};
rls
::
SraPduDelivery
msg
{
m_sti
};
msg
.
pduType
=
pduType
;
msg
.
pdu
=
std
::
move
(
pdu
);
msg
.
payload
=
std
::
move
(
payload
);
send
Sra
Message
(
InetAddress
{
m_servingCell
->
linkIp
,
cons
::
PortalPort
},
msg
);
send
Rls
Message
(
InetAddress
{
m_servingCell
->
linkIp
,
cons
::
PortalPort
},
msg
);
}
void
Ue
SraTask
::
deliverDownlinkPdu
(
sra
::
SraPduDelivery
&
msg
)
void
Ue
RlsTask
::
deliverDownlinkPdu
(
rls
::
SraPduDelivery
&
msg
)
{
if
(
msg
.
pduType
==
sra
::
EPduType
::
RRC
)
if
(
msg
.
pduType
==
rls
::
EPduType
::
RRC
)
{
auto
*
nw
=
new
NwUe
SraToRrc
(
NwUeSra
ToRrc
::
RRC_PDU_DELIVERY
);
auto
*
nw
=
new
NwUe
RlsToRrc
(
NwUeRls
ToRrc
::
RRC_PDU_DELIVERY
);
nw
->
channel
=
static_cast
<
rrc
::
RrcChannel
>
(
msg
.
payload
.
get4I
(
0
));
nw
->
pdu
=
std
::
move
(
msg
.
pdu
);
m_base
->
rrcTask
->
push
(
nw
);
}
else
if
(
msg
.
pduType
==
sra
::
EPduType
::
DATA
)
else
if
(
msg
.
pduType
==
rls
::
EPduType
::
DATA
)
{
auto
*
nw
=
new
NwUe
SraToApp
(
NwUeSra
ToApp
::
DATA_PDU_DELIVERY
);
auto
*
nw
=
new
NwUe
RlsToApp
(
NwUeRls
ToApp
::
DATA_PDU_DELIVERY
);
nw
->
psi
=
msg
.
payload
.
get4I
(
0
);
nw
->
pdu
=
std
::
move
(
msg
.
pdu
);
m_base
->
appTask
->
push
(
nw
);
...
...
src/ue/rrc/channel.cpp
View file @
de9a3790
...
...
@@ -9,7 +9,7 @@
#include "task.hpp"
#include <rrc/encode.hpp>
#include <ue/
sra
/task.hpp>
#include <ue/
rls
/task.hpp>
#include <asn/rrc/ASN_RRC_RRCReject.h>
#include <asn/rrc/ASN_RRC_RRCSetup.h>
...
...
@@ -107,10 +107,10 @@ void UeRrcTask::sendRrcMessage(ASN_RRC_BCCH_BCH_Message *msg)
return
;
}
auto
*
nw
=
new
NwUeRrcTo
Sra
(
NwUeRrcToSra
::
RRC_PDU_DELIVERY
);
auto
*
nw
=
new
NwUeRrcTo
Rls
(
NwUeRrcToRls
::
RRC_PDU_DELIVERY
);
nw
->
channel
=
rrc
::
RrcChannel
::
BCCH_BCH
;
nw
->
pdu
=
std
::
move
(
pdu
);
m_base
->
sra
Task
->
push
(
nw
);
m_base
->
rls
Task
->
push
(
nw
);
}
void
UeRrcTask
::
sendRrcMessage
(
ASN_RRC_BCCH_DL_SCH_Message
*
msg
)
...
...
@@ -122,10 +122,10 @@ void UeRrcTask::sendRrcMessage(ASN_RRC_BCCH_DL_SCH_Message *msg)
return
;
}
auto
*
nw
=
new
NwUeRrcTo
Sra
(
NwUeRrcToSra
::
RRC_PDU_DELIVERY
);
auto
*
nw
=
new
NwUeRrcTo
Rls
(
NwUeRrcToRls
::
RRC_PDU_DELIVERY
);
nw
->
channel
=
rrc
::
RrcChannel
::
BCCH_DL_SCH
;
nw
->
pdu
=
std
::
move
(
pdu
);
m_base
->
sra
Task
->
push
(
nw
);
m_base
->
rls
Task
->
push
(
nw
);
}
void
UeRrcTask
::
sendRrcMessage
(
ASN_RRC_DL_CCCH_Message
*
msg
)
...
...
@@ -137,10 +137,10 @@ void UeRrcTask::sendRrcMessage(ASN_RRC_DL_CCCH_Message *msg)
return
;
}
auto
*
nw
=
new
NwUeRrcTo
Sra
(
NwUeRrcToSra
::
RRC_PDU_DELIVERY
);
auto
*
nw
=
new
NwUeRrcTo
Rls
(
NwUeRrcToRls
::
RRC_PDU_DELIVERY
);
nw
->
channel
=
rrc
::
RrcChannel
::
DL_CCCH
;
nw
->
pdu
=
std
::
move
(
pdu
);
m_base
->
sra
Task
->
push
(
nw
);
m_base
->
rls
Task
->
push
(
nw
);
}
void
UeRrcTask
::
sendRrcMessage
(
ASN_RRC_DL_DCCH_Message
*
msg
)
...
...
@@ -152,10 +152,10 @@ void UeRrcTask::sendRrcMessage(ASN_RRC_DL_DCCH_Message *msg)
return
;
}
auto
*
nw
=
new
NwUeRrcTo
Sra
(
NwUeRrcToSra
::
RRC_PDU_DELIVERY
);
auto
*
nw
=
new
NwUeRrcTo
Rls
(
NwUeRrcToRls
::
RRC_PDU_DELIVERY
);
nw
->
channel
=
rrc
::
RrcChannel
::
DL_DCCH
;
nw
->
pdu
=
std
::
move
(
pdu
);
m_base
->
sra
Task
->
push
(
nw
);
m_base
->
rls
Task
->
push
(
nw
);
}
void
UeRrcTask
::
sendRrcMessage
(
ASN_RRC_PCCH_Message
*
msg
)
...
...
@@ -167,10 +167,10 @@ void UeRrcTask::sendRrcMessage(ASN_RRC_PCCH_Message *msg)
return
;
}
auto
*
nw
=
new
NwUeRrcTo
Sra
(
NwUeRrcToSra
::
RRC_PDU_DELIVERY
);
auto
*
nw
=
new
NwUeRrcTo
Rls
(
NwUeRrcToRls
::
RRC_PDU_DELIVERY
);
nw
->
channel
=
rrc
::
RrcChannel
::
PCCH
;
nw
->
pdu
=
std
::
move
(
pdu
);
m_base
->
sra
Task
->
push
(
nw
);
m_base
->
rls
Task
->
push
(
nw
);
}
void
UeRrcTask
::
sendRrcMessage
(
ASN_RRC_UL_CCCH_Message
*
msg
)
...
...
@@ -182,10 +182,10 @@ void UeRrcTask::sendRrcMessage(ASN_RRC_UL_CCCH_Message *msg)
return
;
}
auto
*
nw
=
new
NwUeRrcTo
Sra
(
NwUeRrcToSra
::
RRC_PDU_DELIVERY
);
auto
*
nw
=
new
NwUeRrcTo
Rls
(
NwUeRrcToRls
::
RRC_PDU_DELIVERY
);
nw
->
channel
=
rrc
::
RrcChannel
::
UL_CCCH
;
nw
->
pdu
=
std
::
move
(
pdu
);
m_base
->
sra
Task
->
push
(
nw
);
m_base
->
rls
Task
->
push
(
nw
);
}
void
UeRrcTask
::
sendRrcMessage
(
ASN_RRC_UL_CCCH1_Message
*
msg
)
...
...
@@ -197,10 +197,10 @@ void UeRrcTask::sendRrcMessage(ASN_RRC_UL_CCCH1_Message *msg)
return
;
}
auto
*
nw
=
new
NwUeRrcTo
Sra
(
NwUeRrcToSra
::
RRC_PDU_DELIVERY
);
auto
*
nw
=
new
NwUeRrcTo
Rls
(
NwUeRrcToRls
::
RRC_PDU_DELIVERY
);
nw
->
channel
=
rrc
::
RrcChannel
::
UL_CCCH1
;
nw
->
pdu
=
std
::
move
(
pdu
);
m_base
->
sra
Task
->
push
(
nw
);
m_base
->
rls
Task
->
push
(
nw
);
}
void
UeRrcTask
::
sendRrcMessage
(
ASN_RRC_UL_DCCH_Message
*
msg
)
...
...
@@ -212,10 +212,10 @@ void UeRrcTask::sendRrcMessage(ASN_RRC_UL_DCCH_Message *msg)
return
;
}
auto
*
nw
=
new
NwUeRrcTo
Sra
(
NwUeRrcToSra
::
RRC_PDU_DELIVERY
);
auto
*
nw
=
new
NwUeRrcTo
Rls
(
NwUeRrcToRls
::
RRC_PDU_DELIVERY
);
nw
->
channel
=
rrc
::
RrcChannel
::
UL_DCCH
;
nw
->
pdu
=
std
::
move
(
pdu
);
m_base
->
sra
Task
->
push
(
nw
);
m_base
->
rls
Task
->
push
(
nw
);
}
void
UeRrcTask
::
receiveRrcMessage
(
ASN_RRC_BCCH_BCH_Message
*
msg
)
...
...
src/ue/rrc/task.cpp
View file @
de9a3790
...
...
@@ -14,7 +14,7 @@
#include <rrc/encode.hpp>
#include <ue/app/task.hpp>
#include <ue/nas/task.hpp>
#include <ue/
sra
/task.hpp>
#include <ue/
rls
/task.hpp>
#include <utils/common.hpp>
namespace
nr
::
ue
...
...
@@ -49,7 +49,7 @@ void UeRrcTask::onLoop()
switch
(
w
->
present
)
{
case
NwUeNasToRrc
:
:
PLMN_SEARCH_REQUEST
:
{
m_base
->
sraTask
->
push
(
new
NwUeRrcToSra
(
NwUeRrcToSra
::
PLMN_SEARCH_REQUEST
));
m_base
->
rlsTask
->
push
(
new
NwUeRrcToRls
(
NwUeRrcToRls
::
PLMN_SEARCH_REQUEST
));
break
;
}
case
NwUeNasToRrc
:
:
INITIAL_NAS_DELIVERY
:
{
...
...
@@ -66,36 +66,36 @@ void UeRrcTask::onLoop()
break
;
}
case
NwUeNasToRrc
:
:
CELL_SELECTION_COMMAND
:
{
auto
*
wr
=
new
NwUeRrcTo
Sra
(
NwUeRrcToSra
::
CELL_SELECTION_COMMAND
);
auto
*
wr
=
new
NwUeRrcTo
Rls
(
NwUeRrcToRls
::
CELL_SELECTION_COMMAND
);
wr
->
cellId
=
w
->
cellId
;
wr
->
isSuitableCell
=
w
->
isSuitableCell
;
m_base
->
sra
Task
->
push
(
wr
);
m_base
->
rls
Task
->
push
(
wr
);
break
;
}
}
break
;
}
case
NtsMessageType
:
:
UE_
SRA
_TO_RRC
:
{
auto
*
w
=
dynamic_cast
<
NwUe
Sra
ToRrc
*>
(
msg
);
case
NtsMessageType
:
:
UE_
RLS
_TO_RRC
:
{
auto
*
w
=
dynamic_cast
<
NwUe
Rls
ToRrc
*>
(
msg
);
switch
(
w
->
present
)
{
case
NwUe
Sra
ToRrc
:
:
PLMN_SEARCH_RESPONSE
:
{
case
NwUe
Rls
ToRrc
:
:
PLMN_SEARCH_RESPONSE
:
{
auto
*
wr
=
new
NwUeRrcToNas
(
NwUeRrcToNas
::
PLMN_SEARCH_RESPONSE
);
wr
->
measurements
=
std
::
move
(
w
->
measurements
);
m_base
->
nasTask
->
push
(
wr
);
break
;
}
case
NwUe
Sra
ToRrc
:
:
SERVING_CELL_CHANGE
:
{
case
NwUe
Rls
ToRrc
:
:
SERVING_CELL_CHANGE
:
{
auto
*
wr
=
new
NwUeRrcToNas
(
NwUeRrcToNas
::
SERVING_CELL_CHANGE
);
wr
->
servingCell
=
w
->
servingCell
;
m_base
->
nasTask
->
push
(
wr
);
break
;
}
case
NwUe
Sra
ToRrc
:
:
RRC_PDU_DELIVERY
:
{
case
NwUe
Rls
ToRrc
:
:
RRC_PDU_DELIVERY
:
{
handleDownlinkRrc
(
w
->
channel
,
w
->
pdu
);
break
;
}
case
NwUe
Sra
ToRrc
:
:
RADIO_LINK_FAILURE
:
{
case
NwUe
Rls
ToRrc
:
:
RADIO_LINK_FAILURE
:
{
handleRadioLinkFailure
();
break
;
}
...
...
src/ue/types.hpp
View file @
de9a3790
...
...
@@ -26,7 +26,7 @@ namespace nr::ue
class
UeAppTask
;
class
NasTask
;
class
UeRrcTask
;
class
Ue
Sra
Task
;
class
Ue
Rls
Task
;
class
UserEquipment
;
struct
SupportedAlgs
...
...
@@ -124,7 +124,7 @@ struct TaskBase
UeAppTask
*
appTask
{};
NasTask
*
nasTask
{};
UeRrcTask
*
rrcTask
{};
Ue
SraTask
*
sra
Task
{};
Ue
RlsTask
*
rls
Task
{};
};
struct
UeTimers
...
...
src/ue/ue.cpp
View file @
de9a3790
...
...
@@ -9,9 +9,9 @@
#include "ue.hpp"
#include "app/task.hpp"
#include "sra/task.hpp"
#include "nas/task.hpp"
#include "rrc/task.hpp"
#include "rls/task.hpp"
namespace
nr
::
ue
{
...
...
@@ -30,7 +30,7 @@ UserEquipment::UserEquipment(UeConfig *config, app::IUeController *ueController,
base
->
nasTask
=
new
NasTask
(
base
);
base
->
rrcTask
=
new
UeRrcTask
(
base
);
base
->
appTask
=
new
UeAppTask
(
base
);
base
->
sraTask
=
new
UeSra
Task
(
base
);
base
->
rlsTask
=
new
UeRls
Task
(
base
);
taskBase
=
base
;
}
...
...
@@ -39,12 +39,12 @@ UserEquipment::~UserEquipment()
{
taskBase
->
nasTask
->
quit
();
taskBase
->
rrcTask
->
quit
();
taskBase
->
sra
Task
->
quit
();
taskBase
->
rls
Task
->
quit
();
taskBase
->
appTask
->
quit
();
delete
taskBase
->
nasTask
;
delete
taskBase
->
rrcTask
;
delete
taskBase
->
sra
Task
;
delete
taskBase
->
rls
Task
;
delete
taskBase
->
appTask
;
delete
taskBase
->
logBase
;
...
...
@@ -56,7 +56,7 @@ void UserEquipment::start()
{
taskBase
->
nasTask
->
start
();
taskBase
->
rrcTask
->
start
();
taskBase
->
sra
Task
->
start
();
taskBase
->
rls
Task
->
start
();
taskBase
->
appTask
->
start
();
}
...
...
src/urs/
sra
_pdu.cpp
→
src/urs/
rls
_pdu.cpp
View file @
de9a3790
...
...
@@ -6,10 +6,10 @@
// and subject to the terms and conditions defined in LICENSE file.
//
#include "
sra
_pdu.hpp"
#include "
rls
_pdu.hpp"
#include <utils/constants.hpp>
namespace
sra
namespace
rls
{
static
void
AppendPlmn
(
const
Plmn
&
plmn
,
OctetString
&
stream
)
...
...
@@ -42,7 +42,7 @@ static GlobalNci DecodeGlobalNci(const OctetView &stream)
return
res
;
}
void
Encode
Sra
Message
(
const
SraMessage
&
msg
,
OctetString
&
stream
)
void
Encode
Rls
Message
(
const
SraMessage
&
msg
,
OctetString
&
stream
)
{
stream
.
appendOctet
(
0x03
);
// (Just for old RLS compatibility)
...
...
@@ -80,7 +80,7 @@ void EncodeSraMessage(const SraMessage &msg, OctetString &stream)
}
}
std
::
unique_ptr
<
SraMessage
>
Decode
Sra
Message
(
const
OctetView
&
stream
)
std
::
unique_ptr
<
SraMessage
>
Decode
Rls
Message
(
const
OctetView
&
stream
)
{
auto
first
=
stream
.
readI
();
// (Just for old RLS compatibility)
if
(
first
!=
3
)
...
...
src/urs/
sra
_pdu.hpp
→
src/urs/
rls
_pdu.hpp
View file @
de9a3790
...
...
@@ -14,7 +14,7 @@
#include <utils/octet_string.hpp>
#include <utils/octet_view.hpp>
namespace
sra
namespace
rls
{
enum
class
EMessageType
:
uint8_t
...
...
@@ -75,7 +75,7 @@ struct SraPduDelivery : SraMessage
}
};
void
Encode
Sra
Message
(
const
SraMessage
&
msg
,
OctetString
&
stream
);
std
::
unique_ptr
<
SraMessage
>
Decode
Sra
Message
(
const
OctetView
&
stream
);
void
Encode
Rls
Message
(
const
SraMessage
&
msg
,
OctetString
&
stream
);
std
::
unique_ptr
<
SraMessage
>
Decode
Rls
Message
(
const
OctetView
&
stream
);
}
// namespace sra
\ No newline at end of file
src/utils/nts.hpp
View file @
de9a3790
...
...
@@ -34,24 +34,24 @@ enum class NtsMessageType
UDP_SERVER_RECEIVE
,
CLI_SEND_RESPONSE
,
GNB_
SRA
_TO_RRC
,
GNB_
SRA
_TO_GTP
,
GNB_GTP_TO_
SRA
,
GNB_RRC_TO_
SRA
,
GNB_
RLS
_TO_RRC
,
GNB_
RLS
_TO_GTP
,
GNB_GTP_TO_
RLS
,
GNB_RRC_TO_
RLS
,
GNB_NGAP_TO_RRC
,
GNB_RRC_TO_NGAP
,
GNB_NGAP_TO_GTP
,
GNB_SCTP
,
UE_APP_TO_
SRA
,
UE_APP_TO_
RLS
,
UE_APP_TO_TUN
,
UE_TUN_TO_APP
,
UE_RRC_TO_NAS
,
UE_NAS_TO_RRC
,
UE_RRC_TO_
SRA
,
UE_RRC_TO_
RLS
,
UE_NAS_TO_NAS
,
UE_
SRA
_TO_RRC
,
UE_
SRA
_TO_APP
,
UE_
RLS
_TO_RRC
,
UE_
RLS
_TO_APP
,
UE_NAS_TO_APP
,
};
...
...
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