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
ZhouShuya
OpenXG-RAN
Commits
a5343618
Commit
a5343618
authored
Oct 27, 2020
by
yaojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the judgment of the NGAP field in the configuration file
parent
a9b76b53
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
14 deletions
+41
-14
executables/nr-softmodem.c
executables/nr-softmodem.c
+26
-4
openair2/GNB_APP/gnb_app.c
openair2/GNB_APP/gnb_app.c
+13
-10
openair3/NGAP/ngap_gNB.h
openair3/NGAP/ngap_gNB.h
+2
-0
No files found.
executables/nr-softmodem.c
View file @
a5343618
...
...
@@ -84,6 +84,7 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "NB_IoT_interface.h"
#include "x2ap_eNB.h"
#include "ngap_gNB.h"
#include "gnb_paramdef.h"
pthread_cond_t
nfapi_sync_cond
;
pthread_mutex_t
nfapi_sync_mutex
;
...
...
@@ -400,6 +401,23 @@ int create_gNB_tasks(uint32_t gnb_nb) {
LOG_I
(
X2AP
,
"X2AP is disabled.
\n
"
);
}
}
paramdef_t
NETParams
[]
=
GNBNETPARAMS_DESC
;
char
aprefix
[
MAX_OPTNAME_SIZE
*
2
+
8
];
sprintf
(
aprefix
,
"%s.[%i].%s"
,
GNB_CONFIG_STRING_GNB_LIST
,
0
,
GNB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG
);
config_get
(
NETParams
,
sizeof
(
NETParams
)
/
sizeof
(
paramdef_t
),
aprefix
);
for
(
int
i
=
GNB_INTERFACE_NAME_FOR_NG_AMF_IDX
;
i
<=
GNB_IPV4_ADDRESS_FOR_NG_AMF_IDX
;
i
++
){
if
(
NETParams
[
i
].
strptr
==
NULL
){
LOG_E
(
NGAP
,
"No configuration in the file.
\n
"
);
NGAP_CONF_MODE
=
0
;
}
else
{
LOG_D
(
NGAP
,
"Configuration in the file: %s.
\n
"
,
*
NETParams
[
i
].
strptr
);
}
}
if
(
AMF_MODE_ENABLED
&&
(
get_softmodem_params
()
->
phy_test
==
0
&&
get_softmodem_params
()
->
do_ra
==
0
))
{
if
(
gnb_nb
>
0
)
{
...
...
@@ -409,10 +427,13 @@ int create_gNB_tasks(uint32_t gnb_nb) {
return -1;
}
*/
if
(
itti_create_task
(
TASK_NGAP
,
ngap_gNB_task
,
NULL
)
<
0
)
{
LOG_E
(
S1AP
,
"Create task for NGAP failed
\n
"
);
return
-
1
;
if
(
NGAP_CONF_MODE
){
if
(
itti_create_task
(
TASK_NGAP
,
ngap_gNB_task
,
NULL
)
<
0
)
{
LOG_E
(
NGAP
,
"Create task for NGAP failed
\n
"
);
return
-
1
;
}
}
else
{
LOG_E
(
NGAP
,
"Ngap task not created
\n
"
);
}
...
...
@@ -825,6 +846,7 @@ int main( int argc, char **argv )
openair0_cfg
[
0
].
threequarter_fs
=
threequarter_fs
;
AMF_MODE_ENABLED
=
!
IS_SOFTMODEM_NOS1
;
//!get_softmodem_params()->phy_test;
NGAP_CONF_MODE
=
!
IS_SOFTMODEM_NOS1
;
//!get_softmodem_params()->phy_test;
if
(
get_softmodem_params
()
->
do_ra
)
AssertFatal
(
get_softmodem_params
()
->
phy_test
==
0
,
"RA and phy_test are mutually exclusive
\n
"
);
...
...
openair2/GNB_APP/gnb_app.c
View file @
a5343618
...
...
@@ -80,21 +80,24 @@ static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//,
for
(
gnb_id
=
gnb_id_start
;
(
gnb_id
<
gnb_id_end
)
;
gnb_id
++
)
{
{
ngap_register_gnb_req_t
*
ngap_register_gNB
;
//Type Temporarily reuse
if
(
NGAP_CONF_MODE
){
ngap_register_gnb_req_t
*
ngap_register_gNB
;
//Type Temporarily reuse
// note: there is an implicit relationship between the data structure and the message name
msg_p
=
itti_alloc_new_message
(
TASK_GNB_APP
,
NGAP_REGISTER_GNB_REQ
);
//Message Temporarily reuse
// note: there is an implicit relationship between the data structure and the message name
msg_p
=
itti_alloc_new_message
(
TASK_GNB_APP
,
NGAP_REGISTER_GNB_REQ
);
//Message Temporarily reuse
RCconfig_NR_NG
(
msg_p
,
gnb_id
);
ngap_register_gNB
=
&
NGAP_REGISTER_GNB_REQ
(
msg_p
);
//Message Temporarily reuse
RCconfig_NR_NG
(
msg_p
,
gnb_id
);
LOG_I
(
GNB_APP
,
"default drx %d
\n
"
,
ngap_register_gNB
->
default_drx
);
if
(
gnb_id
==
0
)
RCconfig_nr_gtpu
();
ngap_register_gNB
=
&
NGAP_REGISTER_GNB_REQ
(
msg_p
);
//Message Temporarily reuse
LOG_I
(
GNB_APP
,
"default drx %d
\n
"
,
ngap_register_gNB
->
default_drx
);
itti_send_msg_to_task
(
TASK_NGAP
,
GNB_MODULE_ID_TO_INSTANCE
(
gnb_id
),
msg_p
);
}
LOG_I
(
GNB_APP
,
"[gNB %d] gNB_app_register for instance %d
\n
"
,
gnb_id
,
GNB_MODULE_ID_TO_INSTANCE
(
gnb_id
)
);
if
(
gnb_id
==
0
)
RCconfig_nr_gtpu
(
);
itti_send_msg_to_task
(
TASK_NGAP
,
GNB_MODULE_ID_TO_INSTANCE
(
gnb_id
),
msg_p
);
LOG_I
(
GNB_APP
,
"[gNB %d] gNB_app_register for instance %d
\n
"
,
gnb_id
,
GNB_MODULE_ID_TO_INSTANCE
(
gnb_id
)
);
register_gnb_pending
++
;
}
...
...
openair3/NGAP/ngap_gNB.h
View file @
a5343618
...
...
@@ -42,11 +42,13 @@
typedef
struct
ngap_gNB_config_s
{
// MME related params
unsigned
char
amf_enabled
;
///< AMF enabled ?
unsigned
char
ngap_enabled
;
///< NGAP enabled ?
}
ngap_gNB_config_t
;
extern
ngap_gNB_config_t
ngap_config
;
#define AMF_MODE_ENABLED ngap_config.amf_enabled
#define NGAP_CONF_MODE ngap_config.ngap_enabled
void
*
ngap_gNB_process_itti_msg
(
void
*
);
...
...
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