Prepare RAN Control to support multiple REPORT Styles
The REPORT service was hardcoded to only style 4, and therefore not easily extendable. This commit moves the support for style 4 in a separate function. Delete duplicated enum structs for RAN Parameter IDs for all the REPORT styles. They are already defined in "openair2/E2AP/flexric/src/sm/rc_sm/ie/rc_data_ie.h". Co-authored-by: Tano Bischoff <tano.bischoff@hhi.fraunhofer.de> Co-authored-by: Khanh Toan Pham <khanh.toan.pham@hhi.fraunhofer.de> Co-authored-by: Shrinish Donde <shrinish.donde@hhi.fraunhofer.de> Co-authored-by: Miguel Fuentes <miguel.fuentes@i2cat.net> Co-authored-by: Teodora Vladic <teodora.vladic@openairinterface.org>
This commit is contained in:
committed by
Teodora
co-authored by
Tano Bischoff
Khanh Toan Pham
Shrinish Donde
Miguel Fuentes
Teodora Vladic
parent
bf6012084c
commit
e6797a0b0e
@@ -53,6 +53,28 @@ static void init_once_rc(void)
|
||||
init_rc_subs_data(&rc_subs_data);
|
||||
}
|
||||
|
||||
static seq_ev_trg_style_t fill_ev_tr_format_4(const char *ev_style_name)
|
||||
{
|
||||
seq_ev_trg_style_t ev_trig_style = {0};
|
||||
|
||||
// RIC Event Trigger Style Type
|
||||
// Mandatory
|
||||
// 9.3.3
|
||||
ev_trig_style.style = 4;
|
||||
|
||||
// RIC Event Trigger Style Name
|
||||
// Mandatory
|
||||
// 9.3.4
|
||||
ev_trig_style.name = cp_str_to_ba(ev_style_name);
|
||||
|
||||
// RIC Event Trigger Format Type
|
||||
// Mandatory
|
||||
// 9.3.5
|
||||
ev_trig_style.format = FORMAT_4_E2SM_RC_EV_TRIGGER_FORMAT;
|
||||
|
||||
return ev_trig_style;
|
||||
}
|
||||
|
||||
static void fill_rc_ev_trig(ran_func_def_ev_trig_t* ev_trig)
|
||||
{
|
||||
// Sequence of EVENT TRIGGER styles
|
||||
@@ -61,29 +83,7 @@ static void fill_rc_ev_trig(ran_func_def_ev_trig_t* ev_trig)
|
||||
ev_trig->seq_ev_trg_style = calloc(ev_trig->sz_seq_ev_trg_style, sizeof(seq_ev_trg_style_t));
|
||||
assert(ev_trig->seq_ev_trg_style != NULL && "Memory exhausted");
|
||||
|
||||
seq_ev_trg_style_t* ev_trig_style = &ev_trig->seq_ev_trg_style[0];
|
||||
|
||||
// RIC Event Trigger Style Type
|
||||
// Mandatory
|
||||
// 9.3.3
|
||||
// 6.2.2.2.
|
||||
// INTEGER
|
||||
ev_trig_style->style = 4;
|
||||
|
||||
// RIC Event Trigger Style Name
|
||||
// Mandatory
|
||||
// 9.3.4
|
||||
// 6.2.2.3
|
||||
//PrintableString(SIZE(1..150,...))
|
||||
const char ev_style_name[] = "UE Information Change";
|
||||
ev_trig_style->name = cp_str_to_ba(ev_style_name);
|
||||
|
||||
// RIC Event Trigger Format Type
|
||||
// Mandatory
|
||||
// 9.3.5
|
||||
// 6.2.2.4.
|
||||
// INTEGER
|
||||
ev_trig_style->format = FORMAT_4_E2SM_RC_EV_TRIGGER_FORMAT;
|
||||
ev_trig->seq_ev_trg_style[0] = fill_ev_tr_format_4("UE Information Change");
|
||||
|
||||
// Sequence of RAN Parameters for L2 Variables
|
||||
// [0 - 65535]
|
||||
@@ -106,6 +106,67 @@ static void fill_rc_ev_trig(ran_func_def_ev_trig_t* ev_trig)
|
||||
ev_trig->seq_ran_param_id_cell = NULL;
|
||||
}
|
||||
|
||||
static seq_report_sty_t fill_report_style_4(const char *report_name)
|
||||
{
|
||||
seq_report_sty_t report_style = {0};
|
||||
|
||||
// RIC Report Style Type
|
||||
// Mandatory
|
||||
// 9.3.3
|
||||
report_style.report_type = 4;
|
||||
|
||||
// RIC Report Style Name
|
||||
// Mandatory
|
||||
// 9.3.4
|
||||
report_style.name = cp_str_to_ba(report_name);
|
||||
|
||||
// Supported RIC Event Trigger Style Type
|
||||
// Mandatory
|
||||
// 9.3.3
|
||||
report_style.ev_trig_type = FORMAT_4_E2SM_RC_EV_TRIGGER_FORMAT;
|
||||
|
||||
// RIC Report Action Format Type
|
||||
// Mandatory
|
||||
// 9.3.5
|
||||
report_style.act_frmt_type = FORMAT_1_E2SM_RC_ACT_DEF;
|
||||
|
||||
// RIC Indication Header Format Type
|
||||
// Mandatory
|
||||
// 9.3.5
|
||||
report_style.ind_hdr_type = FORMAT_1_E2SM_RC_IND_HDR;
|
||||
|
||||
// RIC Indication Message Format Type
|
||||
// Mandatory
|
||||
// 9.3.5
|
||||
report_style.ind_msg_type = FORMAT_2_E2SM_RC_IND_MSG;
|
||||
|
||||
// Sequence of RAN Parameters Supported
|
||||
// [0 - 65535]
|
||||
report_style.sz_seq_ran_param = 1;
|
||||
report_style.ran_param = calloc(report_style.sz_seq_ran_param, sizeof(seq_ran_param_3_t));
|
||||
assert(report_style.ran_param != NULL && "Memory exhausted");
|
||||
|
||||
// RAN Parameter ID
|
||||
// Mandatory
|
||||
// 9.3.8
|
||||
// [1- 4294967295]
|
||||
report_style.ran_param[0].id = E2SM_RC_RS4_RRC_STATE_CHANGED_TO;
|
||||
|
||||
// RAN Parameter Name
|
||||
// Mandatory
|
||||
// 9.3.9
|
||||
// [1-150]
|
||||
const char ran_param_name[] = "RRC State Changed To";
|
||||
report_style.ran_param[0].name = cp_str_to_ba(ran_param_name);
|
||||
|
||||
// RAN Parameter Definition
|
||||
// Optional
|
||||
// 9.3.51
|
||||
report_style.ran_param[0].def = NULL;
|
||||
|
||||
return report_style;
|
||||
}
|
||||
|
||||
static void fill_rc_report(ran_func_def_report_t* report)
|
||||
{
|
||||
// Sequence of REPORT styles
|
||||
@@ -114,74 +175,7 @@ static void fill_rc_report(ran_func_def_report_t* report)
|
||||
report->seq_report_sty = calloc(report->sz_seq_report_sty, sizeof(seq_report_sty_t));
|
||||
assert(report->seq_report_sty != NULL && "Memory exhausted");
|
||||
|
||||
seq_report_sty_t* report_style = &report->seq_report_sty[0];
|
||||
|
||||
// RIC Report Style Type
|
||||
// Mandatory
|
||||
// 9.3.3
|
||||
// 6.2.2.2.
|
||||
// INTEGER
|
||||
report_style->report_type = 4;
|
||||
|
||||
// RIC Report Style Name
|
||||
// Mandatory
|
||||
// 9.3.4
|
||||
// 6.2.2.3.
|
||||
// PrintableString(SIZE(1..150,...))
|
||||
const char report_name[] = "UE Information";
|
||||
report_style->name = cp_str_to_ba(report_name);
|
||||
|
||||
// Supported RIC Event Trigger Style Type
|
||||
// Mandatory
|
||||
// 9.3.3
|
||||
// 6.2.2.2.
|
||||
// INTEGER
|
||||
report_style->ev_trig_type = FORMAT_4_E2SM_RC_EV_TRIGGER_FORMAT;
|
||||
|
||||
// RIC Report Action Format Type
|
||||
// Mandatory
|
||||
// 9.3.5
|
||||
// 6.2.2.4.
|
||||
// INTEGER
|
||||
report_style->act_frmt_type = FORMAT_1_E2SM_RC_ACT_DEF;
|
||||
|
||||
// RIC Indication Header Format Type
|
||||
// Mandatory
|
||||
// 9.3.5
|
||||
// 6.2.2.4.
|
||||
// INTEGER
|
||||
report_style->ind_hdr_type = FORMAT_1_E2SM_RC_IND_HDR;
|
||||
|
||||
// RIC Indication Message Format Type
|
||||
// Mandatory
|
||||
// 9.3.5
|
||||
// 6.2.2.4.
|
||||
// INTEGER
|
||||
report_style->ind_msg_type = FORMAT_2_E2SM_RC_IND_MSG;
|
||||
|
||||
// Sequence of RAN Parameters Supported
|
||||
// [0 - 65535]
|
||||
report_style->sz_seq_ran_param = 1;
|
||||
report_style->ran_param = calloc(report_style->sz_seq_ran_param, sizeof(seq_ran_param_3_t));
|
||||
assert(report_style->ran_param != NULL && "Memory exhausted");
|
||||
|
||||
// RAN Parameter ID
|
||||
// Mandatory
|
||||
// 9.3.8
|
||||
// [1- 4294967295]
|
||||
report_style->ran_param[0].id = E2SM_RC_RS4_RRC_STATE_CHANGED_TO;
|
||||
|
||||
// RAN Parameter Name
|
||||
// Mandatory
|
||||
// 9.3.9
|
||||
// [1-150]
|
||||
const char ran_param_name[] = "RRC State";
|
||||
report_style->ran_param[0].name = cp_str_to_ba(ran_param_name);
|
||||
|
||||
// RAN Parameter Definition
|
||||
// Optional
|
||||
// 9.3.51
|
||||
report_style->ran_param[0].def = NULL;
|
||||
report->seq_report_sty[0] = fill_report_style_4("UE Information");
|
||||
}
|
||||
|
||||
static void fill_rc_control(ran_func_def_ctrl_t* ctrl)
|
||||
|
||||
Reference in New Issue
Block a user