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
5bb18622
Commit
5bb18622
authored
Dec 12, 2023
by
Teodora
Committed by
Chieh-Chun Chen
Jan 09, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix warnings, read functions in SMs should return bool
parent
dbb08a9c
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
44 additions
and
20 deletions
+44
-20
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_gtp.c
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_gtp.c
+2
-1
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_gtp.h
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_gtp.h
+1
-1
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_mac.c
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_mac.c
+3
-1
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_mac.h
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_mac.h
+1
-1
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_pdcp.c
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_pdcp.c
+6
-1
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_pdcp.h
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_pdcp.h
+1
-1
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_rlc.c
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_rlc.c
+3
-1
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_rlc.h
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_rlc.h
+1
-1
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_slice.c
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_slice.c
+3
-1
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_slice.h
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_slice.h
+1
-1
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_tc.c
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_tc.c
+3
-1
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_tc.h
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_tc.h
+1
-1
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c
+12
-4
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.h
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.h
+1
-1
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c
+3
-1
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.h
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.h
+1
-1
openair2/E2AP/RAN_FUNCTION/read_setup_ran.c
openair2/E2AP/RAN_FUNCTION/read_setup_ran.c
+1
-1
No files found.
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_gtp.c
View file @
5bb18622
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
static
static
const
int
mod_id
=
0
;
const
int
mod_id
=
0
;
void
read_gtp_sm
(
void
*
data
)
bool
read_gtp_sm
(
void
*
data
)
{
{
assert
(
data
!=
NULL
);
assert
(
data
!=
NULL
);
...
@@ -80,6 +80,7 @@ void read_gtp_sm(void * data)
...
@@ -80,6 +80,7 @@ void read_gtp_sm(void * data)
i
++
;
i
++
;
}
}
return
(
num_ues
>
0
);
}
}
void
read_gtp_setup_sm
(
void
*
data
)
void
read_gtp_setup_sm
(
void
*
data
)
...
...
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_gtp.h
View file @
5bb18622
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
void
read_gtp_sm
(
void
*
);
bool
read_gtp_sm
(
void
*
);
void
read_gtp_setup_sm
(
void
*
);
void
read_gtp_setup_sm
(
void
*
);
...
...
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_mac.c
View file @
5bb18622
...
@@ -27,7 +27,7 @@ static
...
@@ -27,7 +27,7 @@ static
const
int
mod_id
=
0
;
const
int
mod_id
=
0
;
void
read_mac_sm
(
void
*
data
)
bool
read_mac_sm
(
void
*
data
)
{
{
assert
(
data
!=
NULL
);
assert
(
data
!=
NULL
);
...
@@ -110,6 +110,8 @@ void read_mac_sm(void* data)
...
@@ -110,6 +110,8 @@ void read_mac_sm(void* data)
++
i
;
++
i
;
}
}
return
(
num_ues
>
0
);
}
}
void
read_mac_setup_sm
(
void
*
data
)
void
read_mac_setup_sm
(
void
*
data
)
...
...
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_mac.h
View file @
5bb18622
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
#include "openair2/E2AP/flexric/src/util/time_now_us.h"
#include "openair2/E2AP/flexric/src/util/time_now_us.h"
void
read_mac_sm
(
void
*
);
bool
read_mac_sm
(
void
*
);
void
read_mac_setup_sm
(
void
*
);
void
read_mac_setup_sm
(
void
*
);
...
...
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_pdcp.c
View file @
5bb18622
...
@@ -55,7 +55,7 @@ static
...
@@ -55,7 +55,7 @@ static
return
act_rb
;
return
act_rb
;
}
}
void
read_pdcp_sm
(
void
*
data
)
bool
read_pdcp_sm
(
void
*
data
)
{
{
assert
(
data
!=
NULL
);
assert
(
data
!=
NULL
);
//assert(data->type == PDCP_STATS_V0);
//assert(data->type == PDCP_STATS_V0);
...
@@ -123,6 +123,9 @@ void read_pdcp_sm(void* data)
...
@@ -123,6 +123,9 @@ void read_pdcp_sm(void* data)
++
i
;
++
i
;
}
}
}
}
return
(
act_rb
>
0
);
}
else
{
}
else
{
//assert(0!=0 && "Calling PDCP");
//assert(0!=0 && "Calling PDCP");
...
@@ -176,6 +179,8 @@ void read_pdcp_sm(void* data)
...
@@ -176,6 +179,8 @@ void read_pdcp_sm(void* data)
++
i
;
++
i
;
}
}
}
}
return
(
act_rb
>
0
);
}
}
}
}
...
...
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_pdcp.h
View file @
5bb18622
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
void
read_pdcp_sm
(
void
*
);
bool
read_pdcp_sm
(
void
*
);
void
read_pdcp_setup_sm
(
void
*
data
);
void
read_pdcp_setup_sm
(
void
*
data
);
...
...
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_rlc.c
View file @
5bb18622
...
@@ -67,7 +67,7 @@ void active_avg_to_tx(NR_UEs_t* const UE_info)
...
@@ -67,7 +67,7 @@ void active_avg_to_tx(NR_UEs_t* const UE_info)
}
}
}
}
void
read_rlc_sm
(
void
*
data
)
bool
read_rlc_sm
(
void
*
data
)
{
{
assert
(
data
!=
NULL
);
assert
(
data
!=
NULL
);
// assert(data->type == RLC_STATS_V0);
// assert(data->type == RLC_STATS_V0);
...
@@ -161,6 +161,8 @@ void read_rlc_sm(void* data)
...
@@ -161,6 +161,8 @@ void read_rlc_sm(void* data)
++
i
;
++
i
;
}
}
}
}
return
(
act_rb
>
0
);
}
}
void
read_rlc_setup_sm
(
void
*
data
)
void
read_rlc_setup_sm
(
void
*
data
)
...
...
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_rlc.h
View file @
5bb18622
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
void
read_rlc_sm
(
void
*
);
bool
read_rlc_sm
(
void
*
);
void
read_rlc_setup_sm
(
void
*
data
);
void
read_rlc_setup_sm
(
void
*
data
);
...
...
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_slice.c
View file @
5bb18622
...
@@ -24,13 +24,15 @@
...
@@ -24,13 +24,15 @@
#include <assert.h>
#include <assert.h>
#include <stdio.h>
#include <stdio.h>
void
read_slice_sm
(
void
*
data
)
bool
read_slice_sm
(
void
*
data
)
{
{
assert
(
data
!=
NULL
);
assert
(
data
!=
NULL
);
// assert(data->type == SLICE_STATS_V0);
// assert(data->type == SLICE_STATS_V0);
slice_ind_data_t
*
slice
=
(
slice_ind_data_t
*
)
data
;
slice_ind_data_t
*
slice
=
(
slice_ind_data_t
*
)
data
;
fill_slice_ind_data
(
slice
);
fill_slice_ind_data
(
slice
);
return
true
;
}
}
void
read_slice_setup_sm
(
void
*
data
)
void
read_slice_setup_sm
(
void
*
data
)
...
...
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_slice.h
View file @
5bb18622
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
void
read_slice_sm
(
void
*
);
bool
read_slice_sm
(
void
*
);
void
read_slice_setup_sm
(
void
*
data
);
void
read_slice_setup_sm
(
void
*
data
);
...
...
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_tc.c
View file @
5bb18622
...
@@ -23,13 +23,15 @@
...
@@ -23,13 +23,15 @@
#include "../../flexric/test/rnd/fill_rnd_data_tc.h"
#include "../../flexric/test/rnd/fill_rnd_data_tc.h"
#include <assert.h>
#include <assert.h>
void
read_tc_sm
(
void
*
data
)
bool
read_tc_sm
(
void
*
data
)
{
{
assert
(
data
!=
NULL
);
assert
(
data
!=
NULL
);
//assert(data->type == TC_STATS_V0);
//assert(data->type == TC_STATS_V0);
tc_ind_data_t
*
tc
=
(
tc_ind_data_t
*
)
data
;
tc_ind_data_t
*
tc
=
(
tc_ind_data_t
*
)
data
;
fill_tc_ind_data
(
tc
);
fill_tc_ind_data
(
tc
);
return
true
;
}
}
void
read_tc_setup_sm
(
void
*
data
)
void
read_tc_setup_sm
(
void
*
data
)
...
...
openair2/E2AP/RAN_FUNCTION/CUSTOMIZED/ran_func_tc.h
View file @
5bb18622
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
void
read_tc_sm
(
void
*
);
bool
read_tc_sm
(
void
*
);
void
read_tc_setup_sm
(
void
*
data
);
void
read_tc_setup_sm
(
void
*
data
);
...
...
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c
View file @
5bb18622
...
@@ -73,7 +73,7 @@ static size_t filter_ues_by_s_nssai_in_du_or_monolithic(test_cond_e const condit
...
@@ -73,7 +73,7 @@ static size_t filter_ues_by_s_nssai_in_du_or_monolithic(test_cond_e const condit
}
}
matches
->
num_ues
=
i
;
matches
->
num_ues
=
i
;
assert
(
matches
->
num_ues
>=
1
&&
"The number of filtered UEs must be at least equal to 1"
);
return
i
;
return
i
;
}
}
...
@@ -716,7 +716,7 @@ static void capture_sst_sd(test_info_lst_t* test, uint8_t *sst, uint32_t **sd)
...
@@ -716,7 +716,7 @@ static void capture_sst_sd(test_info_lst_t* test, uint8_t *sst, uint32_t **sd)
}
}
}
}
void
read_kpm_sm
(
void
*
data
)
bool
read_kpm_sm
(
void
*
data
)
{
{
assert
(
data
!=
NULL
);
assert
(
data
!=
NULL
);
// assert(data->type == KPM_STATS_V3_0);
// assert(data->type == KPM_STATS_V3_0);
...
@@ -770,7 +770,7 @@ void read_kpm_sm(void* data)
...
@@ -770,7 +770,7 @@ void read_kpm_sm(void* data)
case
CQI_TEST_COND_TYPE
:
{
case
CQI_TEST_COND_TYPE
:
{
// This is a bad idea. Done only to check FlexRIC xAPP
// This is a bad idea. Done only to check FlexRIC xAPP
printf
(
"CQI not implemented!. Randomly filling the data
\n
"
);
//
printf("CQI not implemented!. Randomly filling the data \n");
goto
rnd_data_label
;
goto
rnd_data_label
;
break
;
break
;
}
}
...
@@ -798,14 +798,17 @@ void read_kpm_sm(void* data)
...
@@ -798,14 +798,17 @@ void read_kpm_sm(void* data)
if
(
NODE_IS_DU
(
RC
.
nrrrc
[
0
]
->
node_type
))
{
if
(
NODE_IS_DU
(
RC
.
nrrrc
[
0
]
->
node_type
))
{
matched_ues_mac_t
matched_ues
=
{
0
};
matched_ues_mac_t
matched_ues
=
{
0
};
matched_ues
.
num_ues
=
filter_ues_by_s_nssai_in_du_or_monolithic
(
test_cond
,
sst
,
sd
,
&
matched_ues
);
matched_ues
.
num_ues
=
filter_ues_by_s_nssai_in_du_or_monolithic
(
test_cond
,
sst
,
sd
,
&
matched_ues
);
if
(
matched_ues
.
num_ues
==
0
)
return
false
;
kpm
->
ind
.
msg
.
frm_3
=
fill_kpm_ind_msg_frm_3_in_du
(
&
matched_ues
,
&
frm_4
->
action_def_format_1
);
kpm
->
ind
.
msg
.
frm_3
=
fill_kpm_ind_msg_frm_3_in_du
(
&
matched_ues
,
&
frm_4
->
action_def_format_1
);
}
else
if
(
NODE_IS_CU
(
RC
.
nrrrc
[
0
]
->
node_type
))
{
}
else
if
(
NODE_IS_CU
(
RC
.
nrrrc
[
0
]
->
node_type
))
{
matched_ues_rrc_t
matched_ues
=
{
0
};
matched_ues_rrc_t
matched_ues
=
{
0
};
matched_ues
.
num_ues
=
filter_ues_by_s_nssai_in_cu
(
test_cond
,
sst
,
sd
,
&
matched_ues
);
matched_ues
.
num_ues
=
filter_ues_by_s_nssai_in_cu
(
test_cond
,
sst
,
sd
,
&
matched_ues
);
if
(
matched_ues
.
num_ues
==
0
)
return
false
;
kpm
->
ind
.
msg
.
frm_3
=
fill_kpm_ind_msg_frm_3_in_cu
(
&
matched_ues
,
&
frm_4
->
action_def_format_1
);
kpm
->
ind
.
msg
.
frm_3
=
fill_kpm_ind_msg_frm_3_in_cu
(
&
matched_ues
,
&
frm_4
->
action_def_format_1
);
}
else
if
(
NODE_IS_MONOLITHIC
(
RC
.
nrrrc
[
0
]
->
node_type
))
{
}
else
if
(
NODE_IS_MONOLITHIC
(
RC
.
nrrrc
[
0
]
->
node_type
))
{
matched_ues_mac_t
matched_ues
=
{
0
};
matched_ues_mac_t
matched_ues
=
{
0
};
matched_ues
.
num_ues
=
filter_ues_by_s_nssai_in_du_or_monolithic
(
test_cond
,
sst
,
sd
,
&
matched_ues
);
matched_ues
.
num_ues
=
filter_ues_by_s_nssai_in_du_or_monolithic
(
test_cond
,
sst
,
sd
,
&
matched_ues
);
if
(
matched_ues
.
num_ues
==
0
)
return
false
;
kpm
->
ind
.
msg
.
frm_3
=
fill_kpm_ind_msg_frm_3_in_monolithic
(
&
matched_ues
,
&
frm_4
->
action_def_format_1
);
kpm
->
ind
.
msg
.
frm_3
=
fill_kpm_ind_msg_frm_3_in_monolithic
(
&
matched_ues
,
&
frm_4
->
action_def_format_1
);
}
else
{
}
else
{
assert
(
false
&&
"NG-RAN Type not implemented"
);
assert
(
false
&&
"NG-RAN Type not implemented"
);
...
@@ -825,12 +828,17 @@ void read_kpm_sm(void* data)
...
@@ -825,12 +828,17 @@ void read_kpm_sm(void* data)
default:
{
default:
{
rnd_data_label:
rnd_data_label:
return
false
;
// Only for testing new xApps, but not existing ones in FlexRIC
kpm
->
ind
.
hdr
=
fill_rnd_kpm_ind_hdr
();
kpm
->
ind
.
hdr
=
fill_rnd_kpm_ind_hdr
();
kpm
->
ind
.
msg
=
fill_rnd_kpm_ind_msg
();
kpm
->
ind
.
msg
=
fill_rnd_kpm_ind_msg
();
printf
(
"[E2 Agent]: Filling random KPM Indication Message
\n
"
);
break
;
break
;
}
}
}
}
return
true
;
}
}
void
read_kpm_setup_sm
(
void
*
e2ap
)
void
read_kpm_setup_sm
(
void
*
e2ap
)
...
...
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.h
View file @
5bb18622
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
void
read_kpm_sm
(
void
*
);
bool
read_kpm_sm
(
void
*
);
void
read_kpm_setup_sm
(
void
*
);
void
read_kpm_setup_sm
(
void
*
);
...
...
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c
View file @
5bb18622
...
@@ -36,11 +36,13 @@
...
@@ -36,11 +36,13 @@
#include <pthread.h>
#include <pthread.h>
#include <unistd.h>
#include <unistd.h>
void
read_rc_sm
(
void
*
data
)
bool
read_rc_sm
(
void
*
data
)
{
{
assert
(
data
!=
NULL
);
assert
(
data
!=
NULL
);
// assert(data->type == RAN_CTRL_STATS_V1_03);
// assert(data->type == RAN_CTRL_STATS_V1_03);
assert
(
0
!=
0
&&
"Not implemented"
);
assert
(
0
!=
0
&&
"Not implemented"
);
return
true
;
}
}
void
read_rc_setup_sm
(
void
*
data
)
void
read_rc_setup_sm
(
void
*
data
)
...
...
openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.h
View file @
5bb18622
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
#include "openair2/E2AP/flexric/src/agent/../sm/sm_io.h"
void
read_rc_sm
(
void
*
);
bool
read_rc_sm
(
void
*
);
void
read_rc_setup_sm
(
void
*
data
);
void
read_rc_setup_sm
(
void
*
data
);
...
...
openair2/E2AP/RAN_FUNCTION/read_setup_ran.c
View file @
5bb18622
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +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 "../../
../openair2/GNB_APP/gnb_config
.h"
#include <assert.h>
#include <assert.h>
#include <stdlib.h>
#include <stdlib.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