Refactor QoS parameter types and consolidate definitions
- Move QoS-related enums and structures from ngap_messages_types.h to 5g_platform_types.h - Replace ngap_* QoS types with generic qos_* types for better reusability - Update field names from allocation_retention_priority to arp for consistency - Update all references across RRC and NGAP modules to use new type names - Remove duplicate QoS type definitions from NGAP-specific header This improves code organization by centralizing QoS parameter definitions in a common platform types header and eliminates NGAP-specific naming in favor of more generic, reusable type definitions.
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include "5g_platform_types.h"
|
||||
#include "openair2/RRC/NR/nr_rrc_proto.h"
|
||||
#include "openair2/RRC/NR/rrc_gNB_UE_context.h"
|
||||
#include "openair3/SECU/key_nas_deriver.h"
|
||||
@@ -2464,13 +2465,11 @@ f1ap_qos_flow_param_t get_qos_char_from_qos_flow_param(const pdusession_level_qo
|
||||
qos_char.qos_type = NON_DYNAMIC;
|
||||
qos_char.nondyn.fiveQI = qos_param->fiveQI;
|
||||
}
|
||||
const ngap_allocation_retention_priority_t *a = &qos_param->allocation_retention_priority;
|
||||
const qos_arp_t *a = &qos_param->arp;
|
||||
qos_char.arp.prio = a->priority_level;
|
||||
qos_char.arp.preempt_cap = a->pre_emp_capability == NGAP_PRE_EMPTION_CAPABILITY_MAY_TRIGGER_PREEMPTION
|
||||
? MAY_TRIGGER_PREEMPTION
|
||||
: SHALL_NOT_TRIGGER_PREEMPTION;
|
||||
qos_char.arp.preempt_vuln =
|
||||
a->pre_emp_vulnerability == NGAP_PRE_EMPTION_VULNERABILITY_PREEMPTABLE ? PREEMPTABLE : NOT_PREEMPTABLE;
|
||||
qos_char.arp.preempt_cap =
|
||||
a->pre_emp_capability == PEC_MAY_TRIGGER_PREEMPTION ? MAY_TRIGGER_PREEMPTION : SHALL_NOT_TRIGGER_PREEMPTION;
|
||||
qos_char.arp.preempt_vuln = a->pre_emp_vulnerability == PEV_PREEMPTABLE ? PREEMPTABLE : NOT_PREEMPTABLE;
|
||||
return qos_char;
|
||||
}
|
||||
|
||||
|
||||
@@ -368,11 +368,11 @@ bool trigger_bearer_setup(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE, int n, pdusession
|
||||
qos_char->non_dynamic.qos_priority_level = qos_session->qos_priority;
|
||||
}
|
||||
|
||||
ngran_allocation_retention_priority_t *rent_priority = &qos_flow->qos_params.alloc_reten_priority;
|
||||
ngap_allocation_retention_priority_t *rent_priority_in = &qos_session->allocation_retention_priority;
|
||||
rent_priority->priority_level = rent_priority_in->priority_level;
|
||||
rent_priority->preemption_capability = rent_priority_in->pre_emp_capability;
|
||||
rent_priority->preemption_vulnerability = rent_priority_in->pre_emp_vulnerability;
|
||||
ngran_allocation_retention_priority_t *arp_out = &qos_flow->qos_params.alloc_reten_priority;
|
||||
qos_arp_t *arp_in = &qos_session->arp;
|
||||
arp_out->priority_level = arp_in->priority_level;
|
||||
arp_out->preemption_capability = arp_in->pre_emp_capability;
|
||||
arp_out->preemption_vulnerability = arp_in->pre_emp_vulnerability;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user