예제 #1
0
            public CriticalityDiagnostics Decode(BitArrayInputStream input)
            {
                int num4;
                CriticalityDiagnostics diagnostics = new CriticalityDiagnostics();

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

                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    diagnostics.procedureCode = input.ReadBits(8);
                }
                if (stream.Read())
                {
                    num4 = 2;
                    diagnostics.triggeringMessage = (TriggeringMessage)input.ReadBits(num4);
                }
                if (stream.Read())
                {
                    num4 = 2;
                    diagnostics.procedureCriticality = (Criticality)input.ReadBits(num4);
                }
                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    diagnostics.iEsCriticalityDiagnostics = new List <CriticalityDiagnostics_IE_Item>();
                    num4 = 8;
                    int num5 = input.ReadBits(num4) + 1;
                    for (int i = 0; i < num5; i++)
                    {
                        CriticalityDiagnostics_IE_Item item = CriticalityDiagnostics_IE_Item.PerDecoder.Instance.Decode(input);
                        diagnostics.iEsCriticalityDiagnostics.Add(item);
                    }
                }
                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    diagnostics.iE_Extensions = new List <ProtocolExtensionField>();
                    num4 = 0x10;
                    int num7 = input.ReadBits(num4) + 1;
                    for (int j = 0; j < num7; j++)
                    {
                        ProtocolExtensionField field = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
                        diagnostics.iE_Extensions.Add(field);
                    }
                }
                return(diagnostics);
            }
예제 #2
0
 public CriticalityDiagnostics Decode(BitArrayInputStream input)
 {
     int num4;
     CriticalityDiagnostics diagnostics = new CriticalityDiagnostics();
     diagnostics.InitDefaults();
     BitMaskStream stream = (input.readBit() != 0) ? new BitMaskStream(input, 5) : new BitMaskStream(input, 5);
     if (stream.Read())
     {
         input.skipUnreadedBits();
         diagnostics.procedureCode = input.readBits(8);
     }
     if (stream.Read())
     {
         num4 = 2;
         diagnostics.triggeringMessage = (TriggeringMessage)input.readBits(num4);
     }
     if (stream.Read())
     {
         num4 = 2;
         diagnostics.procedureCriticality = (Criticality)input.readBits(num4);
     }
     if (stream.Read())
     {
         input.skipUnreadedBits();
         diagnostics.iEsCriticalityDiagnostics = new List<CriticalityDiagnostics_IE_Item>();
         num4 = 8;
         int num5 = input.readBits(num4) + 1;
         for (int i = 0; i < num5; i++)
         {
             CriticalityDiagnostics_IE_Item item = CriticalityDiagnostics_IE_Item.PerDecoder.Instance.Decode(input);
             diagnostics.iEsCriticalityDiagnostics.Add(item);
         }
     }
     if (stream.Read())
     {
         input.skipUnreadedBits();
         diagnostics.iE_Extensions = new List<ProtocolExtensionField>();
         num4 = 0x10;
         int num7 = input.readBits(num4) + 1;
         for (int j = 0; j < num7; j++)
         {
             ProtocolExtensionField field = ProtocolExtensionField.PerDecoder.Instance.Decode(input);
             diagnostics.iE_Extensions.Add(field);
         }
     }
     return diagnostics;
 }