public void On_Connection_Connected(object Msg) { this._IsConnected = true; this.Status = "Connected"; ChangeNodeConnectionStatus("Connected"); _ReportTarget.On_Controller_State_Changed(DeviceName, "Connected"); _ReportTarget.On_Message_Log("CMD", DeviceName + " " + "Connected"); }
public void Start(object state) { _ReportTarget.On_Controller_State_Changed(DeviceName, "Connecting"); switch (this.ConnectionType.ToUpper()) { case "SOCKET": conn = ModbusIpMaster.CreateIp(new TcpClient(this.IPAdress, this.Port)); _ReportTarget.On_Controller_State_Changed(DeviceName, "Connected"); break; case "COMPORT": SerialPort serialPort = new SerialPort(); //Create a new SerialPort object. serialPort.PortName = this.PortName; serialPort.BaudRate = this.BaudRate; serialPort.DataBits = 8; serialPort.Parity = Parity.None; serialPort.StopBits = StopBits.One; serialPort.Open(); conn = ModbusSerialMaster.CreateRtu(serialPort); _ReportTarget.On_Controller_State_Changed(DeviceName, "Connected"); break; } }
public void On_Connection_Connected(string Msg) { _ReportTarget.On_Controller_State_Changed(_Config.DeviceName, "Connected"); }
public void On_Connection_Connected(object Msg) { this._IsConnected = true; this.Status = "Connected"; _ReportTarget.On_Controller_State_Changed(_Config.DeviceName, "Connected"); }