AITRfPowerData.cs 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. using System;
  2. using System.ComponentModel;
  3. using System.Reflection;
  4. using System.Runtime.Serialization;
  5. using System.Windows.Input;
  6. using Aitex.Core.UI.MVVM;
  7. using MECF.Framework.Common.CommonData;
  8. namespace Aitex.Core.Common.DeviceData
  9. {
  10. [Serializable]
  11. public enum EnumRfPowerRegulationMode
  12. {
  13. [EnumMember]
  14. Undefined = 0,
  15. [EnumMember]
  16. Forward = 1,
  17. [EnumMember]
  18. Load = 2,
  19. [EnumMember]
  20. DcBias = 3,
  21. [EnumMember]
  22. VALimit = 4,
  23. }
  24. [Serializable]
  25. public enum EnumRfPowerWorkMode
  26. {
  27. [EnumMember]
  28. ContinuousWaveMode = 0,
  29. [EnumMember]
  30. PulsingMode = 1,
  31. }
  32. [Serializable]
  33. public enum EnumRfPowerControlMode
  34. {
  35. [EnumMember]
  36. ManualMode = 0,
  37. [EnumMember]
  38. AnalogMode = 1,
  39. [EnumMember]
  40. RS232Mode = 2,
  41. }
  42. [DataContract]
  43. [Serializable]
  44. public class AITRfPowerData : NotifiableItem, IDeviceData
  45. {
  46. [DataMember]
  47. public string Module { get; set; }
  48. [DataMember]
  49. public string DeviceName { get; set; }
  50. /// <summary>
  51. /// 显示在界面上的名称
  52. /// </summary>
  53. [DataMember]
  54. public string DisplayName { get; set; }
  55. /// <summary>
  56. /// IO 表中定义的物理编号,物理追溯使用 比如: M122
  57. /// </summary>
  58. [DataMember]
  59. public string DeviceSchematicId { get; set; }
  60. [DataMember]
  61. public string Description { get; set; }
  62. [DataMember]
  63. public string UnitPower { get; set; }
  64. [DataMember]
  65. public string UnitFrequency { get; set; }
  66. [DataMember]
  67. public string UnitDuty { get; set; }
  68. [DataMember]
  69. public double ScalePower { get; set; }
  70. [DataMember]
  71. public double ScaleFrequency { get; set; }
  72. [DataMember]
  73. public double ScaleDuty { get; set; }
  74. [DataMember]
  75. public float PowerSetPoint { get; set; }
  76. [DataMember]
  77. public float FrequencySetPoint { get; set; }
  78. [DataMember]
  79. public float DutySetPoint { get; set; }
  80. [DataMember]
  81. public bool IsInterlockOk { get; set; }
  82. [DataMember]
  83. public bool IsRfOn { get; set; }
  84. [DataMember]
  85. public bool IsRfAlarm { get; set; }
  86. [DataMember]
  87. public float ForwardPower { get; set; }
  88. [DataMember]
  89. public float ReflectPower { get; set; }
  90. [DataMember]
  91. public float Frequency { get; set; }
  92. [DataMember]
  93. public float PulsingFrequency { get; set; }
  94. [DataMember]
  95. public float PulsingDutyCycle { get; set; }
  96. public string TextOnOff
  97. {
  98. get
  99. {
  100. return IsRfOn ? "On" : "Off";
  101. }
  102. }
  103. [DataMember]
  104. public EnumRfPowerRegulationMode RegulationMode { get; set; }
  105. public AITRfPowerData()
  106. {
  107. DisplayName = "Undefined";
  108. }
  109. public void Update(IDeviceData data)
  110. {
  111. }
  112. }
  113. public enum AITRfPowerOperation
  114. {
  115. SetPowerOnOff,
  116. SetMode,
  117. SetContinuousPower,
  118. SetPulsingPower,
  119. SetPower,
  120. SetPulsingFrequency,
  121. SetPulsingDuty,
  122. SetMatchMode,
  123. SetMatchProcessMode,
  124. SetMatchPosition, //同时设置2个
  125. SetMatchPositionC1,
  126. SetMatchPositionC2,
  127. }
  128. public class AITRfPowerProperty
  129. {
  130. public const string RFEnable = "RFEnable";
  131. public const string RFSetPoint = "RFSetPoint";
  132. public const string RFForwardPower = "RFForwardPower";
  133. public const string RFReflectPower = "RFReflectPower";
  134. public const string RFRatio = "RFRatio";
  135. public const string RFInterlock = "RFInterlock";
  136. public const string RFDuty = "RFDuty";
  137. public const string RFFrequency = "RFFrequency";
  138. public const string RFMode = "RFMode";
  139. public const string RFMatchPositionC1Feedback = "RFMatchPositionC1Feedback";
  140. public const string RFMatchPositionC2Feedback = "RFMatchPositionC2Feedback";
  141. public const string RFMatchPositionC1SetPoint = "RFMatchPositionC1SetPoint";
  142. public const string RFMatchPositionC2SetPoint = "RFMatchPositionC2SetPoint";
  143. public const string RFAlarm = "RFAlarm";
  144. public const string Voltage = "Voltage";
  145. public const string Current = "Current";
  146. public const string IsOverTemp = "IsOverTemp";
  147. }
  148. }