AITRfData.cs 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. using System.Runtime.Serialization;
  2. namespace OldWorldData.CommonData.DeviceData
  3. {
  4. [Serializable]
  5. [DataContract]
  6. public enum RfMode
  7. {
  8. [EnumMember]
  9. ContinuousWaveMode = 1,
  10. [EnumMember]
  11. PulsingMode = 2,
  12. }
  13. public enum PatronRfMatchMode
  14. {
  15. Manual = 1,
  16. Auto = 2,
  17. }
  18. public enum TritonRfMatchMode
  19. {
  20. Manual = 0,
  21. Auto = 1,
  22. }
  23. [DataContract]
  24. [Serializable]
  25. public class AITRfData : AITDeviceData
  26. {
  27. [DataMember]
  28. public string UnitPower { get; set; }
  29. [DataMember]
  30. public string UnitFrequency { get; set; }
  31. [DataMember]
  32. public string UnitDuty { get; set; }
  33. [DataMember]
  34. public double ScalePower { get; set; }
  35. [DataMember]
  36. public double ScaleFrequency { get; set; }
  37. [DataMember]
  38. public double ScaleDuty { get; set; }
  39. [DataMember]
  40. public float PowerSetPoint { get; set; }
  41. [DataMember]
  42. public float FrequencySetPoint { get; set; }
  43. [DataMember]
  44. public float DutySetPoint { get; set; }
  45. [DataMember]
  46. public bool IsInterlockOk { get; set; }
  47. [DataMember]
  48. public bool IsRfOn { get; set; }
  49. [DataMember]
  50. public bool IsRfAlarm { get; set; }
  51. [DataMember]
  52. public float ForwardPower { get; set; }
  53. [DataMember]
  54. public float ReflectPower { get; set; }
  55. [DataMember]
  56. public int WorkMode { get; set; }
  57. [DataMember]
  58. public string PowerOnElapsedTime
  59. {
  60. get;
  61. set;
  62. }
  63. [DataMember]
  64. public bool EnablePulsing
  65. {
  66. get;
  67. set;
  68. }
  69. [DataMember]
  70. public bool EnableC1C2Position
  71. {
  72. get;
  73. set;
  74. }
  75. [DataMember]
  76. public bool EnableReflectPower
  77. {
  78. get;
  79. set;
  80. }
  81. [DataMember]
  82. public bool EnableVoltageCurrent
  83. {
  84. get;
  85. set;
  86. }
  87. [DataMember]
  88. public int MatchMode
  89. {
  90. get;
  91. set;
  92. }
  93. [DataMember]
  94. public int MatchPresetMode
  95. {
  96. get;
  97. set;
  98. }
  99. [DataMember]
  100. public float MatchPositionC1
  101. {
  102. get;
  103. set;
  104. }
  105. [DataMember]
  106. public float MatchPositionC2
  107. {
  108. get;
  109. set;
  110. }
  111. [DataMember]
  112. public float MatchPositionC1SetPoint
  113. {
  114. get;
  115. set;
  116. }
  117. [DataMember]
  118. public float MatchPositionC2SetPoint
  119. {
  120. get;
  121. set;
  122. }
  123. [DataMember]
  124. public float Voltage
  125. {
  126. get;
  127. set;
  128. }
  129. [DataMember]
  130. public float Current
  131. {
  132. get;
  133. set;
  134. }
  135. public string TextWorkMode
  136. {
  137. get
  138. {
  139. return WorkMode == (int)RfMode.ContinuousWaveMode ? "Continuous" : "Pulsing";
  140. }
  141. }
  142. public string TextOnOff
  143. {
  144. get
  145. {
  146. return IsRfOn ? "On" : "Off";
  147. }
  148. }
  149. public bool HasError
  150. {
  151. get
  152. {
  153. return IsRfAlarm || !IsInterlockOk;
  154. }
  155. }
  156. [DataMember]
  157. public bool IsToleranceError
  158. {
  159. get;
  160. set;
  161. }
  162. [DataMember]
  163. public bool IsToleranceWarning
  164. {
  165. get;
  166. set;
  167. }
  168. public AITRfData()
  169. {
  170. DisplayName = "Undefined";
  171. }
  172. }
  173. public enum AITRfOperation
  174. {
  175. SetPowerOnOff,
  176. SetMode,
  177. SetContinuousPower,
  178. SetPulsingPower,
  179. SetPower,
  180. SetPulsingFrequency,
  181. SetPulsingDuty,
  182. SetMatchMode,
  183. SetMatchProcessMode,
  184. SetMatchPosition, //同时设置2个
  185. SetMatchPositionC1,
  186. SetMatchPositionC2,
  187. SetHeatOnOff,
  188. }
  189. public class AITRfProperty
  190. {
  191. public const string RFEnable = "RFEnable";
  192. public const string RFSetPoint = "RFSetPoint";
  193. public const string RFForwardPower = "RFForwardPower";
  194. public const string RFReflectPower = "RFReflectPower";
  195. public const string RFRatio = "RFRatio";
  196. public const string RFInterlock = "RFInterlock";
  197. public const string RFDuty = "RFDuty";
  198. public const string RFFrequency = "RFFrequency";
  199. public const string RFMode = "RFMode";
  200. public const string RFMatchPositionC1Feedback = "RFMatchPositionC1Feedback";
  201. public const string RFMatchPositionC2Feedback = "RFMatchPositionC2Feedback";
  202. public const string RFMatchPositionC1SetPoint = "RFMatchPositionC1SetPoint";
  203. public const string RFMatchPositionC2SetPoint = "RFMatchPositionC2SetPoint";
  204. public const string RFAlarm = "RFAlarm";
  205. public const string Voltage = "Voltage";
  206. public const string Current = "Current";
  207. public const string IsOverTemp = "IsOverTemp";
  208. }
  209. }