public void ZSModule_InitialComm() { RS232Comm = new SerialPort(); Thread RcvMsgThread = new Thread(new ThreadStart(this.RS232Comm_OnComm)); RS232Comm.PortName = "COM10"; RS232Comm.BaudRate = 115200; RS232Comm.DataBits = 8; //RS232Comm.StopBits = 0; if (RS232.GetSignleton().CreateRS232Interface(ref RS232Comm) != 0) { return; } RcvMsgThread.Start(); }
public void ZSModule_CloselComm() { RS232.GetSignleton().DestroyRS232Interface(ref RS232Comm); }