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

                item.InitDefaults();
                input.ReadBit();
                switch (input.ReadBits(2))
                {
                case 0:
                    item.e_UTRAN_Cell = LastVisitedEUTRANCellInformation.PerDecoder.Instance.Decode(input);
                    return(item);

                case 1:
                    input.skipUnreadedBits();
                    nBits = 0;
                    break;

                case 2:
                    item.gERAN_Cell = LastVisitedGERANCellInformation.PerDecoder.Instance.Decode(input);
                    return(item);

                default:
                    throw new Exception(GetType().Name + ":NoChoice had been choose");
                }
                while (true)
                {
                    switch (input.ReadBit())
                    {
                    case 0:
                        nBits += input.ReadBits(7);
                        goto Label_00F2;

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

                        case 1:
                            input.ReadBits(2);
                            nBits += input.ReadBits(4) * 0x400;
                            break;
                        }
                        break;
                    }
                }
Label_00F2:
                item.uTRAN_Cell = input.readOctetString(nBits);
                return(item);
            }
Пример #2
0
            public LastVisitedCell_Item Decode(BitArrayInputStream input)
            {
                int nBits;
                LastVisitedCell_Item item = new LastVisitedCell_Item();
                item.InitDefaults();
                input.readBit();
                switch (input.readBits(2))
                {
                    case 0:
                        item.e_UTRAN_Cell = LastVisitedEUTRANCellInformation.PerDecoder.Instance.Decode(input);
                        return item;

                    case 1:
                        input.skipUnreadedBits();
                        nBits = 0;
                        break;

                    case 2:
                        item.gERAN_Cell = LastVisitedGERANCellInformation.PerDecoder.Instance.Decode(input);
                        return item;

                    default:
                        throw new Exception(GetType().Name + ":NoChoice had been choose");
                }
                while (true)
                {
                    switch (input.readBit())
                    {
                        case 0:
                            nBits += input.readBits(7);
                            goto Label_00F2;

                        case 1:
                            switch (input.readBit())
                            {
                                case 0:
                                    nBits += input.readBits(14);
                                    goto Label_00F2;

                                case 1:
                                    input.readBits(2);
                                    nBits += input.readBits(4) * 0x400;
                                    break;
                            }
                            break;
                    }
                }
                Label_00F2:
                item.uTRAN_Cell = input.readOctetString(nBits);
                return item;
            }
Пример #3
0
            public SourceeNB_ToTargeteNB_TransparentContainer Decode(BitArrayInputStream input)
            {
                int num4;
                SourceeNB_ToTargeteNB_TransparentContainer container = new SourceeNB_ToTargeteNB_TransparentContainer();

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

                input.skipUnreadedBits();
                int nBits = 0;

                while (true)
                {
                    switch (input.readBit())
                    {
                    case 0:
                        nBits += input.readBits(7);
                        goto Label_00C9;

                    case 1:
                        switch (input.readBit())
                        {
                        case 0:
                            nBits += input.readBits(14);
                            goto Label_00C9;

                        case 1:
                            input.readBits(2);
                            nBits += input.readBits(4) * 0x400;
                            break;
                        }
                        break;
                    }
                }
Label_00C9:
                container.rRC_Container = input.readOctetString(nBits);
                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    container.e_RABInformationList = new List <ProtocolIE_Field>();
                    num4 = 8;
                    int num5 = input.readBits(num4) + 1;
                    for (int j = 0; j < num5; j++)
                    {
                        ProtocolIE_Field field = ProtocolIE_Field.PerDecoder.Instance.Decode(input);
                        container.e_RABInformationList.Add(field);
                    }
                }
                container.targetCell_ID = EUTRAN_CGI.PerDecoder.Instance.Decode(input);
                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    container.subscriberProfileIDforRFP = input.readBits(8) + 1;
                }
                container.uE_HistoryInformation = new List <LastVisitedCell_Item>();
                num4 = 4;
                int num7 = input.readBits(num4) + 1;

                for (int i = 0; i < num7; i++)
                {
                    LastVisitedCell_Item item = LastVisitedCell_Item.PerDecoder.Instance.Decode(input);
                    container.uE_HistoryInformation.Add(item);
                }
                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    container.iE_Extensions = new List <ProtocolExtensionField>();
                    num4 = 0x10;
                    int num9 = input.readBits(num4) + 1;
                    for (int k = 0; k < num9; k++)
                    {
                        ProtocolExtensionField field2 = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
                        container.iE_Extensions.Add(field2);
                    }
                }
                return(container);
            }