Exemple #1
0
        public void ReadCodes()
        {
            arrayListDTC.Clear();
            arrayListPending.Clear();
            arrayListPermanent.Clear();
            OBDParameterValue value6 = m_obdInterface.getValue("SAE.MIL", true);

            if (!value6.ErrorDetected)
            {
                SetMilStatus(value6.BoolValue);
            }
            OBDParameterValue value5 = m_obdInterface.getValue("SAE.DTC_COUNT", true);

            if (!value5.ErrorDetected)
            {
                SetDTCTotal((int)value5.DoubleValue);
            }
            OBDParameterValue value4 = m_obdInterface.getValue("SAE.STORED_DTCS", true);

            if (!value4.ErrorDetected)
            {
                StringEnumerator enumerator3 = value4.StringCollectionValue.GetEnumerator();
                if (enumerator3.MoveNext())
                {
                    do
                    {
                        string current = enumerator3.Current;
                        DTC    dtc3    = m_obdInterface.getDTC(current);
                        arrayListDTC.Add(dtc3);
                    }while (enumerator3.MoveNext());
                }
            }
            OBDParameterValue value3 = m_obdInterface.getValue("SAE.PENDING_DTCS", true);

            if (!value3.ErrorDetected)
            {
                StringEnumerator enumerator2 = value3.StringCollectionValue.GetEnumerator();
                if (enumerator2.MoveNext())
                {
                    do
                    {
                        string strDTC = enumerator2.Current;
                        DTC    dtc2   = m_obdInterface.getDTC(strDTC);
                        arrayListPending.Add(dtc2);
                    }while (enumerator2.MoveNext());
                }
            }
            OBDParameterValue value2 = m_obdInterface.getValue("SAE.PERMANENT_DTCS", true);

            if (!value2.ErrorDetected)
            {
                StringEnumerator enumerator = value2.StringCollectionValue.GetEnumerator();
                if (enumerator.MoveNext())
                {
                    do
                    {
                        string str = enumerator.Current;
                        DTC    dtc = m_obdInterface.getDTC(str);
                        arrayListPermanent.Add(dtc);
                    }while (enumerator.MoveNext());
                }
            }
        }