Commit 208b9058 authored by ferrerod's avatar ferrerod

Add UR Trigger for Volume Threshold

parent 0bd3d579
...@@ -9167,11 +9167,16 @@ class pfcp_create_urr_ie : public pfcp_grouped_ie { ...@@ -9167,11 +9167,16 @@ class pfcp_create_urr_ie : public pfcp_grouped_ie {
new pfcp_reporting_triggers_ie(b.reporting_triggers.second)); new pfcp_reporting_triggers_ie(b.reporting_triggers.second));
add_ie(sie); add_ie(sie);
} }
if (b.urr_id.first) { if (b.urr_id.first && b.measurement_period.first) {
std::shared_ptr<pfcp_measurement_period_ie> sie( std::shared_ptr<pfcp_measurement_period_ie> sie(
new pfcp_measurement_period_ie(b.measurement_period.second)); new pfcp_measurement_period_ie(b.measurement_period.second));
add_ie(sie); add_ie(sie);
} }
if (b.urr_id.first && b.volume_threshold.first) {
std::shared_ptr<pfcp_volume_threshold_ie> sie(
new pfcp_volume_threshold_ie(b.volume_threshold.second));
add_ie(sie);
}
// ToDo: Optional IEs // ToDo: Optional IEs
} }
pfcp_create_urr_ie() : pfcp_grouped_ie(PFCP_IE_CREATE_URR) {} pfcp_create_urr_ie() : pfcp_grouped_ie(PFCP_IE_CREATE_URR) {}
......
...@@ -320,14 +320,26 @@ int session_create_sm_context_procedure::run( ...@@ -320,14 +320,26 @@ int session_create_sm_context_procedure::run(
pfcp::measurement_method_t measurement_method = {}; pfcp::measurement_method_t measurement_method = {};
pfcp::measurement_period_t measurement_Period = {}; pfcp::measurement_period_t measurement_Period = {};
pfcp::reporting_triggers_t reporting_triggers = {}; pfcp::reporting_triggers_t reporting_triggers = {};
pfcp::volume_threshold_t volume_threshold = {};
// Hardcoded values for the moment // Hardcoded values for the moment
measurement_method.volum = 1; // Volume based usage report measurement_method.volum = 1; // Volume based usage report
measurement_Period.measurement_period = 10; // Every 10 Sec // measurement_method.durat = 1;
reporting_triggers.perio = 1; // Periodic usage report // measurement_Period.measurement_period = 10; // Every 10 Sec
// reporting_triggers.perio = 1; // Periodic usage report
reporting_triggers.volth = 1;
volume_threshold.dlvol = 1;
volume_threshold.ulvol = 1;
volume_threshold.tovol = 0;
volume_threshold.downlink_volume = 10;
volume_threshold.uplink_volume = 10;
create_urr.set(urr_id); create_urr.set(urr_id);
create_urr.set(measurement_method); create_urr.set(measurement_method);
create_urr.set(measurement_Period); // create_urr.set(measurement_Period);
create_urr.set(reporting_triggers); create_urr.set(reporting_triggers);
create_urr.set(volume_threshold);
n4_triggered->pfcp_ies.set(create_urr); n4_triggered->pfcp_ies.set(create_urr);
} }
// TODO: list of QoS Enforcement Rule IDs // TODO: list of QoS Enforcement Rule IDs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment