RinseKeepwetRoutine.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using Aitex.Core.RT.Routine;
  2. using CyberX8_Core;
  3. using MECF.Framework.Common.Routine;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace CyberX8_RT.Modules.Rinse
  10. {
  11. public class RinseKeepwetRoutine : RoutineBase, IRoutine
  12. {
  13. private enum KeepwetStep
  14. {
  15. LoopStart,
  16. LoopDelay,
  17. LoopEnd,
  18. End
  19. }
  20. #region 内部变量
  21. private int _cycleCount = 100;
  22. #endregion
  23. /// <summary>
  24. /// 构造函数
  25. /// </summary>
  26. /// <param name="module"></param>
  27. public RinseKeepwetRoutine(string module) : base(module)
  28. {
  29. }
  30. /// <summary>
  31. /// 中止
  32. /// </summary>
  33. public void Abort()
  34. {
  35. Runner.Stop("Manual Abort");
  36. }
  37. /// <summary>
  38. /// 监控
  39. /// </summary>
  40. /// <returns></returns>
  41. public RState Monitor()
  42. {
  43. Runner.LoopStart(KeepwetStep.LoopStart, "rinse keepwet", _cycleCount, NullFun, _delay_1ms)
  44. .LoopDelay(KeepwetStep.LoopDelay, _delay_60s)
  45. .LoopEnd(KeepwetStep.LoopEnd, NullFun, _delay_1ms)
  46. .End(KeepwetStep.End, NullFun, _delay_1ms);
  47. return Runner.Status;
  48. }
  49. /// <summary>
  50. /// 启动
  51. /// </summary>
  52. /// <param name="objs"></param>
  53. /// <returns></returns>
  54. public RState Start(params object[] objs)
  55. {
  56. return Runner.Start(Module, "Start Rinse Keepwet");
  57. }
  58. }
  59. }