public bool initDevice(int device, int port, int baud, int protocol) { m_commLog.AddItem(string.Format("Attempting initialization on port {0}", port.ToString())); bool flag = false; setDevice(device); if (m_obdDevice.initialize(port, baud, protocol) && initOBD()) { flag = true; OnConnect(); } return(flag); }
public void setPort(int iPort) { m_strPort = "COM" + iPort.ToString() + ":"; m_commLog.AddItem(string.Format("Port set to {0}", m_strPort)); }
public bool initDevice(HardwareType device, int port, int baud, ProtocolType protocol) { m_commLog.AddItem(string.Format("Attempting initialization on port {0}", port.ToString())); setDevice(device); if (m_obdDevice.Initialize(port, baud, protocol) && InitOBD()) { OnConnect(); return(true); } return(false); }