public void Handle(SendSerialRequest message) { this.log.Info("Send serial data to port {0}", message.Port); SerialPort serialPort; if (!this.serialPorts.TryGetValue(message.Port, out serialPort)) { this.log.Warn("Invalid serial port {0}", message.Port); return; } serialPort.Write(message.Data, 0, message.Data.Length); }
public void Handle(SendSerialRequest message) { this.main.Handle(message); }