Commit eeca8f9f authored by francescomani's avatar francescomani

improvements in handling quantityConfig

parent 809694cf
...@@ -1191,6 +1191,29 @@ static void handle_reportconfig_addmod(rrcPerNB_t *rrc, struct NR_ReportConfigTo ...@@ -1191,6 +1191,29 @@ static void handle_reportconfig_addmod(rrcPerNB_t *rrc, struct NR_ReportConfigTo
} }
} }
static void handle_quantityconfig(rrcPerNB_t *rrc, NR_QuantityConfig_t *quantityConfig)
{
if (quantityConfig->quantityConfigNR_List) {
for (int i = 0; i < quantityConfig->quantityConfigNR_List->list.count; i++) {
NR_QuantityConfigNR_t *quantityNR = quantityConfig->quantityConfigNR_List->list.array[i];
if (!rrc->QuantityConfig[i])
rrc->QuantityConfig[i] = calloc(1, sizeof(*rrc->QuantityConfig[i]));
rrc->QuantityConfig[i]->quantityConfigCell = quantityNR->quantityConfigCell;
if (quantityNR->quantityConfigRS_Index)
UPDATE_IE(rrc->QuantityConfig[i]->quantityConfigRS_Index, quantityNR->quantityConfigRS_Index, struct NR_QuantityConfigRS);
}
}
for (int j = 0; j < MAX_MEAS_ID; j++) {
// for each measId included in the measIdList
if (rrc->MeasId[j]) {
// remove the measurement reporting entry for this measId if included
asn1cFreeStruc(asn_DEF_NR_VarMeasReport, rrc->MeasReport[j]);
// TODO stop the periodical reporting timer or timer T321, whichever one is running
// and reset the associated information (e.g. timeToTrigger) for this measId
}
}
}
static void nr_rrc_ue_process_measConfig(rrcPerNB_t *rrc, NR_MeasConfig_t *const measConfig) static void nr_rrc_ue_process_measConfig(rrcPerNB_t *rrc, NR_MeasConfig_t *const measConfig)
{ {
int i; int i;
...@@ -1208,6 +1231,9 @@ static void nr_rrc_ue_process_measConfig(rrcPerNB_t *rrc, NR_MeasConfig_t *const ...@@ -1208,6 +1231,9 @@ static void nr_rrc_ue_process_measConfig(rrcPerNB_t *rrc, NR_MeasConfig_t *const
if (measConfig->reportConfigToAddModList) if (measConfig->reportConfigToAddModList)
handle_reportconfig_addmod(rrc, measConfig->reportConfigToAddModList); handle_reportconfig_addmod(rrc, measConfig->reportConfigToAddModList);
if (measConfig->quantityConfig)
handle_quantityconfig(rrc, measConfig->quantityConfig);
if (measConfig->measIdToRemoveList != NULL) { if (measConfig->measIdToRemoveList != NULL) {
for (i = 0; i < measConfig->measIdToRemoveList->list.count; i++) { for (i = 0; i < measConfig->measIdToRemoveList->list.count; i++) {
ind = *measConfig->measIdToRemoveList->list.array[i]; ind = *measConfig->measIdToRemoveList->list.array[i];
...@@ -1229,16 +1255,6 @@ static void nr_rrc_ue_process_measConfig(rrcPerNB_t *rrc, NR_MeasConfig_t *const ...@@ -1229,16 +1255,6 @@ static void nr_rrc_ue_process_measConfig(rrcPerNB_t *rrc, NR_MeasConfig_t *const
} }
} }
if (measConfig->quantityConfig != NULL) {
if (rrc->QuantityConfig) {
LOG_D(NR_RRC, "Modifying Quantity Configuration \n");
memcpy(rrc->QuantityConfig, (char *)measConfig->quantityConfig, sizeof(NR_QuantityConfig_t));
} else {
LOG_D(NR_RRC, "Adding Quantity configuration\n");
rrc->QuantityConfig = measConfig->quantityConfig;
}
}
if (measConfig->measGapConfig != NULL) { if (measConfig->measGapConfig != NULL) {
if (rrc->measGapConfig) { if (rrc->measGapConfig) {
memcpy(rrc->measGapConfig, (char *)measConfig->measGapConfig, sizeof(NR_MeasGapConfig_t)); memcpy(rrc->measGapConfig, (char *)measConfig->measGapConfig, sizeof(NR_MeasGapConfig_t));
......
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
#define MAX_MEAS_OBJ 7 #define MAX_MEAS_OBJ 7
#define MAX_MEAS_CONFIG 7 #define MAX_MEAS_CONFIG 7
#define MAX_MEAS_ID 7 #define MAX_MEAS_ID 7
#define MAX_QUANTITY_CONFIG 2
typedef uint32_t channel_t; typedef uint32_t channel_t;
...@@ -177,7 +178,7 @@ typedef enum { RB_NOT_PRESENT, RB_ESTABLISHED, RB_SUSPENDED } NR_RB_status_t; ...@@ -177,7 +178,7 @@ typedef enum { RB_NOT_PRESENT, RB_ESTABLISHED, RB_SUSPENDED } NR_RB_status_t;
typedef struct rrcPerNB { typedef struct rrcPerNB {
NR_MeasObjectToAddMod_t *MeasObj[MAX_MEAS_OBJ]; NR_MeasObjectToAddMod_t *MeasObj[MAX_MEAS_OBJ];
NR_ReportConfigToAddMod_t *ReportConfig[MAX_MEAS_CONFIG]; NR_ReportConfigToAddMod_t *ReportConfig[MAX_MEAS_CONFIG];
NR_QuantityConfig_t *QuantityConfig; NR_QuantityConfigNR_t *QuantityConfig[MAX_QUANTITY_CONFIG];
NR_MeasIdToAddMod_t *MeasId[MAX_MEAS_ID]; NR_MeasIdToAddMod_t *MeasId[MAX_MEAS_ID];
NR_VarMeasReport_t *MeasReport[MAX_MEAS_ID]; NR_VarMeasReport_t *MeasReport[MAX_MEAS_ID];
NR_MeasGapConfig_t *measGapConfig; NR_MeasGapConfig_t *measGapConfig;
......
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