예제 #1
0
            public GUMMEI Decode(BitArrayInputStream input)
            {
                GUMMEI gummei = new GUMMEI();

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

                input.skipUnreadedBits();
                gummei.pLMN_Identity = input.readOctetString(3);
                input.skipUnreadedBits();
                gummei.mME_Group_ID = input.readOctetString(2);
                input.skipUnreadedBits();
                gummei.mME_Code = input.readOctetString(1);
                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    gummei.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);
                        gummei.iE_Extensions.Add(item);
                    }
                }
                return(gummei);
            }
예제 #2
0
파일: MME_Code.cs 프로젝트: ouyh18/LteTools
 public GUMMEI Decode(BitArrayInputStream input)
 {
     GUMMEI gummei = new GUMMEI();
     gummei.InitDefaults();
     BitMaskStream stream = (input.readBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1);
     input.skipUnreadedBits();
     gummei.pLMN_Identity = input.readOctetString(3);
     input.skipUnreadedBits();
     gummei.mME_Group_ID = input.readOctetString(2);
     input.skipUnreadedBits();
     gummei.mME_Code = input.readOctetString(1);
     if (stream.Read())
     {
         input.skipUnreadedBits();
         gummei.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);
             gummei.iE_Extensions.Add(item);
         }
     }
     return gummei;
 }