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
lizhongxiao
OpenXG-RAN
Commits
9f699fcf
Commit
9f699fcf
authored
Jan 12, 2024
by
Teodora
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add node type in read_setup_ran function
parent
9207e134
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
6 deletions
+56
-6
openair2/E2AP/RAN_FUNCTION/read_setup_ran.c
openair2/E2AP/RAN_FUNCTION/read_setup_ran.c
+53
-5
openair2/E2AP/RAN_FUNCTION/read_setup_ran.h
openair2/E2AP/RAN_FUNCTION/read_setup_ran.h
+3
-1
No files found.
openair2/E2AP/RAN_FUNCTION/read_setup_ran.c
View file @
9f699fcf
...
...
@@ -25,18 +25,66 @@
#include <assert.h>
#include <stdlib.h>
void
read_setup_ran
(
void
*
data
)
void
read_setup_ran
(
void
*
data
,
const
ngran_node_t
node_type
)
{
assert
(
data
!=
NULL
);
#ifdef E2AP_V1
#elif defined(E2AP_V2) || defined(E2AP_V3)
*
((
e2ap_node_component_config_add_t
*
)
data
)
=
fill_e2ap_node_component_config_add
();
arr_node_component_config_add_t
*
dst
=
(
arr_node_component_config_add_t
*
)
data
;
if
(
node_type
==
ngran_gNB
){
dst
->
len_cca
=
1
;
dst
->
cca
=
calloc
(
1
,
sizeof
(
e2ap_node_component_config_add_t
));
assert
(
dst
->
cca
!=
NULL
);
// NGAP
dst
->
cca
[
0
]
=
fill_ngap_e2ap_node_component_config_add
();
}
else
if
(
node_type
==
ngran_gNB_CU
){
dst
->
len_cca
=
2
;
dst
->
cca
=
calloc
(
2
,
sizeof
(
e2ap_node_component_config_add_t
));
assert
(
dst
->
cca
!=
NULL
);
// NGAP
dst
->
cca
[
0
]
=
fill_ngap_e2ap_node_component_config_add
();
// F1AP
dst
->
cca
[
1
]
=
fill_f1ap_e2ap_node_component_config_add
();
}
else
if
(
node_type
==
ngran_gNB_DU
){
dst
->
len_cca
=
1
;
dst
->
cca
=
calloc
(
1
,
sizeof
(
e2ap_node_component_config_add_t
));
assert
(
dst
->
cca
!=
NULL
);
// F1AP
dst
->
cca
[
0
]
=
fill_f1ap_e2ap_node_component_config_add
();
}
else
if
(
node_type
==
ngran_gNB_CUCP
){
dst
->
len_cca
=
3
;
dst
->
cca
=
calloc
(
3
,
sizeof
(
e2ap_node_component_config_add_t
));
assert
(
dst
->
cca
!=
NULL
);
// NGAP
dst
->
cca
[
0
]
=
fill_ngap_e2ap_node_component_config_add
();
// F1AP
dst
->
cca
[
1
]
=
fill_f1ap_e2ap_node_component_config_add
();
// E1AP
dst
->
cca
[
2
]
=
fill_e1ap_e2ap_node_component_config_add
();
}
else
if
(
node_type
==
ngran_gNB_CUUP
){
dst
->
len_cca
=
3
;
dst
->
cca
=
calloc
(
3
,
sizeof
(
e2ap_node_component_config_add_t
));
assert
(
dst
->
cca
!=
NULL
);
// NGAP
dst
->
cca
[
0
]
=
fill_ngap_e2ap_node_component_config_add
();
// F1AP
dst
->
cca
[
1
]
=
fill_f1ap_e2ap_node_component_config_add
();
// E1AP
dst
->
cca
[
2
]
=
fill_e1ap_e2ap_node_component_config_add
();
}
else
if
(
node_type
==
ngran_eNB
){
dst
->
len_cca
=
1
;
dst
->
cca
=
calloc
(
1
,
sizeof
(
e2ap_node_component_config_add_t
));
assert
(
dst
->
cca
!=
NULL
);
// S1AP
dst
->
cca
[
0
]
=
fill_s1ap_e2ap_node_component_config_add
();
}
else
{
assert
(
0
!=
0
&&
"Not implemented"
);
}
#else
static_assert
(
0
!=
0
,
"Unknown E2AP version"
);
#endif
}
openair2/E2AP/RAN_FUNCTION/read_setup_ran.h
View file @
9f699fcf
...
...
@@ -22,6 +22,8 @@
#ifndef READ_SETUP_RAN_E2_AGENT_H
#define READ_SETUP_RAN_E2_AGENT_H
void
read_setup_ran
(
void
*
data
);
#include "common/ngran_types.h"
void
read_setup_ran
(
void
*
data
,
const
ngran_node_t
node_type
);
#endif
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