AITMfcData.cs 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  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 AITMfcData : NotifiableItem, IDeviceData
  16. {
  17. [DataMember]
  18. public string Module { get; set; }
  19. [DataMember]
  20. public string UniqueName { get; set; }
  21. /// <summary>
  22. /// 设备的唯一名称,UI与RT交互的ID
  23. /// </summary>
  24. [DataMember]
  25. public string DeviceName
  26. {
  27. get;
  28. set;
  29. }
  30. /// <summary>
  31. /// 显示在界面上的名称
  32. /// </summary>
  33. [DataMember]
  34. public string DisplayName
  35. {
  36. get;
  37. set;
  38. }
  39. /// <summary>
  40. /// IO 表中定义的物理编号,物理追溯使用 比如: M122
  41. /// </summary>
  42. [DataMember]
  43. public string DeviceSchematicId
  44. {
  45. get;
  46. set;
  47. }
  48. [DataMember]
  49. public string Unit
  50. {
  51. get;
  52. set;
  53. }
  54. [DataMember]
  55. public string Description
  56. {
  57. get;
  58. set;
  59. }
  60. /// <summary>
  61. /// 量程
  62. /// </summary>
  63. [DataMember]
  64. public double Scale
  65. {
  66. get;
  67. set;
  68. }
  69. /// <summary>
  70. /// 量程范围
  71. /// </summary>
  72. [DataMember]
  73. public string Range
  74. {
  75. get;
  76. set;
  77. }
  78. /// <summary>
  79. /// 设定值
  80. /// </summary>
  81. [DataMember]
  82. public double SetPoint
  83. {
  84. get;
  85. set;
  86. }
  87. [DataMember]
  88. public double FeedBack
  89. {
  90. get;
  91. set;
  92. }
  93. /// <summary>
  94. /// 默认值
  95. /// </summary>
  96. [DataMember]
  97. public double DefaultValue
  98. {
  99. get;
  100. set;
  101. }
  102. /// <summary>
  103. /// 是否有报警
  104. /// </summary>
  105. [DataMember]
  106. public bool IsWarning
  107. {
  108. get;
  109. set;
  110. }
  111. [DataMember]
  112. public bool IsError
  113. {
  114. get;
  115. set;
  116. }
  117. [DataMember]
  118. public bool IsOffline
  119. {
  120. get;
  121. set;
  122. }
  123. [DataMember]
  124. public int Status
  125. {
  126. get;
  127. set;
  128. }
  129. /// <summary>
  130. /// alarm或是erro时显示的信息
  131. /// </summary>
  132. [DataMember]
  133. public string ErroMessage
  134. {
  135. get;
  136. set;
  137. }
  138. /// <summary>
  139. /// MFC,PC
  140. /// </summary>
  141. [DataMember]
  142. public string Type
  143. {
  144. get;
  145. set;
  146. }
  147. [DataMember]
  148. public double Factor
  149. {
  150. get;
  151. set;
  152. }
  153. private string _title;
  154. [DataMember]
  155. public string DisplayTitle
  156. {
  157. get
  158. {
  159. return string.Format("{0}({1})", DeviceSchematicId, DisplayName);
  160. }
  161. set
  162. {
  163. _title = value;
  164. }
  165. }
  166. public AITMfcData()
  167. {
  168. DisplayName = "Undefined";
  169. Factor = 1.0;
  170. Unit = "sccm";
  171. Type = "MFC";
  172. DeviceSchematicId = "Undefined";
  173. UniqueName = "";
  174. }
  175. public void Update(IDeviceData data)
  176. {
  177. throw new NotImplementedException();
  178. }
  179. }
  180. public class AITMfcOperation
  181. {
  182. public const string Ramp = "Ramp";
  183. }
  184. public class AITMfcDataPropertyName
  185. {
  186. public const string IsOffline = "IsOffline";
  187. public const string MfcAlarm = "MfcAlarm";
  188. public const string IsEnable = "IsEnable";
  189. public const string PressureAlarm = "PressureAlarm";
  190. public const string FeedBack = "FeedBack";
  191. public const string SetPoint = "SetPoint";
  192. public const string DefaultSetPoint = "DefaultSetPoint";
  193. public const string Scale = "Scale";
  194. public const string Range = "Range";
  195. public const string IsEnabled = "IsEnabled";
  196. public const string IsOutOfTolerance = "IsOutOfTolerance";
  197. public const string IsEnableAlarm = "IsEnableAlarm";
  198. public const string AlarmRange = "AlarmRange";
  199. public const string AlarmTime = "AlarmTime";
  200. public const string Status = "Status";
  201. }
  202. }