VpwCellEntity.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. using Aitex.Core.RT.Fsm;
  2. using MECF.Framework.Common.Equipment;
  3. using MECF.Framework.Common.SubstrateTrackings;
  4. using MECF.Framework.Common.ToolLayout;
  5. using PunkHPX8_Core;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. namespace PunkHPX8_RT.Modules.VpwMain
  12. {
  13. public class VpwCellEntity : Entity, IEntity, IModuleEntity
  14. {
  15. public enum MSG
  16. {
  17. Home
  18. }
  19. #region 内部变量
  20. #endregion
  21. #region 属性
  22. public ModuleName Module { get; private set; }
  23. /// <summary>
  24. /// 初始化状态
  25. /// </summary>
  26. public bool IsInit
  27. {
  28. get { return false; }
  29. }
  30. /// <summary>
  31. /// 空闲状态
  32. /// </summary>
  33. public bool IsIdle
  34. {
  35. get
  36. {
  37. return true;
  38. }
  39. }
  40. /// <summary>
  41. /// 是否发生错误
  42. /// </summary>
  43. public bool IsError
  44. {
  45. get { return false; }
  46. }
  47. /// <summary>
  48. /// 是否正在作业
  49. /// </summary>
  50. public bool IsBusy
  51. {
  52. get { return false; }
  53. }
  54. public bool IsAuto { get; } = true;
  55. /// <summary>
  56. /// 是否为工程模式
  57. /// </summary>
  58. public bool IsEngineering { get; } = false;
  59. /// <summary>
  60. /// 是否为产品模式
  61. /// </summary>
  62. public bool IsProduction { get; } = true;
  63. /// <summary>
  64. /// 是否禁用
  65. /// </summary>
  66. public bool IsDisable { get; internal set; } = false;
  67. /// <summary>
  68. /// 最大Slot数量
  69. /// </summary>
  70. public int MaxSlotNumber { get; internal set; }
  71. #endregion
  72. /// <summary>
  73. /// 构造函数
  74. /// </summary>
  75. /// <param name="module"></param>
  76. public VpwCellEntity(ModuleName module)
  77. {
  78. this.Module = module;
  79. }
  80. public bool Check(int msg, out string reason, params object[] args)
  81. {
  82. reason = "";
  83. return false;
  84. }
  85. public bool CheckAcked(int msg)
  86. {
  87. return false;
  88. }
  89. public int Invoke(string function, params object[] args)
  90. {
  91. switch (function)
  92. {
  93. case "HomeAll":
  94. return (int)MSG.Home;
  95. }
  96. return (int)FSM_MSG.NONE;
  97. }
  98. }
  99. }