AITMfcData.cs 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. using System.Runtime.Serialization;
  2. namespace OldWorldData.CommonData.DeviceData
  3. {
  4. [DataContract]
  5. [Serializable]
  6. public class AITMfcData
  7. {
  8. [DataMember]
  9. public string Module { get; set; }
  10. [DataMember]
  11. public string UniqueName { get; set; }
  12. /// <summary>
  13. /// 设备的唯一名称,UI与RT交互的ID
  14. /// </summary>
  15. [DataMember]
  16. public string DeviceName { get; set; }
  17. /// <summary>
  18. /// 显示在界面上的名称
  19. /// </summary>
  20. [DataMember]
  21. public string DisplayName { get; set; }
  22. /// <summary>
  23. /// IO 表中定义的物理编号,物理追溯使用 比如: M122
  24. /// </summary>
  25. [DataMember]
  26. public string DeviceSchematicId { get; set; }
  27. [DataMember]
  28. public string Unit { get; set; }
  29. [DataMember]
  30. public string Description { get; set; }
  31. /// <summary>
  32. /// 量程
  33. /// </summary>
  34. [DataMember]
  35. public double Scale { get; set; }
  36. /// <summary>
  37. /// 量程范围
  38. /// </summary>
  39. [DataMember]
  40. public string Range { get; set; }
  41. /// <summary>
  42. /// 设定值
  43. /// </summary>
  44. [DataMember]
  45. public double SetPoint { get; set; }
  46. /// <summary>
  47. /// 虚拟设定值
  48. /// </summary>
  49. [DataMember]
  50. public float VirtualSetPoint { get; set; }
  51. /// <summary>
  52. /// Ramping
  53. /// </summary>
  54. [DataMember]
  55. public double Ramping { get; set; }
  56. /// <summary>
  57. /// 虚拟Ramping
  58. /// </summary>
  59. [DataMember]
  60. public double VirtualRamping { get; set; }
  61. [DataMember]
  62. public double FeedBack { get; set; }
  63. /// <summary>
  64. /// 虚拟反馈值
  65. /// </summary>
  66. [DataMember]
  67. public double VirtualFeedBack { get; set; }
  68. /// <summary>
  69. /// 默认值
  70. /// </summary>
  71. [DataMember]
  72. public double DefaultValue { get; set; }
  73. /// <summary>
  74. /// 是否有报警
  75. /// </summary>
  76. [DataMember]
  77. public bool IsWarning { get; set; }
  78. [DataMember]
  79. public bool IsError { get; set; }
  80. [DataMember]
  81. public bool IsOffline { get; set; }
  82. [DataMember]
  83. public int Status { get; set; }
  84. /// <summary>
  85. /// alarm或是erro时显示的信息
  86. /// </summary>
  87. [DataMember]
  88. public string ErroMessage { get; set; }
  89. /// <summary>
  90. /// MFC,PC
  91. /// </summary>
  92. [DataMember]
  93. public string Type { get; set; }
  94. [DataMember]
  95. public double Factor { get; set; }
  96. [DataMember]
  97. public string AlarmWatchTable { get; set; }
  98. [DataMember]
  99. public string VirtualAlarmWatchTable { get; set; }
  100. private string _title;
  101. [DataMember]
  102. public string DisplayTitle
  103. {
  104. get
  105. {
  106. return string.Format("{0}({1})", DeviceSchematicId, DisplayName);
  107. }
  108. set
  109. {
  110. _title = value;
  111. }
  112. }
  113. [DataMember]
  114. public bool IsInstalled { get; set; }
  115. public AITMfcData()
  116. {
  117. DisplayName = "Undefined";
  118. Factor = 1.0;
  119. Unit = "sccm";
  120. Type = "MFC";
  121. DeviceSchematicId = "Undefined";
  122. UniqueName = "";
  123. }
  124. }
  125. public enum MFCUnitEnum
  126. {
  127. SCCM,
  128. SLM
  129. }
  130. public class AITMfcOperation
  131. {
  132. public const string Ramp = "Ramp";
  133. public const string GVMfcValve = "SetMfcValue";
  134. public const string GVMfcVirtualTurnValve = "SetMfcVirtualValue";
  135. }
  136. public class AITMfcDataPropertyName
  137. {
  138. public const string IsOffline = "IsOffline";
  139. public const string FeedBack = "FeedBack";
  140. public const string SetPoint = "SetPoint";
  141. public const string DefaultSetPoint = "DefaultSetPoint";
  142. public const string Scale = "Scale";
  143. public const string Range = "Range";
  144. public const string IsEnabled = "IsEnabled";
  145. public const string IsOutOfTolerance = "IsOutOfTolerance";
  146. public const string IsEnableAlarm = "IsEnableAlarm";
  147. public const string AlarmRange = "AlarmRange";
  148. public const string AlarmTime = "AlarmTime";
  149. public const string Status = "Status";
  150. }
  151. }