AITPumpData.cs 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Linq;
  5. using System.Reflection;
  6. using System.Runtime.Serialization;
  7. using System.Text;
  8. using System.Windows.Input;
  9. using Aitex.Core.UI.MVVM;
  10. using MECF.Framework.Common.CommonData;
  11. namespace Aitex.Core.Common.DeviceData
  12. {
  13. [DataContract]
  14. [Serializable]
  15. public class AITPumpData : NotifiableItem
  16. {
  17. [DataMember]
  18. public string DeviceModule { get; set; }
  19. [DataMember]
  20. public string DeviceName { get; set; }
  21. /// <summary>
  22. /// 显示在界面上的名称
  23. /// </summary>
  24. [DataMember]
  25. public string DisplayName { get; set; }
  26. /// <summary>
  27. /// IO 表中定义的物理编号,物理追溯使用 比如: V122
  28. /// </summary>
  29. [DataMember]
  30. public string DeviceSchematicId { get; set; }
  31. /// <summary>
  32. /// 当前设定值
  33. /// </summary>
  34. [DataMember]
  35. public bool IsOn { get; set; }
  36. /// <summary>
  37. /// 默认值
  38. /// </summary>
  39. [DataMember]
  40. public bool IsWarning { get; set; }
  41. /// <summary>
  42. /// 实际反馈值
  43. /// </summary>
  44. [DataMember]
  45. public bool IsError { get; set; }
  46. [DataMember]
  47. public int Speed { get; set; }
  48. [DataMember]
  49. public bool OverTemp { get; set; }
  50. [DataMember]
  51. public bool AtSpeed { get; set; }
  52. [DataMember]
  53. public int Temperature { get; set; }
  54. [DataMember]
  55. public int LocalRemoteMode { get; set; }
  56. [DataMember]
  57. public double WaterFlow { get; set; }
  58. [DataMember]
  59. public bool IsDryPumpEnable { get; set; }
  60. [DataMember]
  61. public bool IsN2PressureEnable { get; set; }
  62. [DataMember]
  63. public bool N2PressureWarning { get; set; }
  64. [DataMember]
  65. public bool N2PressureAlarm { get; set; }
  66. [DataMember]
  67. public bool IsWaterFlowEnable { get; set; }
  68. [DataMember]
  69. public bool WaterFlowWarning { get; set; }
  70. [DataMember]
  71. public bool WaterFlowAlarm { get; set; }
  72. public AITPumpData()
  73. {
  74. DisplayName = "未定义";
  75. }
  76. public void Update(IDeviceData data)
  77. {
  78. AITPumpData item = data as AITPumpData;
  79. if (item == null)
  80. return;
  81. InvokePropertyChanged();
  82. }
  83. }
  84. public enum AITPumpOperation
  85. {
  86. SetOnOff,
  87. PumpOn,
  88. PumpOff,
  89. }
  90. public class AITPumpProperty
  91. {
  92. public const string EnableWaterFlow = "EnableWaterFlow";
  93. public const string WaterFlowValue = "WaterFlowValue";
  94. public const string WaterFlowMinValue = "WaterFlowMinValue";
  95. public const string WaterFlowMaxValue = "WaterFlowMaxValue";
  96. public const string WaterFlowAlarm = "WaterFlowAlarm";
  97. public const string WaterFlowAlarmSetPoint = "WaterFlowAlarmSetPoint";
  98. public const string WaterFlowWarning = "WaterFlowWarning";
  99. public const string WaterFlowAlarmTime = "WaterFlowAlarmTime";
  100. public const string WaterFlowWarningTime = "WaterFlowWarningTime";
  101. public const string EnableN2Pressure = "EnableN2Pressure";
  102. public const string N2PressureValue = "N2PressureValue";
  103. public const string N2PressureMinValue = "N2PressureMinValue";
  104. public const string N2PressureMaxValue = "N2PressureMaxValue";
  105. public const string N2PressureAlarm = "N2PressureAlarm";
  106. public const string N2PressureAlarmSetPoint = "N2PressureAlarmSetPoint";
  107. public const string N2PressureWarning = "N2PressureWarning";
  108. public const string N2PressureAlarmTime = "N2PressureAlarmTime";
  109. public const string N2PressureWarningTime = "N2PressureWarningTime";
  110. public const string EnableDryPump = "EnableDryPump";
  111. public const string PumpBreakerStatus = "PumpBreakerStatus";
  112. public const string IsOverTemp = "IsOverTemp";
  113. public const string IsRunning = "IsRunning";
  114. public const string IsControl = "IsControl";
  115. public const string IsError = "IsError";
  116. public const string IsStart = "IsStart";
  117. public const string IsStop = "IsStop";
  118. }
  119. }