Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OAI-RAN-5G-sheduler_MaxTBS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MAQ5G-PFC
OAI-RAN-5G-sheduler_MaxTBS
Commits
2ee6ae11
Commit
2ee6ae11
authored
8 years ago
by
Frédéric Leroy
Browse files
Options
Downloads
Patches
Plain Diff
UE: create a user and move user_fd into the nas_user_t struct
parent
7c8dbbdb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openair3/NAS/UE/nas_ue_task.c
+13
-10
13 additions, 10 deletions
openair3/NAS/UE/nas_ue_task.c
with
13 additions
and
10 deletions
openair3/NAS/UE/nas_ue_task.c
+
13
−
10
View file @
2ee6ae11
...
...
@@ -25,20 +25,20 @@
# include "nas_ue_task.h"
# include "UTIL/LOG/log.h"
# include "
nas_
user.h"
# include "user
_defs
.h"
# include "user_api.h"
# include "nas_parser.h"
# include "nas_proc.h"
# include "msc.h"
#include
"nas_user.h"
# define NAS_UE_AUTOSTART 1
extern
unsigned
char
NB_eNB_INST
;
extern
unsigned
char
NB_UE_INST
;
static
int
user_fd
;
static
int
nas_ue_process_events
(
struct
epoll_event
*
events
,
int
nb_events
)
static
int
nas_ue_process_events
(
nas_user_t
*
user
,
struct
epoll_event
*
events
,
int
nb_events
)
{
int
event
;
int
exit_loop
=
FALSE
;
...
...
@@ -48,8 +48,8 @@ static int nas_ue_process_events(struct epoll_event *events, int nb_events)
for
(
event
=
0
;
event
<
nb_events
;
event
++
)
{
if
(
events
[
event
].
events
!=
0
)
{
/* If the event has not been yet been processed (not an itti message) */
if
(
events
[
event
].
data
.
fd
==
user
_
fd
)
{
exit_loop
=
nas_user_receive_and_process
(
&
user
_
fd
,
NULL
);
if
(
events
[
event
].
data
.
fd
==
user
->
fd
)
{
exit_loop
=
nas_user_receive_and_process
(
&
user
->
fd
,
NULL
);
}
else
{
LOG_E
(
NAS
,
"[UE] Received an event from an unknown fd %d!
\n
"
,
events
[
event
].
data
.
fd
);
}
...
...
@@ -68,6 +68,9 @@ void *nas_ue_task(void *args_p)
instance_t
instance
;
unsigned
int
Mod_id
;
int
result
;
nas_user_t
user_value
=
{};
nas_user_t
*
user
=
&
user_value
;
itti_mark_task_ready
(
TASK_NAS_UE
);
MSC_START_USE
();
...
...
@@ -81,8 +84,8 @@ void *nas_ue_task(void *args_p)
exit
(
EXIT_FAILURE
);
}
user
_
fd
=
user_api_get_fd
();
itti_subscribe_event_fd
(
TASK_NAS_UE
,
user
_
fd
);
user
->
fd
=
user_api_get_fd
();
itti_subscribe_event_fd
(
TASK_NAS_UE
,
user
->
fd
);
}
/* Initialize NAS user */
...
...
@@ -114,7 +117,7 @@ void *nas_ue_task(void *args_p)
/* Send an activate modem command to NAS like UserProcess should do it */
char
*
user_data
=
"at+cfun=1
\r
"
;
nas_user_receive_and_process
(
&
user
_
fd
,
user_data
);
nas_user_receive_and_process
(
&
user
->
fd
,
user_data
);
}
#endif
break
;
...
...
@@ -215,7 +218,7 @@ void *nas_ue_task(void *args_p)
nb_events
=
itti_get_events
(
TASK_NAS_UE
,
&
events
);
if
((
nb_events
>
0
)
&&
(
events
!=
NULL
))
{
if
(
nas_ue_process_events
(
events
,
nb_events
)
==
TRUE
)
{
if
(
nas_ue_process_events
(
user
,
events
,
nb_events
)
==
TRUE
)
{
LOG_E
(
NAS
,
"[UE] Received exit loop
\n
"
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment