SerenRfMatchConnection.cs 867 B

1234567891011121314151617181920212223242526272829
  1. using System.Collections.Generic;
  2. using System.IO.Ports;
  3. using Aitex.Core.RT.Log;
  4. using MECF.Framework.Common.Communications;
  5. namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.RFMatchs.Serens
  6. {
  7. public class SerenRfMatchMessage : AsciiMessage
  8. {
  9. }
  10. public class SerenRfMatchConnection : SerialPortConnectionBase
  11. {
  12. public SerenRfMatchConnection(string portName, int baudRate = 19200, int dataBits = 8, Parity parity = Parity.None, StopBits stopBits = StopBits.One)
  13. : base(portName, baudRate, dataBits, parity, stopBits, "\r", true)
  14. {
  15. }
  16. protected override MessageBase ParseResponse(string rawBuffer)
  17. {
  18. SerenRfMatchMessage msg = new SerenRfMatchMessage();
  19. msg.RawMessage = rawBuffer;
  20. msg.IsResponse = true;
  21. return msg;
  22. }
  23. }
  24. }