123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- using System;
- using System.ComponentModel;
- using System.Reflection;
- using System.Runtime.Serialization;
- using System.Windows.Input;
- using Aitex.Core.UI.MVVM;
- using MECF.Framework.Common.CommonData;
- namespace Aitex.Core.Common.DeviceData
- {
- [Serializable]
- [DataContract]
- public enum RfMode
- {
- [EnumMember]
- ContinuousWaveMode = 1,
- [EnumMember]
- PulsingMode = 2,
- }
- public enum PatronRfMatchMode
- {
- Manual = 1,
- Auto = 2,
- }
- public enum TritonRfMatchMode
- {
- Manual = 0,
- Auto = 1,
- }
- public enum RfMatchModeProcess
- {
- TritonPresetMode = 0,
- TritonAutoMode = 1,
- }
- public enum BiasRfMatchMode
- {
- Hold = 0,
- Preset = 1,
- }
- [DataContract]
- [Serializable]
- public class AITRfData : NotifiableItem, IDeviceData
- {
- [DataMember]
- public string Module { get; set; }
- [DataMember]
- public string DeviceName { get; set; }
- /// <summary>
- /// 显示在界面上的名称
- /// </summary>
- [DataMember]
- public string DisplayName { get; set; }
- /// <summary>
- /// IO 表中定义的物理编号,物理追溯使用 比如: M122
- /// </summary>
- [DataMember]
- public string DeviceSchematicId { get; set; }
- [DataMember]
- public string Description { get; set; }
- [DataMember]
- public string UnitPower { get; set; }
- [DataMember]
- public string UnitFrequency { get; set; }
- [DataMember]
- public string UnitDuty { get; set; }
- [DataMember]
- public double ScalePower { get; set; }
- [DataMember]
- public double ScaleFrequency { get; set; }
- [DataMember]
- public double ScaleDuty { get; set; }
- [DataMember]
- public float PowerSetPoint { get; set; }
- [DataMember]
- public float FrequencySetPoint { get; set; }
- [DataMember]
- public float DutySetPoint { get; set; }
- [DataMember]
- public bool IsInterlockOk { get; set; }
- [DataMember]
- public bool IsRfOn { get; set; }
- [DataMember]
- public bool IsMatchOn { get; set; }
- [DataMember]
- public bool IsRfAlarm { get; set; }
- [DataMember]
- public float ForwardPower { get; set; }
- [DataMember]
- public float ReflectPower { get; set; }
- [DataMember]
- public int WorkMode { get; set; }
- [DataMember]
- public string PowerOnElapsedTime
- {
- get;
- set;
- }
- [DataMember]
- public bool EnablePulsing
- {
- get;
- set;
- }
- [DataMember]
- public bool EnableC1C2Position
- {
- get;
- set;
- }
- [DataMember]
- public bool EnableReflectPower
- {
- get;
- set;
- }
- [DataMember]
- public bool EnableVoltageCurrent
- {
- get;
- set;
- }
- [DataMember]
- public int MatchMode
- {
- get;
- set;
- }
- [DataMember]
- public int MatchPresetMode
- {
- get;
- set;
- }
- [DataMember]
- public float MatchPositionC1
- {
- get;
- set;
- }
- [DataMember]
- public float MatchPositionC2
- {
- get;
- set;
- }
- [DataMember]
- public float MatchPositionC1SetPoint
- {
- get;
- set;
- }
- [DataMember]
- public float MatchPositionC2SetPoint
- {
- get;
- set;
- }
- [DataMember]
- public float MatchVPP
- {
- get;
- set;
- }
- [DataMember]
- public float Voltage
- {
- get;
- set;
- }
- [DataMember]
- public float Current
- {
- get;
- set;
- }
- public string TextWorkMode
- {
- get
- {
- return WorkMode == (int)RfMode.ContinuousWaveMode ? "Continuous" : "Pulsing";
- }
- }
- public string TextOnOff
- {
- get
- {
- return IsRfOn ? "On" : "Off";
- }
- }
- public string PatronTextMatchMode
- {
- get
- {
- return MatchMode == (int)PatronRfMatchMode.Manual ? "Manual" : "Auto";
- }
- }
- public string TritonTextMatchMode
- {
- get
- {
- return MatchMode == (int)TritonRfMatchMode.Manual ? "Manual" : "Auto";
- }
- }
- public string TritonMatchProcessModeDisplay
- {
- get
- {
- return MatchPresetMode == (int)BiasRfMatchMode.Preset ? "Preset" : "Hold";
- }
- }
- public bool HasError { get; set; }
- public AITRfData()
- {
- DisplayName = "Undefined";
- }
- public void Update(IDeviceData data)
- {
- throw new NotImplementedException();
- }
- }
- public enum AITRfOperation
- {
- SetPowerOnOff,
- SetMode,
- SetContinuousPower,
- SetPulsingPower,
- SetPower,
- SetPulsingFrequency,
- SetPulsingDuty,
- SetMatchMode,
- SetMatchProcessMode,
- SetMatchPosition, //同时设置2个
- SetMatchPositionC1,
- SetMatchPositionC2,
- }
- public class AITRfProperty
- {
- public const string RFEnable = "RFEnable";
- public const string RFSetPoint = "RFSetPoint";
- public const string RFForwardPower = "RFForwardPower";
- public const string RFReflectPower = "RFReflectPower";
- public const string RFRatio = "RFRatio";
- public const string RFInterlock = "RFInterlock";
- public const string RFDuty = "RFDuty";
- public const string RFFrequency = "RFFrequency";
- public const string RFMode = "RFMode";
- public const string RFMatchPositionC1Feedback = "RFMatchPositionC1Feedback";
- public const string RFMatchPositionC2Feedback = "RFMatchPositionC2Feedback";
- public const string RFMatchPositionC1SetPoint = "RFMatchPositionC1SetPoint";
- public const string RFMatchPositionC2SetPoint = "RFMatchPositionC2SetPoint";
- public const string RFMatchVPP = "RFMatchVPP";
- public const string RFAlarm = "RFAlarm";
- public const string Voltage = "Voltage";
- public const string Current = "Current";
- public const string IsOverTemp = "IsOverTemp";
- }
- }
|