Commit a24c2633 authored by Simon Pastor's avatar Simon Pastor
Browse files

revert order updating ue macId, set hardcoded rssi in STA_INFO

parent f6a57913
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -172,16 +172,18 @@ func processActiveScenarioUpdate() {
	// Update UE info
	ueNameList := sbi.activeModel.GetNodeNames("UE")
	for _, name := range ueNameList {
		log.Info("SIMON ", name)
		ueParent := sbi.activeModel.GetNodeParent(name)
		if poa, ok := ueParent.(*dataModel.NetworkLocation); ok {
			log.Info("SIMON poa ", poa.Name)
			apMacId := ""
			switch poa.Type_ {
			case mod.NodeTypePoaWifi:
				apMacId = poa.PoaWifiConfig.MacId
			}
			ue := (sbi.activeModel.GetNode(name)).(*dataModel.PhysicalLocation)

			sbi.updateUeDataCB(ue.MacId, name, apMacId)
			log.Info("SIMON all", ue.MacId, "---", name, "---", apMacId)
			sbi.updateUeDataCB(name, ue.MacId, apMacId)
		}
	}

+4 −0
Original line number Diff line number Diff line
@@ -673,6 +673,10 @@ func populateStaInfo(key string, jsonInfo string, response interface{}) error {
		apAssociated.MacId = ueData.ApMacId
		staInfo.ApAssociated = &apAssociated

		//TODO put a value in rssi that is coming from postGIS
		log.Info("SIMON RSSI")
		staInfo.Rssi = 121

		resp.StaInfo = append(resp.StaInfo, staInfo)

	}