PlatingCellRunRecipeRoutine.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using Aitex.Core.RT.Routine;
  2. using MECF.Framework.Common.Routine;
  3. using PunkHPX8_Core;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace PunkHPX8_RT.Modules.PlatingCell
  10. {
  11. public class PlatingCellRunRecipeRoutine : RoutineBase, IRoutine
  12. {
  13. private enum RunRecipeStep
  14. {
  15. Delay,
  16. End
  17. }
  18. /// <summary>
  19. /// 构造函数
  20. /// </summary>
  21. /// <param name="module"></param>
  22. public PlatingCellRunRecipeRoutine(string module) : base(module)
  23. {
  24. }
  25. /// <summary>
  26. /// 中止
  27. /// </summary>
  28. public void Abort()
  29. {
  30. Runner.Stop("Manual Abort");
  31. }
  32. /// <summary>
  33. /// 监控
  34. /// </summary>
  35. /// <returns></returns>
  36. public RState Monitor()
  37. {
  38. Runner.Delay(RunRecipeStep.Delay, 5000)
  39. .End(RunRecipeStep.End, NullFun);
  40. return RState.Init;
  41. }
  42. /// <summary>
  43. /// 启动
  44. /// </summary>
  45. /// <param name="objs"></param>
  46. /// <returns></returns>
  47. public RState Start(params object[] objs)
  48. {
  49. return Runner.Start(Module, "Run Recipe");
  50. }
  51. }
  52. }