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

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

                input.readBit();
                item.e_RAB_ID = input.readBits(4);
                input.readBit();
                int num = input.readBits(8);

                input.skipUnreadedBits();
                item.transportLayerAddress = input.readBitString(num + 1);
                input.skipUnreadedBits();
                item.gTP_TEID = input.readOctetString(4);
                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    item.iE_Extensions = new List <ProtocolExtensionField>();
                    int nBits = 0x10;
                    int num5  = input.readBits(nBits) + 1;
                    for (int i = 0; i < num5; i++)
                    {
                        ProtocolExtensionField field = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
                        item.iE_Extensions.Add(field);
                    }
                }
                return(item);
            }
Пример #2
0
 public E_RABToBeSwitchedDLItem Decode(BitArrayInputStream input)
 {
     E_RABToBeSwitchedDLItem item = new E_RABToBeSwitchedDLItem();
     item.InitDefaults();
     BitMaskStream stream = (input.readBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1);
     input.readBit();
     item.e_RAB_ID = input.readBits(4);
     input.readBit();
     int num = input.readBits(8);
     input.skipUnreadedBits();
     item.transportLayerAddress = input.readBitString(num + 1);
     input.skipUnreadedBits();
     item.gTP_TEID = input.readOctetString(4);
     if (stream.Read())
     {
         input.skipUnreadedBits();
         item.iE_Extensions = new List<ProtocolExtensionField>();
         int nBits = 0x10;
         int num5 = input.readBits(nBits) + 1;
         for (int i = 0; i < num5; i++)
         {
             ProtocolExtensionField field = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
             item.iE_Extensions.Add(field);
         }
     }
     return item;
 }