using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Aitex.Core.Common.DeviceData; using Aitex.Core.RT.Device; using MECF.Framework.Common.Device.Bases; using MECF.Framework.Common.Equipment; namespace JetVirgoPM.Devices { interface IPlasmaControl { // Generator float ReflectPower { get; } //void SetRfMode(RfMode mode); void SetPower(ushort val); bool SetPowerOnOff(bool on, out string str); //void SetPulsingFrequency(float val); //void SetDuty(float val); // Match void SetMatchWorkMode(EnumRfMatchTuneMode mode); void SetPosition(byte c1, byte c2); } interface IGenerator { bool IsRfOn { get; } float PowerSetPoint { get; } float RFForwardPower { get; } float RFReflectPower { get; } bool SetPowerOnOff(bool on, out string str); void SetRfMode(RfMode mode); void SetPower(ushort val); //void TurnOn(bool on); } interface IMatch { EnumRfMatchTuneMode WorkMode { get; set; } void SetPosition(byte c1, byte c2); } public enum GeneratorStatus { Unknown, OFF, ON, ERROR } public enum GeneratorControlMode { Manual = 0, Analog = 1, RS232 = 2 } /// /// /// class PlasmaController : BaseDevice, IDevice, IPlasmaControl { private readonly RfPowerBase _Generator; private readonly RfMatchBase _Match; // --------------------------Properties------------------------ // public float ReflectPower => _Generator.ReflectPower; // --------------------------Constructor----------------------- // public PlasmaController(ModuleName mod) { _Generator = new AdTecGenerator(mod,Name); _Match = new AdTecMatch(mod, Name); } public bool Initialize() { throw new System.NotImplementedException(); } public void Monitor() { throw new System.NotImplementedException(); } public void Reset() { throw new System.NotImplementedException(); } public void SetMatchWorkMode(EnumRfMatchTuneMode mode) { _Match.TuneMode1 = mode; _Match.TuneMode2 = mode; } public void SetPosition(byte c1, byte c2) { _Match.TunePosition1 = c1; } public void SetPower(ushort val) { _Generator.SetPower(val); } //public void SetRfMode(EnumRfPowerWorkMode mode) //{ // _Generator.SetRfMode(mode); //} public void Terminate() { throw new System.NotImplementedException(); } public bool SetPowerOnOff(bool on, out string str) { str = ""; _Generator.SetPowerOnOff(on, out str); return true; } } }