DeviceStateDefaultList.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace IMCS.DefaultList
  7. {
  8. public enum EnumPlateNum
  9. {
  10. /// <summary>
  11. /// 没有托盘,可能用到的地方在AGV接驳位
  12. /// </summary>
  13. Plate_Zero,
  14. /// <summary>
  15. /// 一个托盘,主要用于打标机,清洗机,机床等,或AGV接驳位
  16. /// </summary>
  17. Plate_One,
  18. /// <summary>
  19. /// 主要用于AGV接驳位
  20. /// </summary>
  21. Plate_Two,
  22. /// <summary>
  23. /// 主要用于机器人,
  24. /// </summary>
  25. Plate_Third,
  26. /// <summary>
  27. /// 扩展,没有使用的地方
  28. /// </summary>
  29. Plate_Four
  30. }
  31. /// <summary>
  32. /// 设备运行状态
  33. /// </summary>
  34. public enum EnumDeviceRunState
  35. {
  36. /// <summary>
  37. /// 默认
  38. /// </summary>
  39. RunState_None,
  40. /// <summary>
  41. /// 空闲
  42. /// </summary>
  43. RunState_Wait,
  44. /// <summary>
  45. /// 运行中
  46. /// </summary>
  47. RunState_Run,
  48. /// <summary>
  49. /// 故障
  50. /// </summary>
  51. RunState_Err
  52. }
  53. public class DeviceStateDefaultList : Notify
  54. {
  55. private void NotiP(ref object ob, object ob1, string value)
  56. {
  57. if (ob != ob1)
  58. {
  59. ob = ob1;
  60. NotifyProper(value);
  61. }
  62. }
  63. private EnumPlateNum _Device_Plate = EnumPlateNum.Plate_Four;
  64. /// <summary>
  65. /// 托盘数量,
  66. /// </summary>
  67. public EnumPlateNum Device_Pan
  68. {
  69. get { return _Device_Plate; }
  70. set
  71. {
  72. if (_Device_Plate != value)
  73. {
  74. _Device_Plate = value;
  75. NotifyProper("Device_Pan");
  76. }
  77. }
  78. }
  79. private bool _Device_OnLine = false;
  80. /// <summary>
  81. /// 是否在线
  82. /// </summary>
  83. public bool Device_OnLine
  84. {
  85. get { return _Device_OnLine; }
  86. set
  87. {
  88. if (_Device_OnLine != value)
  89. {
  90. _Device_OnLine = value;
  91. NotifyProper("Device_OnLine");
  92. }
  93. }
  94. }
  95. private bool _Device_ConnectionMes = false;
  96. /// <summary>
  97. /// 系统监管,是否连接到MES
  98. /// </summary>
  99. public bool Device_ConnectionMes
  100. {
  101. get { return _Device_ConnectionMes; }
  102. set
  103. {
  104. if (_Device_ConnectionMes != value)
  105. {
  106. _Device_ConnectionMes = value;
  107. NotifyProper("Device_ConnectionMes");
  108. }
  109. }
  110. }
  111. private EnumDeviceRunState _Device_Runing = EnumDeviceRunState.RunState_None;
  112. /// <summary>
  113. /// 是否在运行,值包含运行中,空闲
  114. /// </summary>
  115. public EnumDeviceRunState Device_Runing
  116. {
  117. get { return _Device_Runing; }
  118. set
  119. {
  120. if (_Device_Runing != value)
  121. {
  122. _Device_Runing = value;
  123. NotifyProper("Device_Runing");
  124. }
  125. }
  126. }
  127. private string _Device_Name = "";
  128. /// <summary>
  129. /// 设备名称,AGV接驳位,打标机,清洗机,六轴机器人等内容
  130. /// </summary>
  131. public string Device_Name
  132. {
  133. get { return _Device_Name; }
  134. set
  135. {
  136. if (_Device_Name != value)
  137. {
  138. _Device_Name = value;
  139. NotifyProper("Device_Name");
  140. }
  141. }
  142. }
  143. }
  144. }