Пример #1
0
            public SONInformationReply Decode(BitArrayInputStream input)
            {
                SONInformationReply reply = new SONInformationReply();

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

                if (stream.Read())
                {
                    reply.x2TNLConfigurationInfo = X2TNLConfigurationInfo.PerDecoder.Instance.Decode(input);
                }
                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    reply.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);
                        reply.iE_Extensions.Add(item);
                    }
                }
                return(reply);
            }
Пример #2
0
 public SONInformationReply Decode(BitArrayInputStream input)
 {
     SONInformationReply reply = new SONInformationReply();
     reply.InitDefaults();
     BitMaskStream stream = (input.readBit() != 0) ? new BitMaskStream(input, 2) : new BitMaskStream(input, 2);
     if (stream.Read())
     {
         reply.x2TNLConfigurationInfo = X2TNLConfigurationInfo.PerDecoder.Instance.Decode(input);
     }
     if (stream.Read())
     {
         input.skipUnreadedBits();
         reply.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);
             reply.iE_Extensions.Add(item);
         }
     }
     return reply;
 }