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

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

                input.ReadBit();
                res.e_RAB_ID = input.ReadBits(4);
                input.ReadBit();
                int num = input.ReadBits(8);

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