コード例 #1
0
ファイル: E_RABSetup.cs プロジェクト: ouyh18/LtePlatform
            public E_RABToBeSetupItemCtxtSUReq Decode(BitArrayInputStream input)
            {
                E_RABToBeSetupItemCtxtSUReq req = new E_RABToBeSetupItemCtxtSUReq();
                req.InitDefaults();
                BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 2) : new BitMaskStream(input, 2);
                input.ReadBit();
                req.e_RAB_ID = input.ReadBits(4);
                req.e_RABlevelQoSParameters = E_RABLevelQoSParameters.PerDecoder.Instance.Decode(input);
                input.ReadBit();
                int nBits = input.ReadBits(8);
                input.skipUnreadedBits();
                req.transportLayerAddress = input.ReadBitString(nBits + 1);
                input.skipUnreadedBits();
                req.gTP_TEID = input.readOctetString(4);
                if (!stream.Read())
                {
                    goto Label_0154;
                }
                input.skipUnreadedBits();
                nBits = 0;
                while (true)
                {
                    switch (input.ReadBit())
                    {
                        case 0:
                            nBits += input.ReadBits(7);
                            goto Label_0144;

                        case 1:
                            switch (input.ReadBit())
                            {
                                case 0:
                                    nBits += input.ReadBits(14);
                                    goto Label_0144;

                                case 1:
                                    input.ReadBits(2);
                                    nBits += input.ReadBits(4) * 0x400;
                                    break;
                            }
                            break;
                    }
                }
            Label_0144:
                req.nAS_PDU = input.readOctetString(nBits);
            Label_0154:
                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    req.iE_Extensions = new List<ProtocolExtensionField>();
                    int num4 = 0x10;
                    int num5 = input.ReadBits(num4) + 1;
                    for (int i = 0; i < num5; i++)
                    {
                        ProtocolExtensionField item = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
                        req.iE_Extensions.Add(item);
                    }
                }
                return req;
            }