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
fdf86aaf
Commit
fdf86aaf
authored
May 23, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
L3 RRC/NAS developments
parent
06b09000
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
42 deletions
+42
-42
src/ue/app/task.cpp
src/ue/app/task.cpp
+4
-4
src/ue/nas/mm/messaging.cpp
src/ue/nas/mm/messaging.cpp
+4
-4
src/ue/nas/sm/sap.cpp
src/ue/nas/sm/sap.cpp
+4
-4
src/ue/nas/task.cpp
src/ue/nas/task.cpp
+3
-3
src/ue/rrc/channel.cpp
src/ue/rrc/channel.cpp
+15
-15
src/ue/rrc/nas.cpp
src/ue/rrc/nas.cpp
+3
-3
src/ue/tun/task.cpp
src/ue/tun/task.cpp
+9
-9
No files found.
src/ue/app/task.cpp
View file @
fdf86aaf
...
@@ -59,10 +59,10 @@ void UeAppTask::onLoop()
...
@@ -59,10 +59,10 @@ void UeAppTask::onLoop()
auto
*
tunTask
=
m_tunTasks
[
w
->
psi
];
auto
*
tunTask
=
m_tunTasks
[
w
->
psi
];
if
(
tunTask
)
if
(
tunTask
)
{
{
auto
*
nw
=
new
NmAppToTun
(
NmAppToTun
::
DATA_PDU_DELIVERY
);
auto
*
m
=
new
NmAppToTun
(
NmAppToTun
::
DATA_PDU_DELIVERY
);
nw
->
psi
=
w
->
psi
;
m
->
psi
=
w
->
psi
;
nw
->
data
=
std
::
move
(
w
->
pdu
);
m
->
data
=
std
::
move
(
w
->
pdu
);
tunTask
->
push
(
nw
);
tunTask
->
push
(
m
);
}
}
break
;
break
;
}
}
...
...
src/ue/nas/mm/messaging.cpp
View file @
fdf86aaf
...
@@ -166,10 +166,10 @@ void NasMm::sendNasMessage(const nas::PlainMmMessage &msg)
...
@@ -166,10 +166,10 @@ void NasMm::sendNasMessage(const nas::PlainMmMessage &msg)
}
}
}
}
auto
*
nw
=
new
NmUeNasToRrc
(
NmUeNasToRrc
::
UPLINK_NAS_DELIVERY
);
auto
*
m
=
new
NmUeNasToRrc
(
NmUeNasToRrc
::
UPLINK_NAS_DELIVERY
);
nw
->
pduId
=
0
;
m
->
pduId
=
0
;
nw
->
nasPdu
=
std
::
move
(
pdu
);
m
->
nasPdu
=
std
::
move
(
pdu
);
m_base
->
rrcTask
->
push
(
nw
);
m_base
->
rrcTask
->
push
(
m
);
}
}
void
NasMm
::
receiveNasMessage
(
const
nas
::
NasMessage
&
msg
)
void
NasMm
::
receiveNasMessage
(
const
nas
::
NasMessage
&
msg
)
...
...
src/ue/nas/sm/sap.cpp
View file @
fdf86aaf
...
@@ -58,10 +58,10 @@ void NasSm::handleUplinkDataRequest(int psi, OctetString &&data)
...
@@ -58,10 +58,10 @@ void NasSm::handleUplinkDataRequest(int psi, OctetString &&data)
handleUplinkStatusChange
(
psi
,
false
);
handleUplinkStatusChange
(
psi
,
false
);
}
}
auto
*
nw
=
new
NmUeNasToRls
(
NmUeNasToRls
::
DATA_PDU_DELIVERY
);
auto
*
m
=
new
NmUeNasToRls
(
NmUeNasToRls
::
DATA_PDU_DELIVERY
);
nw
->
psi
=
psi
;
m
->
psi
=
psi
;
nw
->
pdu
=
std
::
move
(
data
);
m
->
pdu
=
std
::
move
(
data
);
m_base
->
rlsTask
->
push
(
nw
);
m_base
->
rlsTask
->
push
(
m
);
}
}
else
else
{
{
...
...
src/ue/nas/task.cpp
View file @
fdf86aaf
...
@@ -123,9 +123,9 @@ void NasTask::onLoop()
...
@@ -123,9 +123,9 @@ void NasTask::onLoop()
void
NasTask
::
performTick
()
void
NasTask
::
performTick
()
{
{
auto
sendExpireMsg
=
[
this
](
UeTimer
*
timer
)
{
auto
sendExpireMsg
=
[
this
](
UeTimer
*
timer
)
{
auto
*
nw
=
new
NmUeNasToNas
(
NmUeNasToNas
::
NAS_TIMER_EXPIRE
);
auto
*
m
=
new
NmUeNasToNas
(
NmUeNasToNas
::
NAS_TIMER_EXPIRE
);
nw
->
timer
=
timer
;
m
->
timer
=
timer
;
push
(
nw
);
push
(
m
);
};
};
if
(
timers
.
t3346
.
performTick
())
if
(
timers
.
t3346
.
performTick
())
...
...
src/ue/rrc/channel.cpp
View file @
fdf86aaf
...
@@ -93,11 +93,11 @@ void UeRrcTask::sendRrcMessage(int cellId, ASN_RRC_UL_CCCH_Message *msg)
...
@@ -93,11 +93,11 @@ void UeRrcTask::sendRrcMessage(int cellId, ASN_RRC_UL_CCCH_Message *msg)
return
;
return
;
}
}
auto
*
nw
=
new
NmUeRrcToRls
(
NmUeRrcToRls
::
RRC_PDU_DELIVERY
);
auto
*
m
=
new
NmUeRrcToRls
(
NmUeRrcToRls
::
RRC_PDU_DELIVERY
);
nw
->
cellId
=
cellId
;
m
->
cellId
=
cellId
;
nw
->
channel
=
rrc
::
RrcChannel
::
UL_CCCH
;
m
->
channel
=
rrc
::
RrcChannel
::
UL_CCCH
;
nw
->
pdu
=
std
::
move
(
pdu
);
m
->
pdu
=
std
::
move
(
pdu
);
m_base
->
rlsTask
->
push
(
nw
);
m_base
->
rlsTask
->
push
(
m
);
}
}
void
UeRrcTask
::
sendRrcMessage
(
int
cellId
,
ASN_RRC_UL_CCCH1_Message
*
msg
)
void
UeRrcTask
::
sendRrcMessage
(
int
cellId
,
ASN_RRC_UL_CCCH1_Message
*
msg
)
...
@@ -109,11 +109,11 @@ void UeRrcTask::sendRrcMessage(int cellId, ASN_RRC_UL_CCCH1_Message *msg)
...
@@ -109,11 +109,11 @@ void UeRrcTask::sendRrcMessage(int cellId, ASN_RRC_UL_CCCH1_Message *msg)
return
;
return
;
}
}
auto
*
nw
=
new
NmUeRrcToRls
(
NmUeRrcToRls
::
RRC_PDU_DELIVERY
);
auto
*
m
=
new
NmUeRrcToRls
(
NmUeRrcToRls
::
RRC_PDU_DELIVERY
);
nw
->
cellId
=
cellId
;
m
->
cellId
=
cellId
;
nw
->
channel
=
rrc
::
RrcChannel
::
UL_CCCH1
;
m
->
channel
=
rrc
::
RrcChannel
::
UL_CCCH1
;
nw
->
pdu
=
std
::
move
(
pdu
);
m
->
pdu
=
std
::
move
(
pdu
);
m_base
->
rlsTask
->
push
(
nw
);
m_base
->
rlsTask
->
push
(
m
);
}
}
void
UeRrcTask
::
sendRrcMessage
(
ASN_RRC_UL_DCCH_Message
*
msg
)
void
UeRrcTask
::
sendRrcMessage
(
ASN_RRC_UL_DCCH_Message
*
msg
)
...
@@ -125,11 +125,11 @@ void UeRrcTask::sendRrcMessage(ASN_RRC_UL_DCCH_Message *msg)
...
@@ -125,11 +125,11 @@ void UeRrcTask::sendRrcMessage(ASN_RRC_UL_DCCH_Message *msg)
return
;
return
;
}
}
auto
*
nw
=
new
NmUeRrcToRls
(
NmUeRrcToRls
::
RRC_PDU_DELIVERY
);
auto
*
m
=
new
NmUeRrcToRls
(
NmUeRrcToRls
::
RRC_PDU_DELIVERY
);
nw
->
cellId
=
m_base
->
shCtx
.
currentCell
.
get
<
int
>
([](
auto
&
value
)
{
return
value
.
cellId
;
});
m
->
cellId
=
m_base
->
shCtx
.
currentCell
.
get
<
int
>
([](
auto
&
value
)
{
return
value
.
cellId
;
});
nw
->
channel
=
rrc
::
RrcChannel
::
UL_DCCH
;
m
->
channel
=
rrc
::
RrcChannel
::
UL_DCCH
;
nw
->
pdu
=
std
::
move
(
pdu
);
m
->
pdu
=
std
::
move
(
pdu
);
m_base
->
rlsTask
->
push
(
nw
);
m_base
->
rlsTask
->
push
(
m
);
}
}
void
UeRrcTask
::
receiveRrcMessage
(
int
cellId
,
ASN_RRC_BCCH_BCH_Message
*
msg
)
void
UeRrcTask
::
receiveRrcMessage
(
int
cellId
,
ASN_RRC_BCCH_BCH_Message
*
msg
)
...
...
src/ue/rrc/nas.cpp
View file @
fdf86aaf
...
@@ -64,9 +64,9 @@ void UeRrcTask::receiveDownlinkInformationTransfer(const ASN_RRC_DLInformationTr
...
@@ -64,9 +64,9 @@ void UeRrcTask::receiveDownlinkInformationTransfer(const ASN_RRC_DLInformationTr
OctetString
nasPdu
=
OctetString
nasPdu
=
asn
::
GetOctetString
(
*
msg
.
criticalExtensions
.
choice
.
dlInformationTransfer
->
dedicatedNAS_Message
);
asn
::
GetOctetString
(
*
msg
.
criticalExtensions
.
choice
.
dlInformationTransfer
->
dedicatedNAS_Message
);
auto
*
nw
=
new
NmUeRrcToNas
(
NmUeRrcToNas
::
NAS_DELIVERY
);
auto
*
m
=
new
NmUeRrcToNas
(
NmUeRrcToNas
::
NAS_DELIVERY
);
nw
->
nasPdu
=
std
::
move
(
nasPdu
);
m
->
nasPdu
=
std
::
move
(
nasPdu
);
m_base
->
nasTask
->
push
(
nw
);
m_base
->
nasTask
->
push
(
m
);
}
}
}
// namespace nr::ue
}
// namespace nr::ue
\ No newline at end of file
src/ue/tun/task.cpp
View file @
fdf86aaf
...
@@ -37,9 +37,9 @@ static std::string GetErrorMessage(const std::string &cause)
...
@@ -37,9 +37,9 @@ static std::string GetErrorMessage(const std::string &cause)
static
nr
::
ue
::
NmUeTunToApp
*
NmError
(
std
::
string
&&
error
)
static
nr
::
ue
::
NmUeTunToApp
*
NmError
(
std
::
string
&&
error
)
{
{
auto
*
nw
=
new
nr
::
ue
::
NmUeTunToApp
(
nr
::
ue
::
NmUeTunToApp
::
TUN_ERROR
);
auto
*
m
=
new
nr
::
ue
::
NmUeTunToApp
(
nr
::
ue
::
NmUeTunToApp
::
TUN_ERROR
);
nw
->
error
=
std
::
move
(
error
);
m
->
error
=
std
::
move
(
error
);
return
nw
;
return
m
;
}
}
static
void
ReceiverThread
(
ReceiverArgs
*
args
)
static
void
ReceiverThread
(
ReceiverArgs
*
args
)
...
@@ -54,7 +54,7 @@ static void ReceiverThread(ReceiverArgs *args)
...
@@ -54,7 +54,7 @@ static void ReceiverThread(ReceiverArgs *args)
while
(
true
)
while
(
true
)
{
{
in
t
n
=
::
read
(
fd
,
buffer
,
RECEIVER_BUFFER_SIZE
);
ssize_
t
n
=
::
read
(
fd
,
buffer
,
RECEIVER_BUFFER_SIZE
);
if
(
n
<
0
)
if
(
n
<
0
)
{
{
targetTask
->
push
(
NmError
(
GetErrorMessage
(
"TUN device could not read"
)));
targetTask
->
push
(
NmError
(
GetErrorMessage
(
"TUN device could not read"
)));
...
@@ -63,10 +63,10 @@ static void ReceiverThread(ReceiverArgs *args)
...
@@ -63,10 +63,10 @@ static void ReceiverThread(ReceiverArgs *args)
if
(
n
>
0
)
if
(
n
>
0
)
{
{
auto
*
nw
=
new
nr
::
ue
::
NmUeTunToApp
(
nr
::
ue
::
NmUeTunToApp
::
DATA_PDU_DELIVERY
);
auto
*
m
=
new
nr
::
ue
::
NmUeTunToApp
(
nr
::
ue
::
NmUeTunToApp
::
DATA_PDU_DELIVERY
);
nw
->
psi
=
psi
;
m
->
psi
=
psi
;
nw
->
data
=
OctetString
::
FromArray
(
buffer
,
static_cast
<
size_t
>
(
n
));
m
->
data
=
OctetString
::
FromArray
(
buffer
,
static_cast
<
size_t
>
(
n
));
targetTask
->
push
(
nw
);
targetTask
->
push
(
m
);
}
}
}
}
}
}
...
@@ -104,7 +104,7 @@ void TunTask::onLoop()
...
@@ -104,7 +104,7 @@ void TunTask::onLoop()
{
{
case
NtsMessageType
:
:
UE_APP_TO_TUN
:
{
case
NtsMessageType
:
:
UE_APP_TO_TUN
:
{
auto
*
w
=
dynamic_cast
<
NmAppToTun
*>
(
msg
);
auto
*
w
=
dynamic_cast
<
NmAppToTun
*>
(
msg
);
in
t
res
=
::
write
(
m_fd
,
w
->
data
.
data
(),
w
->
data
.
length
());
ssize_
t
res
=
::
write
(
m_fd
,
w
->
data
.
data
(),
w
->
data
.
length
());
if
(
res
<
0
)
if
(
res
<
0
)
push
(
NmError
(
GetErrorMessage
(
"TUN device could not write"
)));
push
(
NmError
(
GetErrorMessage
(
"TUN device could not write"
)));
else
if
(
res
!=
w
->
data
.
length
())
else
if
(
res
!=
w
->
data
.
length
())
...
...
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