Exemple #1
0
            public UE_ContextInformation Decode(BitArrayInputStream input)
            {
                UE_ContextInformation information = new UE_ContextInformation();

                information.InitDefaults();
                BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 4) : new BitMaskStream(input, 4);
                int           num4   = input.ReadBits(2) + 1;

                input.skipUnreadedBits();
                information.mME_UE_S1AP_ID            = input.ReadBits(num4 * 8);
                information.uESecurityCapabilities    = UESecurityCapabilities.PerDecoder.Instance.Decode(input);
                information.aS_SecurityInformation    = AS_SecurityInformation.PerDecoder.Instance.Decode(input);
                information.uEaggregateMaximumBitRate = UEAggregateMaximumBitRate.PerDecoder.Instance.Decode(input);
                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    information.subscriberProfileIDforRFP = input.ReadBits(8) + 1;
                }
                input.skipUnreadedBits();
                information.e_RABs_ToBeSetup_List = new List <ProtocolIE_Field>();
                num4 = 8;
                int num5 = input.ReadBits(num4) + 1;

                for (int i = 0; i < num5; i++)
                {
                    ProtocolIE_Field item = ProtocolIE_Field.PerDecoder.Instance.Decode(input);
                    information.e_RABs_ToBeSetup_List.Add(item);
                }
                input.skipUnreadedBits();
                int nBits = 0;

                while (true)
                {
                    switch (input.ReadBit())
                    {
                    case 0:
                        nBits += input.ReadBits(7);
                        goto Label_01B1;

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

                        case 1:
                            input.ReadBits(2);
                            nBits += input.ReadBits(4) * 0x400;
                            break;
                        }
                        break;
                    }
                }
Label_01B1:
                information.rRC_Context = input.readOctetString(nBits);
                if (stream.Read())
                {
                    information.handoverRestrictionList = HandoverRestrictionList.PerDecoder.Instance.Decode(input);
                }
                if (stream.Read())
                {
                    information.locationReportingInformation
                        = LocationReportingInformation.PerDecoder.Instance.Decode(input);
                }
                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    information.iE_Extensions = new List <ProtocolExtensionField>();
                    num4 = 0x10;
                    int num7 = input.ReadBits(num4) + 1;
                    for (int j = 0; j < num7; j++)
                    {
                        ProtocolExtensionField field2 = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
                        information.iE_Extensions.Add(field2);
                    }
                }
                return(information);
            }
Exemple #2
0
            public UE_ContextInformation Decode(BitArrayInputStream input)
            {
                UE_ContextInformation information = new UE_ContextInformation();
                information.InitDefaults();
                BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 4) : new BitMaskStream(input, 4);
                int num4 = input.ReadBits(2) + 1;
                input.skipUnreadedBits();
                information.mME_UE_S1AP_ID = input.ReadBits(num4 * 8);
                information.uESecurityCapabilities = UESecurityCapabilities.PerDecoder.Instance.Decode(input);
                information.aS_SecurityInformation = AS_SecurityInformation.PerDecoder.Instance.Decode(input);
                information.uEaggregateMaximumBitRate = UEAggregateMaximumBitRate.PerDecoder.Instance.Decode(input);
                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    information.subscriberProfileIDforRFP = input.ReadBits(8) + 1;
                }
                input.skipUnreadedBits();
                information.e_RABs_ToBeSetup_List = new List<ProtocolIE_Field>();
                num4 = 8;
                int num5 = input.ReadBits(num4) + 1;
                for (int i = 0; i < num5; i++)
                {
                    ProtocolIE_Field item = ProtocolIE_Field.PerDecoder.Instance.Decode(input);
                    information.e_RABs_ToBeSetup_List.Add(item);
                }
                input.skipUnreadedBits();
                int nBits = 0;
                while (true)
                {
                    switch (input.ReadBit())
                    {
                        case 0:
                            nBits += input.ReadBits(7);
                            goto Label_01B1;

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

                                case 1:
                                    input.ReadBits(2);
                                    nBits += input.ReadBits(4) * 0x400;
                                    break;
                            }
                            break;
                    }
                }
            Label_01B1:
                information.rRC_Context = input.readOctetString(nBits);
                if (stream.Read())
                {
                    information.handoverRestrictionList = HandoverRestrictionList.PerDecoder.Instance.Decode(input);
                }
                if (stream.Read())
                {
                    information.locationReportingInformation 
                        = LocationReportingInformation.PerDecoder.Instance.Decode(input);
                }
                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    information.iE_Extensions = new List<ProtocolExtensionField>();
                    num4 = 0x10;
                    int num7 = input.ReadBits(num4) + 1;
                    for (int j = 0; j < num7; j++)
                    {
                        ProtocolExtensionField field2 = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
                        information.iE_Extensions.Add(field2);
                    }
                }
                return information;
            }