AITGasSplitterData.cs 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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 AITGasSplitterData : 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. [DataMember]
  94. public double SwitchFeedBack
  95. {
  96. get;
  97. set;
  98. }
  99. /// <summary>
  100. /// 默认值
  101. /// </summary>
  102. [DataMember]
  103. public double DefaultValue
  104. {
  105. get;
  106. set;
  107. }
  108. /// <summary>
  109. /// 是否有报警
  110. /// </summary>
  111. [DataMember]
  112. public bool IsWarning
  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 string FormatString
  149. {
  150. get; set;
  151. }
  152. private string _title;
  153. [DataMember]
  154. public string DisplayTitle
  155. {
  156. get
  157. {
  158. return string.Format("{0}({1})", DeviceSchematicId, DisplayName);
  159. }
  160. set
  161. {
  162. _title = value;
  163. }
  164. }
  165. public AITGasSplitterData()
  166. {
  167. DisplayName = "Undefined";
  168. Unit = "%";
  169. Type = "Splitter";
  170. DeviceSchematicId = "Undefined";
  171. UniqueName = "";
  172. }
  173. public void Update(IDeviceData data)
  174. {
  175. throw new NotImplementedException();
  176. }
  177. }
  178. public class AITGasSplitterDataPropertyName
  179. {
  180. public const string IsOffline = "IsOffline";
  181. public const string FeedBack = "FeedBack";
  182. public const string SetPoint = "SetPoint";
  183. public const string DefaultSetPoint = "DefaultSetPoint";
  184. public const string Scale = "Scale";
  185. public const string Range = "Range";
  186. public const string IsEnabled = "IsEnabled";
  187. public const string IsOutOfTolerance = "IsOutOfTolerance";
  188. public const string IsEnableAlarm = "IsEnableAlarm";
  189. public const string AlarmRange = "AlarmRange";
  190. public const string AlarmTime = "AlarmTime";
  191. public const string Status = "Status";
  192. }
  193. }