示例#1
0
 public OBDDeviceELM322(OBDCommLog log)
     : base(log)
 {
     try
     {
         m_Parser = new OBDParser_J1850_VPW();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#2
0
        public void setProtocol(ProtocolType iProtocol)
        {
            m_iProtocol = iProtocol;
            base.m_commLog.AddItem(string.Format("Protocol switched to: {0}", Preferences.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;
            }
        }