Exemplo n.º 1
0
            public SystemInformationBlockType4 Decode(BitArrayInputStream input)
            {
                int num2;
                var type = new SystemInformationBlockType4();

                type.InitDefaults();
                var flag = false;

                flag = input.readBit() != 0;
                var stream = flag ? new BitMaskStream(input, 4) : new BitMaskStream(input, 3);

                if (stream.Read())
                {
                    type.intraFreqNeighCellList = new List <IntraFreqNeighCellInfo>();
                    num2 = 4;
                    var num3 = input.readBits(num2) + 1;
                    for (var i = 0; i < num3; i++)
                    {
                        var item = IntraFreqNeighCellInfo.PerDecoder.Instance.Decode(input);
                        type.intraFreqNeighCellList.Add(item);
                    }
                }
                if (stream.Read())
                {
                    type.intraFreqBlackCellList = new List <PhysCellIdRange>();
                    num2 = 4;
                    var num5 = input.readBits(num2) + 1;
                    for (var j = 0; j < num5; j++)
                    {
                        var range = PhysCellIdRange.PerDecoder.Instance.Decode(input);
                        type.intraFreqBlackCellList.Add(range);
                    }
                }
                if (stream.Read())
                {
                    type.csg_PhysCellIdRange = PhysCellIdRange.PerDecoder.Instance.Decode(input);
                }
                if (flag && stream.Read())
                {
                    var nBits = input.readBits(8);
                    type.lateNonCriticalExtension = input.readOctetString(nBits);
                }
                return(type);
            }
 public SystemInformationBlockType4 Decode(BitArrayInputStream input)
 {
     int num2;
     var type = new SystemInformationBlockType4();
     type.InitDefaults();
     var flag = false;
     flag = input.ReadBit() != 0;
     var stream = flag ? new BitMaskStream(input, 4) : new BitMaskStream(input, 3);
     if (stream.Read())
     {
         type.intraFreqNeighCellList = new List<IntraFreqNeighCellInfo>();
         num2 = 4;
         var num3 = input.ReadBits(num2) + 1;
         for (var i = 0; i < num3; i++)
         {
             var item = IntraFreqNeighCellInfo.PerDecoder.Instance.Decode(input);
             type.intraFreqNeighCellList.Add(item);
         }
     }
     if (stream.Read())
     {
         type.intraFreqBlackCellList = new List<PhysCellIdRange>();
         num2 = 4;
         var num5 = input.ReadBits(num2) + 1;
         for (var j = 0; j < num5; j++)
         {
             var range = PhysCellIdRange.PerDecoder.Instance.Decode(input);
             type.intraFreqBlackCellList.Add(range);
         }
     }
     if (stream.Read())
     {
         type.csg_PhysCellIdRange = PhysCellIdRange.PerDecoder.Instance.Decode(input);
     }
     if (flag && stream.Read())
     {
         var nBits = input.ReadBits(8);
         type.lateNonCriticalExtension = input.readOctetString(nBits);
     }
     return type;
 }