Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
wangwenhui
OpenXG-RAN
Commits
a0148c46
Commit
a0148c46
authored
Nov 18, 2020
by
xuyue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add nas_nrue_task files
parent
be31d514
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
173 additions
and
1 deletion
+173
-1
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
openair3/NAS/NR_UE/nas_nrue_task.c
openair3/NAS/NR_UE/nas_nrue_task.c
+143
-0
openair3/NAS/NR_UE/nas_nrue_task.h
openair3/NAS/NR_UE/nas_nrue_task.h
+29
-0
No files found.
cmake_targets/CMakeLists.txt
View file @
a0148c46
...
...
@@ -3095,7 +3095,7 @@ add_executable(nr-uesoftmodem
${
OPENAIR2_DIR
}
/LAYER2/NR_MAC_COMMON/nr_mac_common.c
${
OPENAIR2_DIR
}
/RRC/NAS/rb_config.c
${
OPENAIR1_DIR
}
/SIMULATION/ETH_TRANSPORT/netlink_init.c
${
OPENAIR3_DIR
}
/NAS/
UE/nas_
ue_task.c
${
OPENAIR3_DIR
}
/NAS/
NR_UE/nas_nr
ue_task.c
${
OPENAIR_DIR
}
/common/utils/utils.c
${
OPENAIR_DIR
}
/common/utils/system.c
${
OPENAIR_DIR
}
/common/utils/nr/nr_common.c
...
...
openair3/NAS/NR_UE/nas_nrue_task.c
0 → 100644
View file @
a0148c46
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "utils.h"
# include "assertions.h"
# include "intertask_interface.h"
# include "nas_nrue_task.h"
# include "common/utils/LOG/log.h"
# include "user_defs.h"
# include "user_api.h"
# include "nas_parser.h"
# include "nas_proc.h"
# include "msc.h"
# include "memory.h"
#include "nas_user.h"
// FIXME make command line option for NAS_UE_AUTOSTART
# define NAS_UE_AUTOSTART 1
// FIXME review these externs
extern
unsigned
char
NB_eNB_INST
;
extern
uint16_t
NB_UE_INST
;
void
*
nas_ue_task
(
void
*
args_p
)
{
int
nb_events
;
struct
epoll_event
*
events
;
MessageDef
*
msg_p
;
instance_t
instance
;
unsigned
int
Mod_id
;
int
result
;
nas_user_container_t
*
users
=
args_p
;
itti_mark_task_ready
(
TASK_NAS_UE
);
MSC_START_USE
();
while
(
1
)
{
// Wait for a message or an event
itti_receive_msg
(
TASK_NAS_UE
,
&
msg_p
);
if
(
msg_p
!=
NULL
)
{
instance
=
ITTI_MSG_INSTANCE
(
msg_p
);
Mod_id
=
instance
-
NB_eNB_INST
;
if
(
instance
==
INSTANCE_DEFAULT
)
{
printf
(
"%s:%d: FATAL: instance is INSTANCE_DEFAULT, should not happen.
\n
"
,
__FILE__
,
__LINE__
);
exit_fun
(
"exit...
\n
"
);
}
switch
(
ITTI_MSG_ID
(
msg_p
))
{
case
INITIALIZE_MESSAGE
:
LOG_I
(
NAS
,
"[UE %d] Received %s
\n
"
,
Mod_id
,
ITTI_MSG_NAME
(
msg_p
));
break
;
case
TERMINATE_MESSAGE
:
itti_exit_task
();
break
;
case
MESSAGE_TEST
:
LOG_I
(
NAS
,
"[UE %d] Received %s
\n
"
,
Mod_id
,
ITTI_MSG_NAME
(
msg_p
));
break
;
case
NAS_CELL_SELECTION_CNF
:
LOG_I
(
NAS
,
"[UE %d] Received %s: errCode %u, cellID %u, tac %u
\n
"
,
Mod_id
,
ITTI_MSG_NAME
(
msg_p
),
NAS_CELL_SELECTION_CNF
(
msg_p
).
errCode
,
NAS_CELL_SELECTION_CNF
(
msg_p
).
cellID
,
NAS_CELL_SELECTION_CNF
(
msg_p
).
tac
);
break
;
case
NAS_CELL_SELECTION_IND
:
LOG_I
(
NAS
,
"[UE %d] Received %s: cellID %u, tac %u
\n
"
,
Mod_id
,
ITTI_MSG_NAME
(
msg_p
),
NAS_CELL_SELECTION_IND
(
msg_p
).
cellID
,
NAS_CELL_SELECTION_IND
(
msg_p
).
tac
);
/* TODO not processed by NAS currently */
break
;
case
NAS_PAGING_IND
:
LOG_I
(
NAS
,
"[UE %d] Received %s: cause %u
\n
"
,
Mod_id
,
ITTI_MSG_NAME
(
msg_p
),
NAS_PAGING_IND
(
msg_p
).
cause
);
/* TODO not processed by NAS currently */
break
;
case
NAS_CONN_ESTABLI_CNF
:
LOG_I
(
NAS
,
"[UE %d] Received %s: errCode %u, length %u
\n
"
,
Mod_id
,
ITTI_MSG_NAME
(
msg_p
),
NAS_CONN_ESTABLI_CNF
(
msg_p
).
errCode
,
NAS_CONN_ESTABLI_CNF
(
msg_p
).
nasMsg
.
length
);
break
;
case
NAS_CONN_RELEASE_IND
:
LOG_I
(
NAS
,
"[UE %d] Received %s: cause %u
\n
"
,
Mod_id
,
ITTI_MSG_NAME
(
msg_p
),
NAS_CONN_RELEASE_IND
(
msg_p
).
cause
);
break
;
case
NAS_UPLINK_DATA_CNF
:
LOG_I
(
NAS
,
"[UE %d] Received %s: UEid %u, errCode %u
\n
"
,
Mod_id
,
ITTI_MSG_NAME
(
msg_p
),
NAS_UPLINK_DATA_CNF
(
msg_p
).
UEid
,
NAS_UPLINK_DATA_CNF
(
msg_p
).
errCode
);
break
;
case
NAS_DOWNLINK_DATA_IND
:
LOG_I
(
NAS
,
"[UE %d] Received %s: UEid %u, length %u
\n
"
,
Mod_id
,
ITTI_MSG_NAME
(
msg_p
),
NAS_DOWNLINK_DATA_IND
(
msg_p
).
UEid
,
NAS_DOWNLINK_DATA_IND
(
msg_p
).
nasMsg
.
length
);
break
;
default:
LOG_E
(
NAS
,
"[UE %d] Received unexpected message %s
\n
"
,
Mod_id
,
ITTI_MSG_NAME
(
msg_p
));
break
;
}
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
msg_p
),
msg_p
);
AssertFatal
(
result
==
EXIT_SUCCESS
,
"Failed to free memory (%d)!
\n
"
,
result
);
msg_p
=
NULL
;
}
}
free
(
users
);
return
NULL
;
}
openair3/NAS/NR_UE/nas_nrue_task.h
0 → 100644
View file @
a0148c46
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef NAS_NRUE_TASK_H_
#define NAS_NRUE_TASK_H_
#include "openairinterface5g_limits.h"
void
*
nas_nrue_task
(
void
*
args_p
);
#endif
/* NAS_TASK_H_ */
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