Example #1
0
            public UnsuccessfulOutcome Decode(BitArrayInputStream input)
            {
                UnsuccessfulOutcome outcome = new UnsuccessfulOutcome();

                outcome.InitDefaults();
                input.skipUnreadedBits();
                outcome.procedureCode = input.ReadBits(8);
                int num4 = 2;

                outcome.criticality = (Criticality)input.ReadBits(num4);
                input.skipUnreadedBits();
                int nBits = 0;

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

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

                        case 1:
                            input.ReadBits(2);
                            nBits += input.ReadBits(4) * 0x400;
                            break;
                        }
                        break;
                    }
                }
Label_00CF:
                long num3 = input.Position;

                try
                {
                    outcome.value = S1AP_ELEMENTARY_PROCEDURE.Switcher(outcome.procedureCode, "UnsuccessfulOutcome", input);
                    input.skipUnreadedBits();
                }
                catch (Exception)
                {
                    input.skipUnreadedBits();
                    input.Position = num3;
                    outcome.value  = input.readOctetString(nBits);
                }
                if (input.Position != (num3 + nBits))
                {
                    input.Position = num3 + nBits;
                }
                return(outcome);
            }
Example #2
0
            public UnsuccessfulOutcome Decode(BitArrayInputStream input)
            {
                UnsuccessfulOutcome outcome = new UnsuccessfulOutcome();
                outcome.InitDefaults();
                input.skipUnreadedBits();
                outcome.procedureCode = input.ReadBits(8);
                int num4 = 2;
                outcome.criticality = (Criticality)input.ReadBits(num4);
                input.skipUnreadedBits();
                int nBits = 0;
                while (true)
                {
                    switch (input.ReadBit())
                    {
                        case 0:
                            nBits += input.ReadBits(7);
                            goto Label_00CF;

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

                                case 1:
                                    input.ReadBits(2);
                                    nBits += input.ReadBits(4) * 0x400;
                                    break;
                            }
                            break;
                    }
                }
            Label_00CF:
                long num3 = input.Position;
                try
                {
                    outcome.value = S1AP_ELEMENTARY_PROCEDURE.Switcher(outcome.procedureCode, "UnsuccessfulOutcome", input);
                    input.skipUnreadedBits();
                }
                catch (Exception)
                {
                    input.skipUnreadedBits();
                    input.Position = num3;
                    outcome.value = input.readOctetString(nBits);
                }
                if (input.Position != (num3 + nBits))
                {
                    input.Position = num3 + nBits;
                }
                return outcome;
            }