improvements in handling reportConfig addition, modification and removal
This commit is contained in:
+48
-29
@@ -1058,11 +1058,9 @@ static void handle_measobj_remove(rrcPerNB_t *rrc, struct NR_MeasObjectToRemoveL
|
|||||||
// remove all measId associated with this measObjectId from the measIdList
|
// remove all measId associated with this measObjectId from the measIdList
|
||||||
for (int j = 0; j < MAX_MEAS_ID; j++) {
|
for (int j = 0; j < MAX_MEAS_ID; j++) {
|
||||||
if (rrc->MeasId[j] && rrc->MeasId[j]->measObjectId == id) {
|
if (rrc->MeasId[j] && rrc->MeasId[j]->measObjectId == id) {
|
||||||
NR_ReportConfigId_t report_id = rrc->MeasId[j]->reportConfigId;
|
|
||||||
asn1cFreeStruc(asn_DEF_NR_MeasIdToAddMod, rrc->MeasId[j]);
|
asn1cFreeStruc(asn_DEF_NR_MeasIdToAddMod, rrc->MeasId[j]);
|
||||||
// remove the measurement reporting entry for this measId if included
|
// remove the measurement reporting entry for this measId if included
|
||||||
// TODO verify this is correct
|
asn1cFreeStruc(asn_DEF_NR_VarMeasReport, rrc->MeasReport[j]);
|
||||||
asn1cFreeStruc(asn_DEF_NR_ReportConfigToAddMod, rrc->ReportConfig[report_id]);
|
|
||||||
// TODO stop the periodical reporting timer or timer T321, whichever is running,
|
// TODO stop the periodical reporting timer or timer T321, whichever is running,
|
||||||
// and reset the associated information (e.g. timeToTrigger) for this measId
|
// and reset the associated information (e.g. timeToTrigger) for this measId
|
||||||
}
|
}
|
||||||
@@ -1151,11 +1149,53 @@ static void handle_measobj_addmod(rrcPerNB_t *rrc, struct NR_MeasObjectToAddModL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void handle_reportconfig_remove(rrcPerNB_t *rrc, struct NR_ReportConfigToRemoveList *remove_list)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < remove_list->list.count; i++) {
|
||||||
|
NR_ReportConfigId_t id = *remove_list->list.array[i];
|
||||||
|
// remove the entry with the matching reportConfigId from the reportConfigList
|
||||||
|
asn1cFreeStruc(asn_DEF_NR_ReportConfigToAddMod, rrc->ReportConfig[id]);
|
||||||
|
for (int j = 0; j < MAX_MEAS_ID; j++) {
|
||||||
|
if (rrc->MeasId[j] && rrc->MeasId[j]->reportConfigId == id) {
|
||||||
|
// remove all measId associated with the reportConfigId from the measIdList
|
||||||
|
asn1cFreeStruc(asn_DEF_NR_MeasIdToAddMod, 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 handle_reportconfig_addmod(rrcPerNB_t *rrc, struct NR_ReportConfigToAddModList *addmod_list)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < addmod_list->list.count; i++) {
|
||||||
|
NR_ReportConfigToAddMod_t *rep = addmod_list->list.array[i];
|
||||||
|
if (rep->reportConfig.present != NR_ReportConfigToAddMod__reportConfig_PR_reportConfigNR) {
|
||||||
|
LOG_E(NR_RRC, "Cannot handle reportConfig type other than NR\n");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
NR_ReportConfigId_t id = rep->reportConfigId;
|
||||||
|
if (rrc->ReportConfig[id]) {
|
||||||
|
for (int j = 0; j < MAX_MEAS_ID; j++) {
|
||||||
|
// for each measId associated with this reportConfigId included in the measIdList
|
||||||
|
if (rrc->MeasId[j] && rrc->MeasId[j]->reportConfigId == id) {
|
||||||
|
// 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
UPDATE_IE(rrc->ReportConfig[id], addmod_list->list.array[i], NR_ReportConfigToAddMod_t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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;
|
||||||
long ind;
|
long ind;
|
||||||
NR_ReportConfigToAddMod_t *reportConfig = NULL;
|
|
||||||
|
|
||||||
if (measConfig->measObjectToRemoveList)
|
if (measConfig->measObjectToRemoveList)
|
||||||
handle_measobj_remove(rrc, measConfig->measObjectToRemoveList);
|
handle_measobj_remove(rrc, measConfig->measObjectToRemoveList);
|
||||||
@@ -1163,32 +1203,11 @@ static void nr_rrc_ue_process_measConfig(rrcPerNB_t *rrc, NR_MeasConfig_t *const
|
|||||||
if (measConfig->measObjectToAddModList)
|
if (measConfig->measObjectToAddModList)
|
||||||
handle_measobj_addmod(rrc, measConfig->measObjectToAddModList);
|
handle_measobj_addmod(rrc, measConfig->measObjectToAddModList);
|
||||||
|
|
||||||
if (measConfig->reportConfigToRemoveList != NULL) {
|
if (measConfig->reportConfigToRemoveList)
|
||||||
for (i = 0; i < measConfig->reportConfigToRemoveList->list.count; i++) {
|
handle_reportconfig_remove(rrc, measConfig->reportConfigToRemoveList);
|
||||||
ind = *measConfig->reportConfigToRemoveList->list.array[i];
|
|
||||||
free(rrc->ReportConfig[ind - 1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (measConfig->reportConfigToAddModList != NULL) {
|
if (measConfig->reportConfigToAddModList)
|
||||||
LOG_I(NR_RRC, "Report Configuration List is present\n");
|
handle_reportconfig_addmod(rrc, measConfig->reportConfigToAddModList);
|
||||||
for (i = 0; i < measConfig->reportConfigToAddModList->list.count; i++) {
|
|
||||||
ind = measConfig->reportConfigToAddModList->list.array[i]->reportConfigId;
|
|
||||||
reportConfig = measConfig->reportConfigToAddModList->list.array[i];
|
|
||||||
|
|
||||||
if (rrc->ReportConfig[ind - 1]) {
|
|
||||||
LOG_I(NR_RRC, "Modifying Report Configuration %ld\n", ind - 1);
|
|
||||||
memcpy(rrc->ReportConfig[ind - 1],
|
|
||||||
(char *)measConfig->reportConfigToAddModList->list.array[i],
|
|
||||||
sizeof(NR_ReportConfigToAddMod_t));
|
|
||||||
} else {
|
|
||||||
LOG_D(NR_RRC, "Adding Report Configuration %ld %p \n", ind - 1, measConfig->reportConfigToAddModList->list.array[i]);
|
|
||||||
if (reportConfig->reportConfig.present == NR_ReportConfigToAddMod__reportConfig_PR_reportConfigNR) {
|
|
||||||
rrc->ReportConfig[ind - 1] = measConfig->reportConfigToAddModList->list.array[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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++) {
|
||||||
|
|||||||
@@ -56,6 +56,8 @@
|
|||||||
#include "NR_UE-NR-Capability.h"
|
#include "NR_UE-NR-Capability.h"
|
||||||
#include "NR_SL-PreconfigurationNR-r16.h"
|
#include "NR_SL-PreconfigurationNR-r16.h"
|
||||||
#include "NR_MasterInformationBlockSidelink.h"
|
#include "NR_MasterInformationBlockSidelink.h"
|
||||||
|
#include "NR_MeasurementReport.h"
|
||||||
|
#include "NR_VarMeasReport.h"
|
||||||
|
|
||||||
#include "RRC/NR/nr_rrc_common.h"
|
#include "RRC/NR/nr_rrc_common.h"
|
||||||
#include "as_message.h"
|
#include "as_message.h"
|
||||||
@@ -177,6 +179,7 @@ typedef struct rrcPerNB {
|
|||||||
NR_ReportConfigToAddMod_t *ReportConfig[MAX_MEAS_CONFIG];
|
NR_ReportConfigToAddMod_t *ReportConfig[MAX_MEAS_CONFIG];
|
||||||
NR_QuantityConfig_t *QuantityConfig;
|
NR_QuantityConfig_t *QuantityConfig;
|
||||||
NR_MeasIdToAddMod_t *MeasId[MAX_MEAS_ID];
|
NR_MeasIdToAddMod_t *MeasId[MAX_MEAS_ID];
|
||||||
|
NR_VarMeasReport_t *MeasReport[MAX_MEAS_ID];
|
||||||
NR_MeasGapConfig_t *measGapConfig;
|
NR_MeasGapConfig_t *measGapConfig;
|
||||||
NR_UE_RRC_SI_INFO SInfo;
|
NR_UE_RRC_SI_INFO SInfo;
|
||||||
NR_RSRP_Range_t s_measure;
|
NR_RSRP_Range_t s_measure;
|
||||||
|
|||||||
Reference in New Issue
Block a user