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
3a7c9ef8
Commit
3a7c9ef8
authored
Jan 05, 2022
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Performance improvements
parent
a34a7da2
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
16 additions
and
120 deletions
+16
-120
src/ue/app/task.cpp
src/ue/app/task.cpp
+0
-49
src/ue/app/task.hpp
src/ue/app/task.hpp
+0
-42
src/ue/cmd.cpp
src/ue/cmd.cpp
+2
-2
src/ue/cmd.hpp
src/ue/cmd.hpp
+2
-3
src/ue/l23/task.cpp
src/ue/l23/task.cpp
+7
-0
src/ue/nas/mm/base.cpp
src/ue/nas/mm/base.cpp
+0
-1
src/ue/nas/mm/ecall.cpp
src/ue/nas/mm/ecall.cpp
+0
-1
src/ue/nas/mm/proc.cpp
src/ue/nas/mm/proc.cpp
+0
-2
src/ue/nas/mm/radio.cpp
src/ue/nas/mm/radio.cpp
+0
-1
src/ue/nas/mm/slice.cpp
src/ue/nas/mm/slice.cpp
+0
-1
src/ue/nas/mm/timer.cpp
src/ue/nas/mm/timer.cpp
+0
-1
src/ue/nas/sm/establishment.cpp
src/ue/nas/sm/establishment.cpp
+0
-1
src/ue/nas/sm/procedure.cpp
src/ue/nas/sm/procedure.cpp
+3
-2
src/ue/nas/sm/release.cpp
src/ue/nas/sm/release.cpp
+0
-1
src/ue/nas/sm/resource.cpp
src/ue/nas/sm/resource.cpp
+0
-1
src/ue/nas/sm/sap.cpp
src/ue/nas/sm/sap.cpp
+0
-1
src/ue/nas/sm/timer.cpp
src/ue/nas/sm/timer.cpp
+1
-3
src/ue/rrc/layer.cpp
src/ue/rrc/layer.cpp
+0
-1
src/ue/types.hpp
src/ue/types.hpp
+0
-1
src/ue/ue.cpp
src/ue/ue.cpp
+1
-6
No files found.
src/ue/app/task.cpp
deleted
100644 → 0
View file @
a34a7da2
//
// This file is a part of UERANSIM open source project.
// Copyright (c) 2021 ALİ GÜNGÖR.
//
// The software and all associated files are licensed under GPL-3.0
// and subject to the terms and conditions defined in LICENSE file.
//
#include "task.hpp"
#include "cmd_handler.hpp"
#include <ue/tun/config.hpp>
namespace
nr
::
ue
{
UeAppTask
::
UeAppTask
(
TaskBase
*
base
)
:
m_base
{
base
}
{
m_logger
=
m_base
->
logBase
->
makeUniqueLogger
(
m_base
->
config
->
getLoggerPrefix
()
+
"app"
);
}
void
UeAppTask
::
onStart
()
{
}
void
UeAppTask
::
onQuit
()
{
}
void
UeAppTask
::
onLoop
()
{
auto
msg
=
take
();
if
(
!
msg
)
return
;
switch
(
msg
->
msgType
)
{
case
NtsMessageType
:
:
UE_CLI_COMMAND
:
{
auto
&
w
=
dynamic_cast
<
NmUeCliCommand
&>
(
*
msg
);
UeCmdHandler
handler
{
m_base
};
handler
.
handleCmd
(
w
);
break
;
}
default:
m_logger
->
unhandledNts
(
*
msg
);
break
;
}
}
}
// namespace nr::ue
src/ue/app/task.hpp
deleted
100644 → 0
View file @
a34a7da2
//
// This file is a part of UERANSIM open source project.
// Copyright (c) 2021 ALİ GÜNGÖR.
//
// The software and all associated files are licensed under GPL-3.0
// and subject to the terms and conditions defined in LICENSE file.
//
#pragma once
#include <memory>
#include <thread>
#include <ue/nts.hpp>
#include <ue/tun/layer.hpp>
#include <ue/types.hpp>
#include <unordered_map>
#include <utils/logger.hpp>
#include <utils/nts.hpp>
#include <vector>
namespace
nr
::
ue
{
class
UeAppTask
:
public
NtsTask
{
private:
TaskBase
*
m_base
;
std
::
unique_ptr
<
Logger
>
m_logger
;
friend
class
UeCmdHandler
;
public:
explicit
UeAppTask
(
TaskBase
*
base
);
~
UeAppTask
()
override
=
default
;
protected:
void
onStart
()
override
;
void
onLoop
()
override
;
void
onQuit
()
override
;
};
}
// namespace nr::ue
src/ue/
app/cmd_handler
.cpp
→
src/ue/
cmd
.cpp
View file @
3a7c9ef8
...
@@ -6,9 +6,9 @@
...
@@ -6,9 +6,9 @@
// and subject to the terms and conditions defined in LICENSE file.
// and subject to the terms and conditions defined in LICENSE file.
//
//
#include "cmd
_handler
.hpp"
#include "cmd.hpp"
#include <ue/
app/task
.hpp>
#include <ue/
cmd
.hpp>
#include <ue/l23/task.hpp>
#include <ue/l23/task.hpp>
#include <utils/common.hpp>
#include <utils/common.hpp>
#include <utils/printer.hpp>
#include <utils/printer.hpp>
...
...
src/ue/
app/cmd_handler
.hpp
→
src/ue/
cmd
.hpp
View file @
3a7c9ef8
...
@@ -8,9 +8,8 @@
...
@@ -8,9 +8,8 @@
#pragma once
#pragma once
#include <ue/nts.hpp>
#include "nts.hpp"
#include <ue/types.hpp>
#include "types.hpp"
#include "ue/l23/task.hpp"
namespace
nr
::
ue
namespace
nr
::
ue
{
{
...
...
src/ue/l23/task.cpp
View file @
3a7c9ef8
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include "task.hpp"
#include "task.hpp"
#include <utils/random.hpp>
#include <utils/random.hpp>
#include <ue/cmd.hpp>
struct
TimerId
struct
TimerId
{
{
...
@@ -116,6 +117,12 @@ void UeL23Task::onLoop()
...
@@ -116,6 +117,12 @@ void UeL23Task::onLoop()
{
{
setTimer
(
TimerId
::
SWITCH_OFF
,
TimerPeriod
::
SWITCH_OFF
);
setTimer
(
TimerId
::
SWITCH_OFF
,
TimerPeriod
::
SWITCH_OFF
);
}
}
else
if
(
msg
->
msgType
==
NtsMessageType
::
UE_CLI_COMMAND
)
{
auto
&
w
=
dynamic_cast
<
NmUeCliCommand
&>
(
*
msg
);
UeCmdHandler
handler
{
m_base
};
handler
.
handleCmd
(
w
);
}
else
else
{
{
m_logger
->
unhandledNts
(
*
msg
);
m_logger
->
unhandledNts
(
*
msg
);
...
...
src/ue/nas/mm/base.cpp
View file @
3a7c9ef8
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
#include "mm.hpp"
#include "mm.hpp"
#include <lib/nas/utils.hpp>
#include <lib/nas/utils.hpp>
#include <ue/app/task.hpp>
#include <ue/l23/task.hpp>
#include <ue/l23/task.hpp>
#include <ue/nas/usim/usim.hpp>
#include <ue/nas/usim/usim.hpp>
#include <utils/common.hpp>
#include <utils/common.hpp>
...
...
src/ue/nas/mm/ecall.cpp
View file @
3a7c9ef8
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
#include "mm.hpp"
#include "mm.hpp"
#include <lib/nas/utils.hpp>
#include <lib/nas/utils.hpp>
#include <ue/app/task.hpp>
namespace
nr
::
ue
namespace
nr
::
ue
{
{
...
...
src/ue/nas/mm/proc.cpp
View file @
3a7c9ef8
...
@@ -11,9 +11,7 @@
...
@@ -11,9 +11,7 @@
#include <algorithm>
#include <algorithm>
#include <lib/nas/utils.hpp>
#include <lib/nas/utils.hpp>
#include <ue/app/task.hpp>
#include <ue/nas/sm/sm.hpp>
#include <ue/nas/sm/sm.hpp>
#include <utils/common.hpp>
namespace
nr
::
ue
namespace
nr
::
ue
{
{
...
...
src/ue/nas/mm/radio.cpp
View file @
3a7c9ef8
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
#include <algorithm>
#include <algorithm>
#include <lib/nas/utils.hpp>
#include <lib/nas/utils.hpp>
#include <ue/app/task.hpp>
#include <ue/l23/task.hpp>
#include <ue/l23/task.hpp>
#include <ue/nas/sm/sm.hpp>
#include <ue/nas/sm/sm.hpp>
#include <utils/common.hpp>
#include <utils/common.hpp>
...
...
src/ue/nas/mm/slice.cpp
View file @
3a7c9ef8
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
#include "mm.hpp"
#include "mm.hpp"
#include <lib/nas/utils.hpp>
#include <lib/nas/utils.hpp>
#include <ue/app/task.hpp>
#include <ue/nas/sm/sm.hpp>
#include <ue/nas/sm/sm.hpp>
namespace
nr
::
ue
namespace
nr
::
ue
...
...
src/ue/nas/mm/timer.cpp
View file @
3a7c9ef8
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
#include "mm.hpp"
#include "mm.hpp"
#include <lib/nas/utils.hpp>
#include <lib/nas/utils.hpp>
#include <ue/app/task.hpp>
namespace
nr
::
ue
namespace
nr
::
ue
{
{
...
...
src/ue/nas/sm/establishment.cpp
View file @
3a7c9ef8
...
@@ -10,7 +10,6 @@
...
@@ -10,7 +10,6 @@
#include <algorithm>
#include <algorithm>
#include <lib/nas/proto_conf.hpp>
#include <lib/nas/proto_conf.hpp>
#include <lib/nas/utils.hpp>
#include <lib/nas/utils.hpp>
#include <ue/app/task.hpp>
#include <ue/nas/mm/mm.hpp>
#include <ue/nas/mm/mm.hpp>
namespace
nr
::
ue
namespace
nr
::
ue
...
...
src/ue/nas/sm/procedure.cpp
View file @
3a7c9ef8
...
@@ -7,9 +7,10 @@
...
@@ -7,9 +7,10 @@
//
//
#include "sm.hpp"
#include "sm.hpp"
#include <lib/nas/utils.hpp>
#include <set>
#include <set>
#include <ue/app/task.hpp>
#include <lib/nas/utils.hpp>
#include <ue/nas/mm/mm.hpp>
#include <ue/nas/mm/mm.hpp>
namespace
nr
::
ue
namespace
nr
::
ue
...
...
src/ue/nas/sm/release.cpp
View file @
3a7c9ef8
...
@@ -10,7 +10,6 @@
...
@@ -10,7 +10,6 @@
#include <lib/nas/proto_conf.hpp>
#include <lib/nas/proto_conf.hpp>
#include <lib/nas/utils.hpp>
#include <lib/nas/utils.hpp>
#include <optional>
#include <optional>
#include <ue/app/task.hpp>
#include <ue/l23/task.hpp>
#include <ue/l23/task.hpp>
#include <ue/nas/mm/mm.hpp>
#include <ue/nas/mm/mm.hpp>
...
...
src/ue/nas/sm/resource.cpp
View file @
3a7c9ef8
...
@@ -10,7 +10,6 @@
...
@@ -10,7 +10,6 @@
#include <algorithm>
#include <algorithm>
#include <lib/nas/proto_conf.hpp>
#include <lib/nas/proto_conf.hpp>
#include <lib/nas/utils.hpp>
#include <lib/nas/utils.hpp>
#include <ue/app/task.hpp>
#include <ue/l23/task.hpp>
#include <ue/l23/task.hpp>
#include <ue/nas/mm/mm.hpp>
#include <ue/nas/mm/mm.hpp>
...
...
src/ue/nas/sm/sap.cpp
View file @
3a7c9ef8
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
#include <algorithm>
#include <algorithm>
#include <lib/nas/proto_conf.hpp>
#include <lib/nas/proto_conf.hpp>
#include <ue/app/task.hpp>
#include <ue/l23/task.hpp>
#include <ue/l23/task.hpp>
#include <ue/nas/mm/mm.hpp>
#include <ue/nas/mm/mm.hpp>
...
...
src/ue/nas/sm/timer.cpp
View file @
3a7c9ef8
...
@@ -7,10 +7,8 @@
...
@@ -7,10 +7,8 @@
//
//
#include "sm.hpp"
#include "sm.hpp"
#include <algorithm>
#include <lib/nas/proto_conf.hpp>
#include <lib/nas/proto_conf.hpp>
#include <lib/nas/utils.hpp>
#include <ue/app/task.hpp>
#include <ue/nas/mm/mm.hpp>
#include <ue/nas/mm/mm.hpp>
namespace
nr
::
ue
namespace
nr
::
ue
...
...
src/ue/rrc/layer.cpp
View file @
3a7c9ef8
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
#include <asn/rrc/ASN_RRC_ULInformationTransfer.h>
#include <asn/rrc/ASN_RRC_ULInformationTransfer.h>
#include <lib/rrc/encode.hpp>
#include <lib/rrc/encode.hpp>
#include <ue/app/task.hpp>
#include <utils/common.hpp>
#include <utils/common.hpp>
namespace
nr
::
ue
namespace
nr
::
ue
...
...
src/ue/types.hpp
View file @
3a7c9ef8
...
@@ -197,7 +197,6 @@ struct TaskBase
...
@@ -197,7 +197,6 @@ struct TaskBase
UeSharedContext
shCtx
{};
UeSharedContext
shCtx
{};
UeAppTask
*
appTask
{};
UeL23Task
*
l23Task
{};
UeL23Task
*
l23Task
{};
};
};
...
...
src/ue/ue.cpp
View file @
3a7c9ef8
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
#include "ue.hpp"
#include "ue.hpp"
#include "app/task.hpp"
#include "l23/task.hpp"
#include "l23/task.hpp"
namespace
nr
::
ue
namespace
nr
::
ue
...
@@ -26,7 +25,6 @@ UserEquipment::UserEquipment(UeConfig *config, app::IUeController *ueController,
...
@@ -26,7 +25,6 @@ UserEquipment::UserEquipment(UeConfig *config, app::IUeController *ueController,
base
->
cliCallbackTask
=
cliCallbackTask
;
base
->
cliCallbackTask
=
cliCallbackTask
;
base
->
l23Task
=
new
UeL23Task
(
base
);
base
->
l23Task
=
new
UeL23Task
(
base
);
base
->
appTask
=
new
UeAppTask
(
base
);
taskBase
=
base
;
taskBase
=
base
;
}
}
...
@@ -34,10 +32,8 @@ UserEquipment::UserEquipment(UeConfig *config, app::IUeController *ueController,
...
@@ -34,10 +32,8 @@ UserEquipment::UserEquipment(UeConfig *config, app::IUeController *ueController,
UserEquipment
::~
UserEquipment
()
UserEquipment
::~
UserEquipment
()
{
{
taskBase
->
l23Task
->
quit
();
taskBase
->
l23Task
->
quit
();
taskBase
->
appTask
->
quit
();
delete
taskBase
->
l23Task
;
delete
taskBase
->
l23Task
;
delete
taskBase
->
appTask
;
delete
taskBase
->
logBase
;
delete
taskBase
->
logBase
;
...
@@ -47,12 +43,11 @@ UserEquipment::~UserEquipment()
...
@@ -47,12 +43,11 @@ UserEquipment::~UserEquipment()
void
UserEquipment
::
start
()
void
UserEquipment
::
start
()
{
{
taskBase
->
l23Task
->
start
();
taskBase
->
l23Task
->
start
();
taskBase
->
appTask
->
start
();
}
}
void
UserEquipment
::
pushCommand
(
std
::
unique_ptr
<
app
::
UeCliCommand
>
cmd
,
const
InetAddress
&
address
)
void
UserEquipment
::
pushCommand
(
std
::
unique_ptr
<
app
::
UeCliCommand
>
cmd
,
const
InetAddress
&
address
)
{
{
taskBase
->
app
Task
->
push
(
std
::
make_unique
<
NmUeCliCommand
>
(
std
::
move
(
cmd
),
address
));
taskBase
->
l23
Task
->
push
(
std
::
make_unique
<
NmUeCliCommand
>
(
std
::
move
(
cmd
),
address
));
}
}
}
// namespace nr::ue
}
// namespace nr::ue
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