CommandVoltage.cs 707 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace StageController
  7. {
  8. public class CommandVoltage : CommandBase
  9. {
  10. private string m_command;
  11. public CommandVoltage(string command)
  12. {
  13. m_command = command;
  14. }
  15. public override string Make()
  16. {
  17. return m_command;
  18. }
  19. public override bool Parse(string response)
  20. {
  21. string tmpRes = m_command.Substring(0, 4);
  22. if (tmpRes.CompareTo(response.Substring(0, 4)) == 0)
  23. {
  24. return true;
  25. }
  26. return false;
  27. }
  28. }
  29. }