SMCChillerMockPMB.cs 878 B

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Threading;
  3. using MECF.Framework.Simulator.Core.Driver;
  4. namespace EfemDualSimulator.Devices
  5. {
  6. class SMCChillerMockPMB : SerialPortDeviceSimulator
  7. {
  8. public enum SMCChillerStatus
  9. {
  10. Open,
  11. Close,
  12. }
  13. public static SMCChillerStatus _simPumpStatus;
  14. private const string EOF = "\r\n";
  15. private const char MSG_DELIMITER = ' ';
  16. private const string MOCKUP_PORT = "COM43";
  17. public SMCChillerMockPMB(string com) : base(com, -1, EOF, MSG_DELIMITER)
  18. {
  19. _simPumpStatus = SMCChillerStatus.Close;
  20. }
  21. protected override void ProcessUnsplitMessage(string message)
  22. {
  23. if (string.IsNullOrEmpty(message))
  24. throw new ArgumentException("Hardware command message is invalid");
  25. }
  26. }
  27. }