Loading go-apps/meep-rnis/sbi/rnis-sbi.go +0 −11 Original line number Diff line number Diff line Loading @@ -267,9 +267,6 @@ func processActiveScenarioUpdate() { //get all measurements to update without waiting for ticker if len(ueNameList) > 0 { //no need to have the map if no ue to update ueMeasMap, _ := sbi.gisCache.GetAllMeasurements() for _, name := range ueNameList { // Ignore disconnected UEs if !isUeConnected(name) { Loading Loading @@ -336,9 +333,6 @@ func processActiveScenarioUpdate() { throughputUL = ue.NetChar.ThroughputUl } //update measurements, don't wait for ticker poaNamesInRange, rsrpsInRange, rsrqsInRange := getMeas(name, "", ueMeasMap) var ueDataSbi = UeDataSbi{ Name: name, Mnc: mnc, Loading @@ -352,9 +346,6 @@ func processActiveScenarioUpdate() { ThroughputDL: throughputDL, PacketLoss: ploss, ParentPoaName: poa.Name, InRangePoas: poaNamesInRange, InRangeRsrps: rsrpsInRange, InRangeRsrqs: rsrqsInRange, } sbi.updateUeDataCB(ueDataSbi) } Loading Loading @@ -501,7 +492,6 @@ func processActiveScenarioUpdate() { } func refreshMeasurements() { // Update UE measurements ueMeasMap, _ := sbi.gisCache.GetAllMeasurements() ueNameList := sbi.activeModel.GetNodeNames("UE") Loading @@ -521,7 +511,6 @@ func refreshMeasurements() { sbi.updateMeasInfoCB(name, "", nil, nil, nil) } } } func getMeas(ue string, poaName string, ueMeasMap map[string]*gc.UeMeasurement) ([]string, []int32, []int32) { Loading go-apps/meep-rnis/server/rnis.go +16 −38 Original line number Diff line number Diff line Loading @@ -478,17 +478,6 @@ func updateUeData(obj sbi.UeDataSbi) { ueData.ThroughputUL = obj.ThroughputUL ueData.ThroughputDL = obj.ThroughputDL ueData.PacketLoss = obj.PacketLoss var inRangePoas []InRangePoa for index := range obj.InRangePoas { var inRangePoa InRangePoa inRangePoa.Name = obj.InRangePoas[index] inRangePoa.Rsrp = obj.InRangeRsrps[index] inRangePoa.Rsrq = obj.InRangeRsrqs[index] inRangePoas = append(inRangePoas, inRangePoa) } ueData.InRangePoas = inRangePoas ueData.ParentPoaName = obj.ParentPoaName oldPlmn := new(Plmn) Loading @@ -499,7 +488,6 @@ func updateUeData(obj sbi.UeDataSbi) { oldNrPlmnMnc := "" oldNrPlmnMcc := "" oldNrCellId := "" var oldInRangePoas []InRangePoa //get from DB jsonUeData, _ := rc.JSONGetEntry(baseKey+"UE:"+obj.Name, ".") Loading @@ -520,7 +508,8 @@ func updateUeData(obj sbi.UeDataSbi) { oldNrPlmnMcc = ueDataObj.Nrcgi.Plmn.Mcc oldNrCellId = ueDataObj.Nrcgi.NrcellId } oldInRangePoas = ueDataObj.InRangePoas // Keep previous measurements ueData.InRangePoas = ueDataObj.InRangePoas } } //updateDB if changes occur (4G section) Loading Loading @@ -567,23 +556,6 @@ func updateUeData(obj sbi.UeDataSbi) { //update because nrcgi changed _ = rc.JSONSetEntry(baseKey+"UE:"+obj.Name, ".", convertUeDataToJson(&ueData)) } //update if poa in range and signal powers changed //as soon as there is one difference... need an update updateMeas := false if len(oldInRangePoas) != len(inRangePoas) { updateMeas = true } else { for index := range oldInRangePoas { if oldInRangePoas[index].Name != inRangePoas[index].Name || oldInRangePoas[index].Rsrp != inRangePoas[index].Rsrp || oldInRangePoas[index].Rsrq != inRangePoas[index].Rsrq { updateMeas = true break } } } if updateMeas { //update because power signals changed _ = rc.JSONSetEntry(baseKey+"UE:"+obj.Name, ".", convertUeDataToJson(&ueData)) } } } Loading Loading @@ -1605,7 +1577,6 @@ func checkMrNotificationRegisteredSubscriptions(key string, jsonInfo string, ext } subscription := convertJsonToMeasRepUeSubscription(jsonInfo) log.Info("Sending RNIS notification ", subscription.CallbackReference) var notif MeasRepUeNotification notif.NotificationType = MEAS_REP_UE_NOTIFICATION Loading @@ -1622,10 +1593,12 @@ func checkMrNotificationRegisteredSubscriptions(key string, jsonInfo string, ext notif.AssociateId = append(notif.AssociateId, *assocId) //adding the data of all reachable cells parentMeasExists := false for _, poa := range ueData.InRangePoas { if poa.Name == ueData.ParentPoaName { notif.Rsrp = poa.Rsrp notif.Rsrq = poa.Rsrq parentMeasExists = true } else { jsonInfo, _ := rc.JSONGetEntry(baseKey+"POA:"+poa.Name, ".") if jsonInfo == "" { Loading Loading @@ -1657,11 +1630,14 @@ func checkMrNotificationRegisteredSubscriptions(key string, jsonInfo string, ext } } if parentMeasExists { log.Info("Sending RNIS notification ", subscription.CallbackReference) go sendMrNotification(subscription.CallbackReference, notif) log.Info("Meas_Rep_Ue Notification" + "(" + subsIdStr + ")") } } } } return nil } Loading Loading @@ -1710,7 +1686,6 @@ func checkNrMrNotificationRegisteredSubscriptions(key string, jsonInfo string, e match := isMatchFilterCriteriaAssociateId(nrMeasRepUeSubscriptionType, sub.FilterCriteriaNrMrs, assocId) if match { if ueData.Nrcgi != nil { match = isMatchFilterCriteriaNrcgi(nrMeasRepUeSubscriptionType, sub.FilterCriteriaNrMrs, ueData.Nrcgi.Plmn, nil, ueData.Nrcgi.NrcellId, "") } else { Loading @@ -1723,7 +1698,6 @@ func checkNrMrNotificationRegisteredSubscriptions(key string, jsonInfo string, e } if match { subsIdStr := strconv.Itoa(subsId) jsonInfo, _ := rc.JSONGetEntry(baseKey+"subscriptions:"+subsIdStr, ".") if jsonInfo == "" { Loading @@ -1731,7 +1705,6 @@ func checkNrMrNotificationRegisteredSubscriptions(key string, jsonInfo string, e } subscription := convertJsonToNrMeasRepUeSubscription(jsonInfo) log.Info("Sending RNIS notification ", subscription.CallbackReference) var notif NrMeasRepUeNotification notif.NotificationType = NR_MEAS_REP_UE_NOTIFICATION Loading @@ -1757,6 +1730,7 @@ func checkNrMrNotificationRegisteredSubscriptions(key string, jsonInfo string, e strongestRsrp := int32(0) //adding the data of all reachable cells parentMeasExists := false for _, poa := range ueData.InRangePoas { if poa.Name == ueData.ParentPoaName { var measQuantityResultsNr MeasQuantityResultsNr Loading @@ -1765,6 +1739,7 @@ func checkNrMrNotificationRegisteredSubscriptions(key string, jsonInfo string, e var nrMeasRepUeNotificationSCell NrMeasRepUeNotificationSCell nrMeasRepUeNotificationSCell.MeasQuantityResultsSsbCell = &measQuantityResultsNr notif.ServCellMeasInfo[0].SCell = &nrMeasRepUeNotificationSCell parentMeasExists = true } else { jsonInfo, _ := rc.JSONGetEntry(baseKey+"POA:"+poa.Name, ".") if jsonInfo == "" { Loading Loading @@ -1808,11 +1783,14 @@ func checkNrMrNotificationRegisteredSubscriptions(key string, jsonInfo string, e notif.EutraNeighCellMeasInfo = nil } if parentMeasExists { log.Info("Sending RNIS notification ", subscription.CallbackReference) go sendNrMrNotification(subscription.CallbackReference, notif) log.Info("Nr_Meas_Rep_Ue Notification" + "(" + subsIdStr + ")") } } } } return nil } Loading Loading
go-apps/meep-rnis/sbi/rnis-sbi.go +0 −11 Original line number Diff line number Diff line Loading @@ -267,9 +267,6 @@ func processActiveScenarioUpdate() { //get all measurements to update without waiting for ticker if len(ueNameList) > 0 { //no need to have the map if no ue to update ueMeasMap, _ := sbi.gisCache.GetAllMeasurements() for _, name := range ueNameList { // Ignore disconnected UEs if !isUeConnected(name) { Loading Loading @@ -336,9 +333,6 @@ func processActiveScenarioUpdate() { throughputUL = ue.NetChar.ThroughputUl } //update measurements, don't wait for ticker poaNamesInRange, rsrpsInRange, rsrqsInRange := getMeas(name, "", ueMeasMap) var ueDataSbi = UeDataSbi{ Name: name, Mnc: mnc, Loading @@ -352,9 +346,6 @@ func processActiveScenarioUpdate() { ThroughputDL: throughputDL, PacketLoss: ploss, ParentPoaName: poa.Name, InRangePoas: poaNamesInRange, InRangeRsrps: rsrpsInRange, InRangeRsrqs: rsrqsInRange, } sbi.updateUeDataCB(ueDataSbi) } Loading Loading @@ -501,7 +492,6 @@ func processActiveScenarioUpdate() { } func refreshMeasurements() { // Update UE measurements ueMeasMap, _ := sbi.gisCache.GetAllMeasurements() ueNameList := sbi.activeModel.GetNodeNames("UE") Loading @@ -521,7 +511,6 @@ func refreshMeasurements() { sbi.updateMeasInfoCB(name, "", nil, nil, nil) } } } func getMeas(ue string, poaName string, ueMeasMap map[string]*gc.UeMeasurement) ([]string, []int32, []int32) { Loading
go-apps/meep-rnis/server/rnis.go +16 −38 Original line number Diff line number Diff line Loading @@ -478,17 +478,6 @@ func updateUeData(obj sbi.UeDataSbi) { ueData.ThroughputUL = obj.ThroughputUL ueData.ThroughputDL = obj.ThroughputDL ueData.PacketLoss = obj.PacketLoss var inRangePoas []InRangePoa for index := range obj.InRangePoas { var inRangePoa InRangePoa inRangePoa.Name = obj.InRangePoas[index] inRangePoa.Rsrp = obj.InRangeRsrps[index] inRangePoa.Rsrq = obj.InRangeRsrqs[index] inRangePoas = append(inRangePoas, inRangePoa) } ueData.InRangePoas = inRangePoas ueData.ParentPoaName = obj.ParentPoaName oldPlmn := new(Plmn) Loading @@ -499,7 +488,6 @@ func updateUeData(obj sbi.UeDataSbi) { oldNrPlmnMnc := "" oldNrPlmnMcc := "" oldNrCellId := "" var oldInRangePoas []InRangePoa //get from DB jsonUeData, _ := rc.JSONGetEntry(baseKey+"UE:"+obj.Name, ".") Loading @@ -520,7 +508,8 @@ func updateUeData(obj sbi.UeDataSbi) { oldNrPlmnMcc = ueDataObj.Nrcgi.Plmn.Mcc oldNrCellId = ueDataObj.Nrcgi.NrcellId } oldInRangePoas = ueDataObj.InRangePoas // Keep previous measurements ueData.InRangePoas = ueDataObj.InRangePoas } } //updateDB if changes occur (4G section) Loading Loading @@ -567,23 +556,6 @@ func updateUeData(obj sbi.UeDataSbi) { //update because nrcgi changed _ = rc.JSONSetEntry(baseKey+"UE:"+obj.Name, ".", convertUeDataToJson(&ueData)) } //update if poa in range and signal powers changed //as soon as there is one difference... need an update updateMeas := false if len(oldInRangePoas) != len(inRangePoas) { updateMeas = true } else { for index := range oldInRangePoas { if oldInRangePoas[index].Name != inRangePoas[index].Name || oldInRangePoas[index].Rsrp != inRangePoas[index].Rsrp || oldInRangePoas[index].Rsrq != inRangePoas[index].Rsrq { updateMeas = true break } } } if updateMeas { //update because power signals changed _ = rc.JSONSetEntry(baseKey+"UE:"+obj.Name, ".", convertUeDataToJson(&ueData)) } } } Loading Loading @@ -1605,7 +1577,6 @@ func checkMrNotificationRegisteredSubscriptions(key string, jsonInfo string, ext } subscription := convertJsonToMeasRepUeSubscription(jsonInfo) log.Info("Sending RNIS notification ", subscription.CallbackReference) var notif MeasRepUeNotification notif.NotificationType = MEAS_REP_UE_NOTIFICATION Loading @@ -1622,10 +1593,12 @@ func checkMrNotificationRegisteredSubscriptions(key string, jsonInfo string, ext notif.AssociateId = append(notif.AssociateId, *assocId) //adding the data of all reachable cells parentMeasExists := false for _, poa := range ueData.InRangePoas { if poa.Name == ueData.ParentPoaName { notif.Rsrp = poa.Rsrp notif.Rsrq = poa.Rsrq parentMeasExists = true } else { jsonInfo, _ := rc.JSONGetEntry(baseKey+"POA:"+poa.Name, ".") if jsonInfo == "" { Loading Loading @@ -1657,11 +1630,14 @@ func checkMrNotificationRegisteredSubscriptions(key string, jsonInfo string, ext } } if parentMeasExists { log.Info("Sending RNIS notification ", subscription.CallbackReference) go sendMrNotification(subscription.CallbackReference, notif) log.Info("Meas_Rep_Ue Notification" + "(" + subsIdStr + ")") } } } } return nil } Loading Loading @@ -1710,7 +1686,6 @@ func checkNrMrNotificationRegisteredSubscriptions(key string, jsonInfo string, e match := isMatchFilterCriteriaAssociateId(nrMeasRepUeSubscriptionType, sub.FilterCriteriaNrMrs, assocId) if match { if ueData.Nrcgi != nil { match = isMatchFilterCriteriaNrcgi(nrMeasRepUeSubscriptionType, sub.FilterCriteriaNrMrs, ueData.Nrcgi.Plmn, nil, ueData.Nrcgi.NrcellId, "") } else { Loading @@ -1723,7 +1698,6 @@ func checkNrMrNotificationRegisteredSubscriptions(key string, jsonInfo string, e } if match { subsIdStr := strconv.Itoa(subsId) jsonInfo, _ := rc.JSONGetEntry(baseKey+"subscriptions:"+subsIdStr, ".") if jsonInfo == "" { Loading @@ -1731,7 +1705,6 @@ func checkNrMrNotificationRegisteredSubscriptions(key string, jsonInfo string, e } subscription := convertJsonToNrMeasRepUeSubscription(jsonInfo) log.Info("Sending RNIS notification ", subscription.CallbackReference) var notif NrMeasRepUeNotification notif.NotificationType = NR_MEAS_REP_UE_NOTIFICATION Loading @@ -1757,6 +1730,7 @@ func checkNrMrNotificationRegisteredSubscriptions(key string, jsonInfo string, e strongestRsrp := int32(0) //adding the data of all reachable cells parentMeasExists := false for _, poa := range ueData.InRangePoas { if poa.Name == ueData.ParentPoaName { var measQuantityResultsNr MeasQuantityResultsNr Loading @@ -1765,6 +1739,7 @@ func checkNrMrNotificationRegisteredSubscriptions(key string, jsonInfo string, e var nrMeasRepUeNotificationSCell NrMeasRepUeNotificationSCell nrMeasRepUeNotificationSCell.MeasQuantityResultsSsbCell = &measQuantityResultsNr notif.ServCellMeasInfo[0].SCell = &nrMeasRepUeNotificationSCell parentMeasExists = true } else { jsonInfo, _ := rc.JSONGetEntry(baseKey+"POA:"+poa.Name, ".") if jsonInfo == "" { Loading Loading @@ -1808,11 +1783,14 @@ func checkNrMrNotificationRegisteredSubscriptions(key string, jsonInfo string, e notif.EutraNeighCellMeasInfo = nil } if parentMeasExists { log.Info("Sending RNIS notification ", subscription.CallbackReference) go sendNrMrNotification(subscription.CallbackReference, notif) log.Info("Nr_Meas_Rep_Ue Notification" + "(" + subsIdStr + ")") } } } } return nil } Loading