//如何生成单个用户的下属信息? //生成连线的问题? public List <mrNeighbour> setNeighList() { List <mrNeighbour> mrneighs = new List <mrNeighbour>(); mrNeighbour scell = new mrNeighbour("JMJDEY1", -97, 0, 0, 0); //服务小区只记录功率控制和由dtx转换的接受电平 mrneighs.Add(scell); mrNeighbour n0 = new mrNeighbour("JMJDEY1", -103, 9, 30, 0); mrneighs.Add(n0); mrNeighbour n1 = new mrNeighbour("JMJDEY1", -106, 1, 53, 0); mrneighs.Add(n1); mrNeighbour n2 = new mrNeighbour("JMJDEY1", -110, 6, 14, 0); mrneighs.Add(n2); mrNeighbour n3 = new mrNeighbour("JMJDEY1", -110, 4, 43, 0); mrneighs.Add(n3); mrNeighbour n4 = new mrNeighbour("JMJDEY1", -110, 0, 65, 0); mrneighs.Add(n4); mrNeighbour n5 = new mrNeighbour("JMJDEY1", -110, 11, 62, 0); mrneighs.Add(n5); return(mrneighs); }
//直接从数据库提取下述数据生成事件的GIS定位? //这里需要增加 TA 和 天线高度的控制 ,还有室内站,室外站 等等。 public List <mrNeighbour> setNeighList(Abis_MR mr) { List <mrNeighbour> mrneighs = new List <mrNeighbour>(); powercontrol = 0; if (mr.bs_power != null) { int.TryParse(mr.bs_power.Replace("Pn", ""), out powercontrol); //功率去掉pn即可 } //服务小区只记录功率控制和由dtx转换的接受电平 if (mr.act_ta <= 12) //服务小区的TA值太大则剔除掉??? 13~17是直放站话务密集区域 { if (mr.dtx_used == "Set" || mr.rxlev_full_serv_cell == null) { mrNeighbour scell = new mrNeighbour(mr.cell, (int)mr.rxlev_sub_serv_cell - 110, -1, -1, powercontrol); mrneighs.Add(scell); } else { mrNeighbour scell = new mrNeighbour(mr.cell, (int)mr.rxlev_full_serv_cell - 110, -1, -1, powercontrol); mrneighs.Add(scell); } } //邻小区不需要记录功率控制值,只需要测量的电平值即可 if (mr.bsic0 != 0) { mrNeighbour n0 = new mrNeighbour(mr.cell, (int)mr.rxlev0, (int)mr.bcch0, (int)mr.bsic0, 0); mrneighs.Add(n0); } if (mr.bsic1 != 0) { mrNeighbour n1 = new mrNeighbour(mr.cell, (int)mr.rxlev1, (int)mr.bcch1, (int)mr.bsic1, 0); mrneighs.Add(n1); } if (mr.bsic2 != 0) { mrNeighbour n2 = new mrNeighbour(mr.cell, (int)mr.rxlev2, (int)mr.bcch2, (int)mr.bsic2, 0); mrneighs.Add(n2); } if (mr.bsic3 != 0) { mrNeighbour n3 = new mrNeighbour(mr.cell, (int)mr.rxlev3, (int)mr.bcch3, (int)mr.bsic3, 0); mrneighs.Add(n3); } if (mr.bsic4 != 0) { mrNeighbour n4 = new mrNeighbour(mr.cell, (int)mr.rxlev4, (int)mr.bcch4, (int)mr.bsic4, 0); mrneighs.Add(n4); } if (mr.bsic5 != 0) { mrNeighbour n5 = new mrNeighbour(mr.cell, (int)mr.rxlev5, (int)mr.bcch5, (int)mr.bsic5, 0); mrneighs.Add(n5); } return(mrneighs); }
//考虑用ref ,避免在内存生成多余的对象 ,但是似乎是一个集合,在迭代过程中不能修改?? public List <mrNeighbour> getNeighList(List <mrNeighbour> mrNeighs, bool bsic_conversion) { List <mrNeighbour> mrNeighsNew = new List <mrNeighbour>(); foreach (var n in mrNeighs) { mrNeighbour mn = new mrNeighbour(); tBCCH = getNeighBCCH(n.ServiceCell, n.nBaIndex); // 通过计算获取到邻小区 BCCH //BSIC的编码是否需要转换, if (bsic_conversion) { tBSIC = getNeighBSIC(n.nBSIC); } else { tBSIC = n.nBSIC; } //Console.WriteLine("bcch.....{0}..", tBCCH); mn.ServiceCell = n.ServiceCell; mn.NeighCell = getNeighCell(n.ServiceCell, tBCCH, tBSIC.ToString()); //通过计算获取到邻小区 名称 //Console.WriteLine("neigbour cell....cell....{0}..bcch...{1}...bsic...{2}", mn.NeighCell, tBCCH, tBSIC); //Console.WriteLine("--------------------------"); mn.nBaIndex = n.nBaIndex; mn.nBCCH = tBCCH; mn.nBSIC = tBSIC; mn.rxLev = n.rxLev; mn.powerControl = n.powerControl; mrNeighsNew.Add(mn); } return(mrNeighsNew); }