CommandResetPosition.cs 652 B

123456789101112131415161718192021222324252627282930
  1. using StageController.M3H;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace StageController
  8. {
  9. public class CommandResetPosition : CommandBase
  10. {
  11. private M3HAxisType _axis;
  12. string _head = "@R";
  13. public CommandResetPosition(M3HAxisType axis)
  14. {
  15. _axis = axis;
  16. }
  17. public override string Make()
  18. {
  19. return _head + Enum.GetName(typeof(M3HAxisType), _axis) + "!";
  20. }
  21. public override bool Parse(string response)
  22. {
  23. return response == Make();
  24. }
  25. }
  26. }