AITBoostPumpData.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. namespace OldWorldData.CommonData.DeviceData
  2. {
  3. [DataContract]
  4. [Serializable]
  5. public class AITBoostPumpData
  6. {
  7. /// <summary>
  8. /// 阀的唯一名称,UI与RT交互的ID
  9. /// </summary>
  10. [DataMember]
  11. public string DeviceName { get; set; }
  12. /// <summary>
  13. /// 显示在界面上的名称
  14. /// </summary>
  15. [DataMember]
  16. public string DisplayName { get; set; } = "未定义";
  17. /// <summary>
  18. /// IO 表中定义的物理编号,物理追溯使用 比如: V122
  19. /// </summary>
  20. [DataMember]
  21. public string DeviceSchematicId { get; set; }
  22. [DataMember]
  23. public bool IsRunning { get; set; }
  24. [DataMember]
  25. public bool IsError { get; set; }
  26. [DataMember]
  27. public bool EnableFrequency { get; set; }
  28. [DataMember]
  29. public double EnableSetPoint { get; set; }
  30. [DataMember]
  31. public double PressureSetPoint { get; set; }
  32. [DataMember]
  33. public double PressureSetPointMax { get; set; }
  34. [DataMember]
  35. public double InverterFrequency { get; set; }
  36. public string PressureSetPointDisplay
  37. {
  38. get
  39. {
  40. return ((int)PressureSetPoint).ToString();
  41. }
  42. }
  43. public string FrequencyDisplay
  44. {
  45. get
  46. {
  47. return EnableFrequency ? string.Format("{0}%", (int)InverterFrequency) : "";
  48. }
  49. }
  50. public string InverterFrequencyDisplay
  51. {
  52. get
  53. {
  54. return InverterFrequency.ToString("F1");
  55. }
  56. }
  57. }
  58. public enum AITBoostPumpOperation
  59. {
  60. SetEnable,
  61. SetPressure,
  62. }
  63. public class AITBoostPumpDataPropertyName
  64. {
  65. public const string EnableSetPoint = "EnableSetPoint";
  66. public const string PressureSetPoint = "PressureSetPoint";
  67. public const string IsError = "IsError";
  68. public const string IsWarning = "IsWarning";
  69. public const string InverterFrequency = "InverterFrequency";
  70. }
  71. }