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
dbb08a9c
Commit
dbb08a9c
authored
Dec 11, 2023
by
Teodora
Committed by
Chieh-Chun Chen
Jan 09, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made it compile with FlexRIC release v2
parent
3faaf888
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
16 deletions
+72
-16
CMakeLists.txt
CMakeLists.txt
+2
-2
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c
+13
-11
openair2/E2AP/RAN_FUNCTION/read_setup_ran.c
openair2/E2AP/RAN_FUNCTION/read_setup_ran.c
+55
-1
openair2/E2AP/README.md
openair2/E2AP/README.md
+1
-1
openair2/E2AP/flexric
openair2/E2AP/flexric
+1
-1
No files found.
CMakeLists.txt
View file @
dbb08a9c
...
@@ -300,8 +300,8 @@ set(E2AP_VERSION "E2AP_V2" CACHE STRING "E2AP version")
...
@@ -300,8 +300,8 @@ set(E2AP_VERSION "E2AP_V2" CACHE STRING "E2AP version")
set_property
(
CACHE E2AP_VERSION PROPERTY STRINGS
"E2AP_V1"
"E2AP_V2"
"E2AP_V3"
)
set_property
(
CACHE E2AP_VERSION PROPERTY STRINGS
"E2AP_V1"
"E2AP_V2"
"E2AP_V3"
)
message
(
STATUS
"Selected E2AP_VERSION:
${
E2AP_VERSION
}
"
)
message
(
STATUS
"Selected E2AP_VERSION:
${
E2AP_VERSION
}
"
)
set
(
KPM_VERSION
"KPM_V2"
CACHE STRING
"The KPM SM version to use"
)
set
(
KPM_VERSION
"KPM_V2
_03
"
CACHE STRING
"The KPM SM version to use"
)
set_property
(
CACHE KPM_VERSION PROPERTY STRINGS
"KPM_V2
"
"KPM_V3
"
)
set_property
(
CACHE KPM_VERSION PROPERTY STRINGS
"KPM_V2
_03"
"KPM_V3_00
"
)
message
(
STATUS
"Selected KPM Version:
${
KPM_VERSION
}
"
)
message
(
STATUS
"Selected KPM Version:
${
KPM_VERSION
}
"
)
...
...
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c
View file @
dbb08a9c
...
@@ -613,9 +613,9 @@ kpm_ric_ind_hdr_format_1_t kpm_ind_hdr_frm_1(void)
...
@@ -613,9 +613,9 @@ kpm_ric_ind_hdr_format_1_t kpm_ind_hdr_frm_1(void)
kpm_ric_ind_hdr_format_1_t
hdr_frm_1
=
{
0
};
kpm_ric_ind_hdr_format_1_t
hdr_frm_1
=
{
0
};
int64_t
const
t
=
time_now_us
();
int64_t
const
t
=
time_now_us
();
#if defined KPM_V2
#if defined KPM_V2
_03
hdr_frm_1
.
collectStartTime
=
t
/
1000000
;
// seconds
hdr_frm_1
.
collectStartTime
=
t
/
1000000
;
// seconds
#elif defined KPM_V3
#elif defined KPM_V3
_00
hdr_frm_1
.
collectStartTime
=
t
;
// microseconds
hdr_frm_1
.
collectStartTime
=
t
;
// microseconds
#else
#else
static_assert
(
0
!=
0
,
"Undefined KPM SM Version"
);
static_assert
(
0
!=
0
,
"Undefined KPM SM Version"
);
...
@@ -690,26 +690,28 @@ static void capture_sst_sd(test_info_lst_t* test, uint8_t *sst, uint32_t **sd)
...
@@ -690,26 +690,28 @@ static void capture_sst_sd(test_info_lst_t* test, uint8_t *sst, uint32_t **sd)
// we made a mistake in the past: NSSAI is supposed to be an OCTET_STRING,
// we made a mistake in the past: NSSAI is supposed to be an OCTET_STRING,
// but earlier version of the RAN function and the xApp used integer, so
// but earlier version of the RAN function and the xApp used integer, so
// handle this gracefully by accepting integer as well
// handle this gracefully by accepting integer as well
switch
(
*
test
->
test_cond_valu
e
)
{
switch
(
test
->
test_cond_value
->
typ
e
)
{
case
INTEGER_TEST_COND_VALUE
:
case
INTEGER_TEST_COND_VALUE
:
AssertFatal
(
*
test
->
int_value
<=
0xff
,
"illegal SST %ld
\n
"
,
*
test
->
int_value
);
printf
(
"test cond value before = %ld
\n
"
,
*
test
->
test_cond_value
->
int_value
);
*
sst
=
*
test
->
int_value
;
AssertFatal
(
*
test
->
test_cond_value
->
int_value
<=
0xff
,
"illegal SST %ld
\n
"
,
*
test
->
test_cond_value
->
int_value
);
*
sst
=
*
test
->
test_cond_value
->
int_value
;
printf
(
"test cond value after = %d
\n
"
,
*
sst
);
*
sd
=
NULL
;
*
sd
=
NULL
;
break
;
break
;
case
OCTET_STRING_TEST_COND_VALUE
:
case
OCTET_STRING_TEST_COND_VALUE
:
if
(
test
->
octet_string_value
->
len
==
1
)
{
if
(
test
->
test_cond_value
->
octet_string_value
->
len
==
1
)
{
*
sst
=
test
->
octet_string_value
->
buf
[
0
];
*
sst
=
test
->
test_cond_value
->
octet_string_value
->
buf
[
0
];
*
sd
=
NULL
;
*
sd
=
NULL
;
}
else
{
}
else
{
DevAssert
(
test
->
octet_string_value
->
len
==
4
);
DevAssert
(
test
->
test_cond_value
->
octet_string_value
->
len
==
4
);
uint8_t
*
buf
=
test
->
octet_string_value
->
buf
;
uint8_t
*
buf
=
test
->
test_cond_value
->
octet_string_value
->
buf
;
*
sst
=
buf
[
0
];
*
sst
=
buf
[
0
];
*
sd
=
malloc
(
**
sd
);
*
sd
=
malloc
(
**
sd
);
**
sd
=
buf
[
1
]
<<
16
|
buf
[
2
]
<<
8
|
buf
[
3
];
**
sd
=
buf
[
1
]
<<
16
|
buf
[
2
]
<<
8
|
buf
[
3
];
}
}
break
;
break
;
default:
default:
AssertFatal
(
false
,
"test condition value %d impossible
\n
"
,
*
test
->
test_cond_valu
e
);
AssertFatal
(
false
,
"test condition value %d impossible
\n
"
,
test
->
test_cond_value
->
typ
e
);
break
;
break
;
}
}
}
}
...
@@ -786,7 +788,7 @@ void read_kpm_sm(void* data)
...
@@ -786,7 +788,7 @@ void read_kpm_sm(void* data)
case
S_NSSAI_TEST_COND_TYPE
:
{
case
S_NSSAI_TEST_COND_TYPE
:
{
assert
(
frm_4
->
matching_cond_lst
[
i
].
test_info_lst
.
S_NSSAI
==
TRUE_TEST_COND_TYPE
&&
"Must be true"
);
assert
(
frm_4
->
matching_cond_lst
[
i
].
test_info_lst
.
S_NSSAI
==
TRUE_TEST_COND_TYPE
&&
"Must be true"
);
assert
(
frm_4
->
matching_cond_lst
[
i
].
test_info_lst
.
test_cond
!=
NULL
&&
"Even though is optional.."
);
assert
(
frm_4
->
matching_cond_lst
[
i
].
test_info_lst
.
test_cond
!=
NULL
&&
"Even though is optional.."
);
assert
(
frm_4
->
matching_cond_lst
[
i
].
test_info_lst
.
int
_value
!=
NULL
&&
"Even though is optional.."
);
assert
(
frm_4
->
matching_cond_lst
[
i
].
test_info_lst
.
test_cond
_value
!=
NULL
&&
"Even though is optional.."
);
test_cond_e
const
test_cond
=
*
frm_4
->
matching_cond_lst
[
i
].
test_info_lst
.
test_cond
;
test_cond_e
const
test_cond
=
*
frm_4
->
matching_cond_lst
[
i
].
test_info_lst
.
test_cond
;
uint8_t
sst
=
0
;
uint8_t
sst
=
0
;
...
...
openair2/E2AP/RAN_FUNCTION/read_setup_ran.c
View file @
dbb08a9c
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
#include "read_setup_ran.h"
#include "read_setup_ran.h"
#include "../../E2AP/flexric/src/lib/e2ap/e2ap_node_component_config_add_wrapper.h"
#include "../../E2AP/flexric/src/lib/e2ap/e2ap_node_component_config_add_wrapper.h"
#include "../../E2AP/flexric/test/rnd/fill_rnd_data_e2_setup_req.h"
#include "../../E2AP/flexric/test/rnd/fill_rnd_data_e2_setup_req.h"
#include "../../E2AP/flexric/src/util/ngran_types.h"
#include <assert.h>
#include <assert.h>
#include <stdlib.h>
#include <stdlib.h>
...
@@ -31,7 +32,60 @@ void read_setup_ran(void* data)
...
@@ -31,7 +32,60 @@ void read_setup_ran(void* data)
#ifdef E2AP_V1
#ifdef E2AP_V1
#elif defined(E2AP_V2) || defined(E2AP_V3)
#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
;
// Value assigned by CMakeLists.txt
const
ngran_node_t
node_type
=
get_node_type
();
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
#else
static_assert
(
0
!=
0
,
"Unknown E2AP version"
);
static_assert
(
0
!=
0
,
"Unknown E2AP version"
);
#endif
#endif
...
...
openair2/E2AP/README.md
View file @
dbb08a9c
...
@@ -89,7 +89,7 @@ git submodule update
...
@@ -89,7 +89,7 @@ git submodule update
```
bash
```
bash
git clone https://gitlab.eurecom.fr/mosaic5g/flexric flexric
git clone https://gitlab.eurecom.fr/mosaic5g/flexric flexric
cd
flexric/
cd
flexric/
git checkout
93961d2480b2c7a5721e03435cb34cf9446d1ad1
git checkout
1f04cc558ebc8da9de6a620762bc02f5db4ecb4a
```
```
### 2.2.2 Build FlexRIC
### 2.2.2 Build FlexRIC
...
...
flexric
@
1f04cc55
Subproject commit
93961d2480b2c7a5721e03435cb34cf9446d1ad1
Subproject commit
1f04cc558ebc8da9de6a620762bc02f5db4ecb4a
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