Example #1
0
 public PRACH_Configuration Decode(BitArrayInputStream input)
 {
     PRACH_Configuration configuration = new PRACH_Configuration();
     configuration.InitDefaults();
     BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 2) : new BitMaskStream(input, 2);
     input.skipUnreadedBits();
     configuration.rootSequenceIndex = input.ReadBits(0x10);
     configuration.zeroCorrelationIndex = input.ReadBits(4);
     configuration.highSpeedFlag = input.ReadBit() == 1;
     configuration.prach_FreqOffset = input.ReadBits(7);
     if (stream.Read())
     {
         configuration.prach_ConfigIndex = input.ReadBits(6);
     }
     if (stream.Read())
     {
         input.skipUnreadedBits();
         configuration.iE_Extensions = new List<ProtocolExtensionField>();
         const int nBits = 0x10;
         int num5 = input.ReadBits(nBits) + 1;
         for (int i = 0; i < num5; i++)
         {
             ProtocolExtensionField item = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
             configuration.iE_Extensions.Add(item);
         }
     }
     return configuration;
 }
Example #2
0
            public PRACH_Configuration Decode(BitArrayInputStream input)
            {
                PRACH_Configuration configuration = new PRACH_Configuration();

                configuration.InitDefaults();
                BitMaskStream stream = (input.readBit() != 0) ? new BitMaskStream(input, 2) : new BitMaskStream(input, 2);

                input.skipUnreadedBits();
                configuration.rootSequenceIndex    = input.readBits(0x10);
                configuration.zeroCorrelationIndex = input.readBits(4);
                configuration.highSpeedFlag        = input.readBit() == 1;
                configuration.prach_FreqOffset     = input.readBits(7);
                if (stream.Read())
                {
                    configuration.prach_ConfigIndex = input.readBits(6);
                }
                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    configuration.iE_Extensions = new List <ProtocolExtensionField>();
                    const int nBits = 0x10;
                    int       num5  = input.readBits(nBits) + 1;
                    for (int i = 0; i < num5; i++)
                    {
                        ProtocolExtensionField item = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
                        configuration.iE_Extensions.Add(item);
                    }
                }
                return(configuration);
            }