Ejemplo n.º 1
0
        internal static NetworkGeranCell ConvertGeranStruct(NetworkGeranCellStruct geranStruct)
        {
            NetworkGeranCell geranCell = new NetworkGeranCell();

            geranCell.Bc = geranStruct.Bcch;
            geranCell.Bs = geranStruct.Bsic;
            geranCell.Id = geranStruct.CellId;
            geranCell.Lc = geranStruct.Lac;
            geranCell.Rx = geranStruct.Rxlev;
            return(geranCell);
        }
Ejemplo n.º 2
0
        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);
        }