internal static NetworkLteCell ConvertLteStruct(NetworkLteCellStruct lteStruct) { NetworkLteCell lteCell = new NetworkLteCell(); lteCell.Id = lteStruct.CellId; lteCell.Erf = lteStruct.Earfcn; lteCell.Lc = lteStruct.Lac; lteCell.PId = lteStruct.Pcid; lteCell.Tc = lteStruct.Tac; lteCell.Rs = lteStruct.Rssi; return(lteCell); }
internal static NetworkNeighboringCell ConvertNeighborCellStruct(NetworkNeighboringCellStruct neighborStruct) { NetworkNeighboringCell neighborCell = new NetworkNeighboringCell(); NetworkServingCellStruct servStruct = neighborStruct.ServCell; CellStruct cellStruct = servStruct.Cell; NetworkGeranCellStruct geranStruct = cellStruct.Geran; NetworkCdmaCellStruct cdmaStruct = cellStruct.Cdma; NetworkUmtsCellStruct umtsStruct = cellStruct.Umts; NetworkLteCellStruct lteStruct = cellStruct.Lte; NetworkGeranCell geranCell = ConvertGeranStruct(geranStruct); NetworkCdmaCell cdmaCell = new NetworkCdmaCell(); cdmaCell.BaseStnId = cdmaStruct.BaseId; cdmaCell.BaseStnLatitude = cdmaStruct.BaseStnLatitude; cdmaCell.BaseStnLongitude = cdmaStruct.BaseStnLongitude; cdmaCell.NwId = cdmaStruct.NetworkId; cdmaCell.RefPn = cdmaStruct.RefPn; cdmaCell.SysId = cdmaStruct.SystemId; NetworkUmtsCell umtsCell = ConvertUmtsStruct(umtsStruct); NetworkLteCell lteCell = ConvertLteStruct(lteStruct); Cell cell = new Cell(); cell.Geran = geranCell; cell.Cdma = cdmaCell; cell.Umts = umtsCell; cell.Lte = lteCell; NetworkServingCell servingCell = new NetworkServingCell(); servingCell.SysType = servStruct.SystemType; servingCell.MCountryCode = servStruct.MobileCountryCode; servingCell.MNwCode = servStruct.MobileNetworkCode; servingCell.Info = cell; neighborCell.ServCell = servingCell; List <NetworkGeranCell> geranCellList = new List <NetworkGeranCell>(); for (int i = 0; i < neighborStruct.GeranCount; i++) { NetworkGeranCell geran = ConvertGeranStruct(neighborStruct.GeranList[i]); geranCellList.Add(geran); } List <NetworkUmtsCell> umtsCellList = new List <NetworkUmtsCell>(); for (int i = 0; i < neighborStruct.UmtsCount; i++) { NetworkUmtsCell umts = ConvertUmtsStruct(neighborStruct.UmtsList[i]); umtsCellList.Add(umts); } List <NetworkLteCell> lteCellList = new List <NetworkLteCell>(); for (int i = 0; i < neighborStruct.GeranCount; i++) { NetworkLteCell lte = ConvertLteStruct(neighborStruct.LteList[i]); lteCellList.Add(lte); } neighborCell.GrList = geranCellList; neighborCell.UmtList = umtsCellList; neighborCell.LtList = lteCellList; return(neighborCell); }