e2sm_kpm: clean process_ric_action_definition func

master
Piotr Gawlowicz 2 years ago committed by Justin Tallon
parent d384916b68
commit d6534b6339

@ -72,7 +72,8 @@ public:
virtual void receive_e2_metrics_callback(const enb_metrics_t& m) = 0;
protected:
uint32_t _generate_local_action_id() { return _registered_action_id_gen++; };
uint32_t _get_local_action_id() { return _registered_action_id_gen; };
uint32_t _generate_new_local_action_id() { return _registered_action_id_gen++; };
private:
const std::string _short_name;

@ -153,9 +153,16 @@ bool e2sm_kpm::process_ric_action_definition(ri_caction_to_be_setup_item_s ric_a
return false;
}
action_entry.sm_local_ric_action_id = _get_local_action_id();
e2sm_kpm_report_service* report_service;
switch (e2sm_kpm_action_def.ric_style_type) {
case 1:
admit_action = e2sm_kpm_report_service_style1::process_ric_action_definition(this, e2sm_kpm_action_def);
if (admit_action) {
report_service =
new e2sm_kpm_report_service_style1(this, action_entry.sm_local_ric_action_id, e2sm_kpm_action_def);
}
break;
case 2:
admit_action = false;
@ -181,32 +188,7 @@ bool e2sm_kpm::process_ric_action_definition(ri_caction_to_be_setup_item_s ric_a
return false;
}
action_entry.sm_local_ric_action_id = _generate_local_action_id();
e2sm_kpm_report_service* report_service;
switch (e2sm_kpm_action_def.ric_style_type) {
case 1:
report_service =
new e2sm_kpm_report_service_style1(this, action_entry.sm_local_ric_action_id, e2sm_kpm_action_def);
break;
case 2:
admit_action = false;
break;
case 3:
admit_action = false;
break;
case 4:
admit_action = false;
break;
case 5:
admit_action = false;
break;
default:
logger.info("Unknown RIC style type %i -> do not admit action %i (type %i)",
e2sm_kpm_action_def.ric_style_type,
ric_action.ric_action_id,
ric_action.ric_action_type);
return false;
}
_generate_new_local_action_id();
registered_actions_data.insert(
std::pair<uint32_t, e2sm_kpm_report_service*>(action_entry.sm_local_ric_action_id, report_service));

Loading…
Cancel
Save