Exemple #1
0
            public LocationReportingInformation Decode(BitArrayInputStream input)
            {
                LocationReportingInformation information = new LocationReportingInformation();

                information.InitDefaults();
                BitMaskStream stream = (input.readBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1);
                int           nBits  = 1;

                information.eventType = (EventType)input.readBits(nBits);
                nBits = 1;
                information.reportArea = (ReportArea)input.readBits(nBits);
                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    information.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);
                        information.iE_Extensions.Add(item);
                    }
                }
                return(information);
            }
 public LocationReportingInformation Decode(BitArrayInputStream input)
 {
     LocationReportingInformation information = new LocationReportingInformation();
     information.InitDefaults();
     BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1);
     int nBits = 1;
     information.eventType = (EventType)input.ReadBits(nBits);
     nBits = 1;
     information.reportArea = (ReportArea)input.ReadBits(nBits);
     if (stream.Read())
     {
         input.skipUnreadedBits();
         information.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);
             information.iE_Extensions.Add(item);
         }
     }
     return information;
 }