Exemple #1
0
            public COUNTvalue Decode(BitArrayInputStream input)
            {
                COUNTvalue tvalue = new COUNTvalue();

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

                input.skipUnreadedBits();
                tvalue.pDCP_SN = input.ReadBits(0x10);
                int nBits = input.ReadBits(2) + 1;

                input.skipUnreadedBits();
                tvalue.hFN = input.ReadBits(nBits * 8);
                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    tvalue.iE_Extensions = new List <ProtocolExtensionField>();
                    nBits = 0x10;
                    int num5 = input.ReadBits(nBits) + 1;
                    for (int i = 0; i < num5; i++)
                    {
                        ProtocolExtensionField item = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
                        tvalue.iE_Extensions.Add(item);
                    }
                }
                return(tvalue);
            }
Exemple #2
0
 public COUNTvalue Decode(BitArrayInputStream input)
 {
     COUNTvalue tvalue = new COUNTvalue();
     tvalue.InitDefaults();
     BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1);
     input.skipUnreadedBits();
     tvalue.pDCP_SN = input.ReadBits(0x10);
     int nBits = input.ReadBits(2) + 1;
     input.skipUnreadedBits();
     tvalue.hFN = input.ReadBits(nBits * 8);
     if (stream.Read())
     {
         input.skipUnreadedBits();
         tvalue.iE_Extensions = new List<ProtocolExtensionField>();
         nBits = 0x10;
         int num5 = input.ReadBits(nBits) + 1;
         for (int i = 0; i < num5; i++)
         {
             ProtocolExtensionField item = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
             tvalue.iE_Extensions.Add(item);
         }
     }
     return tvalue;
 }