Exemple #1
0
 public OBDDeviceELM322(Logger log) : base(log)
 {
     try {
         m_Parser     = new OBDParser_J1850_VPW();
         m_bConnected = false;
     } catch (Exception ex) {
         throw ex;
     }
 }
Exemple #2
0
        public void SetProtocol(ProtocolType iProtocol)
        {
            m_iProtocol = iProtocol;
            m_log.TraceInfo(string.Format("Protocol switched to: {0}", Settings.ProtocolNames[(int)iProtocol]));
            switch (iProtocol)
            {
            case ProtocolType.J1850_PWM:
                m_Parser = new OBDParser_J1850_PWM();
                break;

            case ProtocolType.J1850_VPW:
                m_Parser = new OBDParser_J1850_VPW();
                break;

            case ProtocolType.ISO9141_2:
                m_Parser = new OBDParser_ISO9141_2();
                break;

            case ProtocolType.ISO_14230_4_KWP_5BAUDINIT:
                m_Parser = new OBDParser_ISO14230_4_KWP();
                break;

            case ProtocolType.ISO_14230_4_KWP_FASTINIT:
                m_Parser = new OBDParser_ISO14230_4_KWP();
                break;

            case ProtocolType.ISO_15765_4_CAN_11BIT_500KBAUD:
                m_Parser = new OBDParser_ISO15765_4_CAN11();
                break;

            case ProtocolType.ISO_15765_4_CAN_29BIT_500KBAUD:
                m_Parser = new OBDParser_ISO15765_4_CAN29();
                break;

            case ProtocolType.ISO_15765_4_CAN_11BIT_250KBAUD:
                m_Parser = new OBDParser_ISO15765_4_CAN11();
                break;

            case ProtocolType.ISO_15765_4_CAN_29BIT_250KBAUD:
                m_Parser = new OBDParser_ISO15765_4_CAN29();
                break;
            }
        }