public SystemInformationBlockType2 Decode(BitArrayInputStream input)
            {
                int           num2;
                BitMaskStream stream2;
                var           type = new SystemInformationBlockType2();

                type.InitDefaults();
                var flag = false;

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

                if (stream.Read())
                {
                    type.ac_BarringInfo = ac_BarringInfo_Type.PerDecoder.Instance.Decode(input);
                }
                type.radioResourceConfigCommon = RadioResourceConfigCommonSIB.PerDecoder.Instance.Decode(input);
                type.ue_TimersAndConstants     = UE_TimersAndConstants.PerDecoder.Instance.Decode(input);
                type.freqInfo = freqInfo_Type.PerDecoder.Instance.Decode(input);
                if (stream.Read())
                {
                    type.mbsfn_SubframeConfigList = new List <MBSFN_SubframeConfig>();
                    num2 = 3;
                    var num3 = input.ReadBits(num2) + 1;
                    for (var i = 0; i < num3; i++)
                    {
                        var item = MBSFN_SubframeConfig.PerDecoder.Instance.Decode(input);
                        type.mbsfn_SubframeConfigList.Add(item);
                    }
                }
                num2 = 3;
                type.timeAlignmentTimerCommon = (TimeAlignmentTimer)input.ReadBits(num2);
                if (flag && stream.Read())
                {
                    var nBits = input.ReadBits(8);
                    type.lateNonCriticalExtension = input.readOctetString(nBits);
                }
                if (flag)
                {
                    stream2 = new BitMaskStream(input, 2);
                    if (stream2.Read())
                    {
                        type.ssac_BarringForMMTEL_Voice_r9 = AC_BarringConfig.PerDecoder.Instance.Decode(input);
                    }
                    if (stream2.Read())
                    {
                        type.ssac_BarringForMMTEL_Video_r9 = AC_BarringConfig.PerDecoder.Instance.Decode(input);
                    }
                }
                if (flag)
                {
                    stream2 = new BitMaskStream(input, 1);
                    if (stream2.Read())
                    {
                        type.ac_BarringForCSFB_r10 = AC_BarringConfig.PerDecoder.Instance.Decode(input);
                    }
                }
                return(type);
            }
Esempio n. 2
0
 public SystemInformationBlockType2 Decode(BitArrayInputStream input)
 {
     int num2;
     BitMaskStream stream2;
     SystemInformationBlockType2 type = new SystemInformationBlockType2();
     type.InitDefaults();
     bool flag = false;
     flag = input.readBit() != 0;
     BitMaskStream stream = flag ? new BitMaskStream(input, 3) : new BitMaskStream(input, 2);
     if (stream.Read())
     {
         type.ac_BarringInfo = ac_BarringInfo_Type.PerDecoder.Instance.Decode(input);
     }
     type.radioResourceConfigCommon = RadioResourceConfigCommonSIB.PerDecoder.Instance.Decode(input);
     type.ue_TimersAndConstants = UE_TimersAndConstants.PerDecoder.Instance.Decode(input);
     type.freqInfo = freqInfo_Type.PerDecoder.Instance.Decode(input);
     if (stream.Read())
     {
         type.mbsfn_SubframeConfigList = new List<MBSFN_SubframeConfig>();
         num2 = 3;
         int num3 = input.readBits(num2) + 1;
         for (int i = 0; i < num3; i++)
         {
             MBSFN_SubframeConfig item = MBSFN_SubframeConfig.PerDecoder.Instance.Decode(input);
             type.mbsfn_SubframeConfigList.Add(item);
         }
     }
     num2 = 3;
     type.timeAlignmentTimerCommon = (TimeAlignmentTimer)input.readBits(num2);
     if (flag && stream.Read())
     {
         int nBits = input.readBits(8);
         type.lateNonCriticalExtension = input.readOctetString(nBits);
     }
     if (flag)
     {
         stream2 = new BitMaskStream(input, 2);
         if (stream2.Read())
         {
             type.ssac_BarringForMMTEL_Voice_r9 = AC_BarringConfig.PerDecoder.Instance.Decode(input);
         }
         if (stream2.Read())
         {
             type.ssac_BarringForMMTEL_Video_r9 = AC_BarringConfig.PerDecoder.Instance.Decode(input);
         }
     }
     if (flag)
     {
         stream2 = new BitMaskStream(input, 1);
         if (stream2.Read())
         {
             type.ac_BarringForCSFB_r10 = AC_BarringConfig.PerDecoder.Instance.Decode(input);
         }
     }
     return type;
 }