private void Send(EMachineCommand command, EMachineMassage machineMassage = EMachineMassage.Invalid, string Mcommand = "") { if (_client == null) { return; } string message = string.Empty; switch (command) { case EMachineCommand.Result: case EMachineCommand.Nak: //Modify.changhyun_an.2021.05.27.ack modify.Start... message = string.Format("{0},{1}\r", command, machineMassage); break; case EMachineCommand.Ack: message = string.Format("{0},{1}\r", command, Mcommand); //Modify.changhyun_an.2021.05.27.ack modify.end... break; } byte[] buff = Encoding.ASCII.GetBytes(message); var stream = _client.GetStream(); stream.Write(buff, 0, buff.Length); }
private void SendResult(EMachineCommand command, InspectResult result) { if (_client == null) { return; } string message = string.Empty; switch (command) { case EMachineCommand.Result: //ach message = string.Format("{0},{1},{2},{3}\r", command, result.Judgement, result.WaferID, result.FolderPath); break; } byte[] buff = Encoding.ASCII.GetBytes(message); var stream = _client.GetStream(); stream.Write(buff, 0, buff.Length); resultbufferCommand = command.ToString(); resultbufferJudge = result.Judgement.ToString(); resultbufferWaferID = result.WaferID; resultbufferMessage = result.Resultmessage; resultbufferFolderPath = result.FolderPath; }