Пример #1
0
            public RelativeNarrowbandTxPower Decode(BitArrayInputStream input)
            {
                RelativeNarrowbandTxPower power = new RelativeNarrowbandTxPower();

                power.InitDefaults();
                BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1);

                input.ReadBit();
                int num = input.ReadBits(7);

                input.skipUnreadedBits();
                power.rNTP_PerPRB = input.ReadBitString(num + 6);
                int nBits = (input.ReadBit() == 0) ? 4 : 4;

                power.rNTP_Threshold = (RNTP_Threshold)input.ReadBits(nBits);
                nBits = (input.ReadBit() == 0) ? 2 : 2;
                power.numberOfCellSpecificAntennaPorts = (numberOfCellSpecificAntennaPorts_Enum)input.ReadBits(nBits);
                power.p_B = input.ReadBits(2);
                power.pDCCH_InterferenceImpact = input.ReadBits(3);
                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    power.iE_Extensions = new List <ProtocolExtensionField>();
                    nBits = 0x10;
                    int num5 = input.ReadBits(nBits) + 1;
                    for (int i = 0; i < num5; i++)
                    {
                        ProtocolExtensionField item = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
                        power.iE_Extensions.Add(item);
                    }
                }
                return(power);
            }
Пример #2
0
 public RelativeNarrowbandTxPower Decode(BitArrayInputStream input)
 {
     RelativeNarrowbandTxPower power = new RelativeNarrowbandTxPower();
     power.InitDefaults();
     BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1);
     input.ReadBit();
     int num = input.ReadBits(7);
     input.skipUnreadedBits();
     power.rNTP_PerPRB = input.ReadBitString(num + 6);
     int nBits = (input.ReadBit() == 0) ? 4 : 4;
     power.rNTP_Threshold = (RNTP_Threshold)input.ReadBits(nBits);
     nBits = (input.ReadBit() == 0) ? 2 : 2;
     power.numberOfCellSpecificAntennaPorts = (numberOfCellSpecificAntennaPorts_Enum)input.ReadBits(nBits);
     power.p_B = input.ReadBits(2);
     power.pDCCH_InterferenceImpact = input.ReadBits(3);
     if (stream.Read())
     {
         input.skipUnreadedBits();
         power.iE_Extensions = new List<ProtocolExtensionField>();
         nBits = 0x10;
         int num5 = input.ReadBits(nBits) + 1;
         for (int i = 0; i < num5; i++)
         {
             ProtocolExtensionField item = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
             power.iE_Extensions.Add(item);
         }
     }
     return power;
 }