コード例 #1
0
            public CriticalityDiagnostics_IE_List_Element Decode(BitArrayInputStream input)
            {
                CriticalityDiagnostics_IE_List_Element element = new CriticalityDiagnostics_IE_List_Element();

                element.InitDefaults();
                BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1);
                int           nBits  = 2;

                element.iECriticality = (Criticality)input.ReadBits(nBits);
                nBits = input.ReadBits(1) + 1;
                input.skipUnreadedBits();
                element.iE_ID       = input.ReadBits(nBits * 8);
                nBits               = 1;
                element.typeOfError = (TypeOfError)input.ReadBits(nBits);
                if (stream.Read())
                {
                    input.skipUnreadedBits();
                    element.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);
                        element.iE_Extensions.Add(item);
                    }
                }
                return(element);
            }
コード例 #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_List_Element>();
                    num4 = 8;
                    int num5 = input.ReadBits(num4) + 1;
                    for (int i = 0; i < num5; i++)
                    {
                        CriticalityDiagnostics_IE_List_Element item = CriticalityDiagnostics_IE_List_Element.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);
            }
コード例 #3
0
 public CriticalityDiagnostics_IE_List_Element Decode(BitArrayInputStream input)
 {
     CriticalityDiagnostics_IE_List_Element element = new CriticalityDiagnostics_IE_List_Element();
     element.InitDefaults();
     BitMaskStream stream = (input.ReadBit() != 0) ? new BitMaskStream(input, 1) : new BitMaskStream(input, 1);
     int nBits = 2;
     element.iECriticality = (Criticality)input.ReadBits(nBits);
     nBits = input.ReadBits(1) + 1;
     input.skipUnreadedBits();
     element.iE_ID = input.ReadBits(nBits * 8);
     nBits = 1;
     element.typeOfError = (TypeOfError)input.ReadBits(nBits);
     if (stream.Read())
     {
         input.skipUnreadedBits();
         element.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);
             element.iE_Extensions.Add(item);
         }
     }
     return element;
 }