| 
															
																@@ -7,6 +7,7 @@ using Aitex.Core.RT.SCCore; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using Aitex.Core.RT.Tolerance; 
															 | 
															
															 | 
															
																 using Aitex.Core.RT.Tolerance; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using Aitex.Core.UI.Control; 
															 | 
															
															 | 
															
																 using Aitex.Core.UI.Control; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using Aitex.Core.Util; 
															 | 
															
															 | 
															
																 using Aitex.Core.Util; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+using CommunityToolkit.HighPerformance.Buffers; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using MECF.Framework.Common.Communications; 
															 | 
															
															 | 
															
																 using MECF.Framework.Common.Communications; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using MECF.Framework.Common.DataCenter; 
															 | 
															
															 | 
															
																 using MECF.Framework.Common.DataCenter; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using MECF.Framework.Common.Device.Bases; 
															 | 
															
															 | 
															
																 using MECF.Framework.Common.Device.Bases; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -16,7 +17,7 @@ using System.Collections; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using System.Collections.Generic; 
															 | 
															
															 | 
															
																 using System.Collections.Generic; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using System.Diagnostics; 
															 | 
															
															 | 
															
																 using System.Diagnostics; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using System.Linq; 
															 | 
															
															 | 
															
																 using System.Linq; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-using System.Net; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+using System.ServiceModel.Channels; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using Venus_Core; 
															 | 
															
															 | 
															
																 using Venus_Core; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																 namespace Venus_RT.Devices 
															 | 
															
															 | 
															
																 namespace Venus_RT.Devices 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -24,17 +25,12 @@ namespace Venus_RT.Devices 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     public class TruPlasmaRF : RfPowerBase 
															 | 
															
															 | 
															
																     public class TruPlasmaRF : RfPowerBase 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     { 
															 | 
															
															 | 
															
																     { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         private readonly AsyncSerialPort _serial; 
															 | 
															
															 | 
															
																         private readonly AsyncSerialPort _serial; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        private static byte _ACK = 0x06; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        private static byte ParamRead = 0x01; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        private static byte ParamWrite = 0x02; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        private static byte TelegramError = 0xFE; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        private static byte MessageRead = 0x04; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        private static byte CtllnterfaceAct= 0x05; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-       // private  bool  = 0x05; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        private List<byte> buffer = new List<byte>(4096); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         public TruPlasmaRF(ModuleName mod, VenusDevice device) : base(mod.ToString(), device.ToString()) 
															 | 
															
															 | 
															
																         public TruPlasmaRF(ModuleName mod, VenusDevice device) : base(mod.ToString(), device.ToString()) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            this.Status = GeneratorStatus.Unknown; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             var portNum = SC.GetStringValue(device == VenusDevice.Rf ? $"{mod}.Rf.Port" : $"{mod}.BiasRf.Port"); 
															 | 
															
															 | 
															
																             var portNum = SC.GetStringValue(device == VenusDevice.Rf ? $"{mod}.Rf.Port" : $"{mod}.BiasRf.Port"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            _serial = new AsyncSerialPort(portNum, 9600, 8, System.IO.Ports.Parity.None, System.IO.Ports.StopBits.One, "\r\r"); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            _serial = new AsyncSerialPort(portNum, 9600, 8, System.IO.Ports.Parity.None, System.IO.Ports.StopBits.One,"/r", false); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         public override bool Initialize() 
															 | 
															
															 | 
															
																         public override bool Initialize() 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -45,14 +41,15 @@ namespace Venus_RT.Devices 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             { 
															 | 
															
															 | 
															
																             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 _serial.OnBinaryDataChanged += SerialPortDataReceived; 
															 | 
															
															 | 
															
																                 _serial.OnBinaryDataChanged += SerialPortDataReceived; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 _serial.OnErrorHappened += SerialPortErrorOccurred; 
															 | 
															
															 | 
															
																                 _serial.OnErrorHappened += SerialPortErrorOccurred; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                ResetCommand(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             } 
															 | 
															
															 | 
															
																             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             else 
															 | 
															
															 | 
															
																             else 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             { 
															 | 
															
															 | 
															
																             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 LOG.Write(eEvent.ERR_RF, Module, "Tru 射频发生器串口无法打开"); 
															 | 
															
															 | 
															
																                 LOG.Write(eEvent.ERR_RF, Module, "Tru 射频发生器串口无法打开"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 return false; 
															 | 
															
															 | 
															
																                 return false; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             } 
															 | 
															
															 | 
															
																             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-          
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             return true; 
															 | 
															
															 | 
															
																             return true; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         public new AITRfData DeviceData => 
															 | 
															
															 | 
															
																         public new AITRfData DeviceData => 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             new AITRfData 
															 | 
															
															 | 
															
																             new AITRfData 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -67,43 +64,117 @@ namespace Venus_RT.Devices 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             }; 
															 | 
															
															 | 
															
																             }; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         private void SerialPortDataReceived(byte[] rawMessage) 
															 | 
															
															 | 
															
																         private void SerialPortDataReceived(byte[] rawMessage) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            LOG.Write(eEvent.INFO_RF, Module, $"RF byte"+rawMessage.ToString()); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             try 
															 | 
															
															 | 
															
																             try 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             { 
															 | 
															
															 | 
															
																             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                if (rawMessage.Length==1&& rawMessage[1]== 0x06) //ACK 指令 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                buffer.AddRange(rawMessage); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                while (buffer.Count >= 18) //至少包含帧头(2字节)、长度(1字节)、校验位(1字节);根据设计不同而不同 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 { 
															 | 
															
															 | 
															
																                 { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                //2.1 查找数据头 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                if (buffer[0] == 0x06) //传输数据有帧头,用于判断 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                {                   
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    //得到完整的数据,复制到ReceiveBytes中进行校验 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    byte[] ReceiveBytes = new byte[13]; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    byte[] ReadReceiveBytes = new byte[18]; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    buffer.CopyTo(0, ReceiveBytes, 0, 13); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    buffer.CopyTo(0, ReadReceiveBytes, 0, 18); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        if ((ReceiveBytes[12] == 0x55)&& (ReceiveBytes[1] == 0xAA)) //校验失败,最后一个字节是校验位 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            parsecmd(ReceiveBytes); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            buffer.RemoveRange(0, 13); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        else if ((ReadReceiveBytes[17] == 0x55) && (ReceiveBytes[1] == 0xAA)) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            parsecmd(ReadReceiveBytes); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            buffer.RemoveRange(0, 18); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        else 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            buffer.Clear(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            LOG.Write(eEvent.ERR_RF, Module, $"rf通讯错误"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                     
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    ///执行对数据进行处理操作RunReceiveDataCallback(ReceiveBytes); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 } 
															 | 
															
															 | 
															
																                 } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                else if (rawMessage.Length > 1) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                else //帧头不正确时,记得清除 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 { 
															 | 
															
															 | 
															
																                 { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    parsecmd(rawMessage); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    //buffer.RemoveAt(0); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 } 
															 | 
															
															 | 
															
																                 } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             } 
															 | 
															
															 | 
															
																             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             catch (Exception ex) 
															 | 
															
															 | 
															
																             catch (Exception ex) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             { 
															 | 
															
															 | 
															
																             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                buffer.Clear(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 LOG.WriteExeption(ex); 
															 | 
															
															 | 
															
																                 LOG.WriteExeption(ex); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            } 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            }          
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        public GeneratorStatus Status { get; set; } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        private bool GetBitValue(byte value, int bit) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            return (value & (byte)Math.Pow(2, bit)) > 0 ? true : false; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        public override bool IsPowerOn 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            get => Status == GeneratorStatus.ON; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            set { } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         public void parsecmd(byte[] message) 
															 | 
															
															 | 
															
																         public void parsecmd(byte[] message) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-           switch (message[4])  
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            try  
															 | 
														
													
												
													
														
															| 
															 | 
															
																             { 
															 | 
															
															 | 
															
																             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                case 0x01://ParamRead 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    int DataValue = BitConverter.ToInt32(new byte[] { message[10], message[11], message[12], message[13] }, 0); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    ReflectPower = DataValue; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    break; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                case 0x02://ParamWrite 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    DataValue = BitConverter.ToInt32(new byte[] { message[10] ,message[11], message[12], message[13] }, 0); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    ForwardPower = DataValue;                    
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                   break; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                case 0xFE://TelegramError 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    LOG.Write(eEvent.ERR_RF, Module, "Telegram structure is not correct"); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    break; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                default: 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    // 默认代码块 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    break; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                IsPowerOn = GetBitValue(message[4], 4);               
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                if (GetBitValue(message[4], 4)) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    Status = GeneratorStatus.ON; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                else 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    Status = GeneratorStatus.OFF; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                switch (message[5]) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    case 0x01://ParamRead 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        if (message.Length == 18 && message[6]==0x14) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            int DataValue = BitConverter.ToInt32(new byte[] { message[11], message[12], message[13], message[14] }, 0); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            ReflectPower = DataValue; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        }else if (message.Length == 18 && message[6] == 0x12) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            int DataValue1 = BitConverter.ToInt32(new byte[] { message[11], message[12], message[13], message[14] }, 0); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            ForwardPower = DataValue1; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        break; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    case 0x02://ParamWrite 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        break; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    case 0xFE://TelegramError 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        LOG.Write(eEvent.ERR_RF, Module, "Telegram structure is not correct"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        break; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    default: 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        // 默认代码块 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        break; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                switch (message[9]) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    case 0x26: 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        Status = GeneratorStatus.OFF; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        IsPowerOn = false; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        break; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    case 0x24: 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        LOG.Write(eEvent.ERR_RF, Module, "Telegram structure is not correct"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        break; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    default: 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        // 默认代码块 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                        break; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             } 
															 | 
															
															 | 
															
																             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            catch (Exception ex)  
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            { } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -113,27 +184,61 @@ namespace Venus_RT.Devices 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         public override void SetPower(float val) 
															 | 
															
															 | 
															
																         public override void SetPower(float val) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //var power = !_scEnableCalibration.BoolValue ? val : CalibrationData(val, true); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            ForwardPower=val; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             List<byte> baseBytes = new List<byte>() { 0xAA, 0x02, 0x0B, 0x00, 0x02, 0x06, 0x00, 0x01, 0x00, 0x04 }; 
															 | 
															
															 | 
															
																             List<byte> baseBytes = new List<byte>() { 0xAA, 0x02, 0x0B, 0x00, 0x02, 0x06, 0x00, 0x01, 0x00, 0x04 }; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             byte[] valueBytes = BitConverter.GetBytes((int)val); 
															 | 
															
															 | 
															
																             byte[] valueBytes = BitConverter.GetBytes((int)val); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             baseBytes.AddRange(valueBytes); 
															 | 
															
															 | 
															
																             baseBytes.AddRange(valueBytes); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             baseBytes = CRC16(baseBytes.ToArray()); 
															 | 
															
															 | 
															
																             baseBytes = CRC16(baseBytes.ToArray()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            baseBytes.Add(0x55); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            baseBytes.Add(0x55);            
															 | 
														
													
												
													
														
															| 
															 | 
															
																             _serial.Write(baseBytes.ToArray()); 
															 | 
															
															 | 
															
																             _serial.Write(baseBytes.ToArray()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        public override bool SetPowerOnOff(bool on, out string str) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        public override void Monitor() 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            readpi(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            readpr(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        public void getcontrol() 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            byte[] getincontrol = new byte[] { 0xAA, 0x02, 0x06, 0x00, 0x05, 0x01, 0x00, 0x00, 0xFF, 0x34, 0x8A, 0x55 }; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            _serial.Write(getincontrol.ToArray()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        public void releasecontrol() 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            byte[] getincontrol = new byte[] { 0xAA, 0x02, 0x06, 0x00, 0x05, 0x02, 0x00, 0x00, 0xFF, 0xE8, 0x11, 0x55 }; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            _serial.Write(getincontrol.ToArray()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        public void readpr()//reflect 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            byte[] getincontrol = new byte[] { 0xAA, 0x02, 0x06, 0x00, 0x01, 0x14, 0x00, 0x01, 0xFF, 0xE1, 0x97, 0x55 }; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            _serial.Write(getincontrol.ToArray()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        public void readpi()//forward 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            byte[] getincontrola = new byte[] { 0xAA, 0x02, 0x06, 0x00, 0x01, 0x12, 0x00, 0x01, 0xFF, 0x78, 0xB0, 0x55 }; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            _serial.Write(getincontrola.ToArray()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        public void ResetCommand() 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            LOG.Write(eEvent.ERR_RF, Module, $"Send rest"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            byte[] getincontrol = new byte[] { 0xAA, 0x02, 0x0B, 0x00, 0x02, 0x4D, 0x00, 0x01, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x30, 0x72, 0x55 }; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            _serial.Write(getincontrol.ToArray()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        public override void Reset() 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            byte[] getincontrol = new byte[] { 0xAA, 0x02, 0x0B, 0x00, 0x02, 0x4D, 0x00, 0x01, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x30, 0x72, 0x55 }; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            _serial.Write(getincontrol.ToArray()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        public override bool SetPowerOnOff(bool on, out string str) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        {            
															 | 
														
													
												
													
														
															| 
															 | 
															
																             str = ""; 
															 | 
															
															 | 
															
																             str = ""; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             var _chamber = DEVICE.GetDevice<JetPMBase>(Module); 
															 | 
															
															 | 
															
																             var _chamber = DEVICE.GetDevice<JetPMBase>(Module); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             if (on && !_chamber.CheckGeneratorAndHVInterlock(VenusDevice.Rf)) 
															 | 
															
															 | 
															
																             if (on && !_chamber.CheckGeneratorAndHVInterlock(VenusDevice.Rf)) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             { 
															 | 
															
															 | 
															
																             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 return false; 
															 | 
															
															 | 
															
																                 return false; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             } 
															 | 
															
															 | 
															
																             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            getcontrol(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             List<byte> baseBytes = new List<byte>() { 0xAA, 0x02, 0x0B, 0x00, 0x02, 0x6F, 0x00, 0x01, 0x00, 0x07 }; 
															 | 
															
															 | 
															
																             List<byte> baseBytes = new List<byte>() { 0xAA, 0x02, 0x0B, 0x00, 0x02, 0x6F, 0x00, 0x01, 0x00, 0x07 }; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             if (on == true) 
															 | 
															
															 | 
															
																             if (on == true) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            {           
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 baseBytes.AddRange(new List<byte> { 0x01, 0x00, 0x00, 0x00 }); 
															 | 
															
															 | 
															
																                 baseBytes.AddRange(new List<byte> { 0x01, 0x00, 0x00, 0x00 }); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             } 
															 | 
															
															 | 
															
																             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             else 
															 | 
															
															 | 
															
																             else 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -143,6 +248,10 @@ namespace Venus_RT.Devices 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             baseBytes = CRC16(baseBytes.ToArray()); 
															 | 
															
															 | 
															
																             baseBytes = CRC16(baseBytes.ToArray()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             baseBytes.Add(0x55); 
															 | 
															
															 | 
															
																             baseBytes.Add(0x55); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             _serial.Write(baseBytes.ToArray()); 
															 | 
															
															 | 
															
																             _serial.Write(baseBytes.ToArray()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if (on == false) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                releasecontrol(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             return true; 
															 | 
															
															 | 
															
																             return true; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         public override void SetPulseMode(bool on) 
															 | 
															
															 | 
															
																         public override void SetPulseMode(bool on) 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -264,14 +373,6 @@ namespace Venus_RT.Devices 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         private const ushort S3_HEAD_LENGTH = 2; 
															 | 
															
															 | 
															
																         private const ushort S3_HEAD_LENGTH = 2; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         private readonly DeviceTimer _timerQueryStatus = new DeviceTimer(); 
															 | 
															
															 | 
															
																         private readonly DeviceTimer _timerQueryStatus = new DeviceTimer(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         private int QUERY_INTERVAL = 1000; 
															 | 
															
															 | 
															
																         private int QUERY_INTERVAL = 1000; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        //private int                      _scMatchPresetMode; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        //private int                      _scMatchMode; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        //private readonly SCConfigItem    _scMatchPositionC1; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        //private readonly SCConfigItem    _scMatchPositionC2; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        //private readonly bool            _scEnableC1C2Position; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        // --------------------------Properties------------------------ 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        // 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         [Subscription("MatchWorkMode")] 
															 | 
															
															 | 
															
																         [Subscription("MatchWorkMode")] 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         public EnumRfMatchTuneMode WorkMode { get; set; } 
															 | 
															
															 | 
															
																         public EnumRfMatchTuneMode WorkMode { get; set; } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         public float C1 { get; set; } 
															 | 
															
															 | 
															
																         public float C1 { get; set; } 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -298,28 +399,8 @@ namespace Venus_RT.Devices 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         public TruPlasmaMatch(ModuleName mod, VenusDevice device) : base(mod.ToString(), device.ToString()) 
															 | 
															
															 | 
															
																         public TruPlasmaMatch(ModuleName mod, VenusDevice device) : base(mod.ToString(), device.ToString()) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             var portNum = SC.GetStringValue($"{mod}.{device}.Port"); 
															 | 
															
															 | 
															
																             var portNum = SC.GetStringValue($"{mod}.{device}.Port"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            _serial = new AsyncSerialPort(portNum, 9600, 8); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //_scMatchPresetMode    = SC.GetValue<int>($"{Module}.Rf.PresetMode"); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //_scMatchMode          = SC.GetValue<int>($"{Module}.Rf.MatchMode"); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //_scMatchPositionC1    = SC.GetConfigItem($"{Module}.Rf.MatchPositionC1"); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //_scMatchPositionC2    = SC.GetConfigItem($"{Module}.Rf.MatchPositionC2"); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //_scEnableC1C2Position = SC.GetValue<bool>($"{Module}.Rf.EnableC1C2Position"); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            SerachCommandList = new List<string>() 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            AdTecMatchMessage.READ_POS, 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            AdTecMatchMessage.START_QUERY 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            }; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+           _serial = new AsyncSerialPort(portNum, 9600, 8, System.IO.Ports.Parity.None, System.IO.Ports.StopBits.One, "/r", false); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             intervalTime = 100; 
															 | 
															
															 | 
															
																             intervalTime = 100; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            sendDataChangedEvent += TruMatch_sendDataChangedEvent; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            baseStopwatch.Start(); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            baseTimer.Enabled = true; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        } 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        private void TruMatch_sendDataChangedEvent(string obj) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            this.SendCmd(obj); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         ~TruPlasmaMatch() 
															 | 
															
															 | 
															
																         ~TruPlasmaMatch() 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -379,38 +460,21 @@ namespace Venus_RT.Devices 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 SetMatchMode((string)param[0] == "Auto" ? EnumRfMatchTuneMode.Auto : EnumRfMatchTuneMode.Manual, out reason); 
															 | 
															
															 | 
															
																                 SetMatchMode((string)param[0] == "Auto" ? EnumRfMatchTuneMode.Auto : EnumRfMatchTuneMode.Manual, out reason); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 return true; 
															 | 
															
															 | 
															
																                 return true; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             }); 
															 | 
															
															 | 
															
																             }); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            _timerQueryStatus.Start(QUERY_INTERVAL); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            this.SendCmd(AdTecMatchMessage.START_QUERY); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //LOG.Write(eEvent.ERR_RF, Module, "Initialize done."); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             return true; 
															 | 
															
															 | 
															
																             return true; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         public override void Monitor() 
															 | 
															
															 | 
															
																         public override void Monitor() 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //try 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //{ 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //    if (_timerQueryStatus.IsTimeout()) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //    { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //        this.SendCmd(AdTecMatchMessage.READ_POS); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //        _timerQueryStatus.Start(QUERY_INTERVAL); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //    } 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //} 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //catch (Exception ex) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //{ 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //    LOG.WriteExeption(ex); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //} 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         public override void Terminate() 
															 | 
															
															 | 
															
																         public override void Terminate() 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            this.SendCmd(AdTecMatchMessage.STOP_QUERY); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         public override void Reset() 
															 | 
															
															 | 
															
																         public override void Reset() 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //SendCmd(AdTecMatchMessage.STOP_QUERY); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         /// <summary> 
															 | 
															
															 | 
															
																         /// <summary> 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -421,25 +485,11 @@ namespace Venus_RT.Devices 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         ///  
															 | 
															
															 | 
															
																         ///  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         private void executeMatchPostion(float c1, float c2) 
															 | 
															
															 | 
															
																         private void executeMatchPostion(float c1, float c2) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //SetWorkMode(EnumRfMatchTuneMode.Manual); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            ////await Task.Delay(200); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																             SetPosition(c1, c2); 
															 | 
															
															 | 
															
																             SetPosition(c1, c2); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //await Task.Delay(200); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //SetPresetMemory(0); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //await Task.Delay(200); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            // SetWorkMode(EnumRfMatchTuneMode.Auto); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         public override void SetMatchPosition(float c1, float c2, out string reason) 
															 | 
															
															 | 
															
																         public override void SetMatchPosition(float c1, float c2, out string reason) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            float DataValue = BitConverter.ToSingle(new byte[] { 0x9A, 0x99, 0x19,0x3F }, 0); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            byte[] floatAsBytes = BitConverter.GetBytes(DataValue); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            float DataValue1= BitConverter.ToSingle(new byte[] { floatAsBytes[0], floatAsBytes[1], floatAsBytes[2], floatAsBytes[3] }, 0); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //LOG.Write(eEvent.WARN_RF, Module, $"AdTec Match error [{c1}, {c2}]"); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            base.SetMatchPosition(c1, c2, out reason); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             executeMatchPostion(c1, c2); 
															 | 
															
															 | 
															
																             executeMatchPostion(c1, c2); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																             reason = ""; 
															 | 
															
															 | 
															
																             reason = ""; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -453,17 +503,17 @@ namespace Venus_RT.Devices 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         // 
															 | 
															
															 | 
															
																         // 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         private void SerialBinaryPortDataReceived(byte[] message) 
															 | 
															
															 | 
															
																         private void SerialBinaryPortDataReceived(byte[] message) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            if(message.Count()==0) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if (message.Count()<10) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             { 
															 | 
															
															 | 
															
																             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 LOG.Write(eEvent.ERR_RF, Module, "收到 Match 数据为空"); 
															 | 
															
															 | 
															
																                 LOG.Write(eEvent.ERR_RF, Module, "收到 Match 数据为空"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        return; 
															 | 
															
															 | 
															
																                        return; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             } 
															 | 
															
															 | 
															
																             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             else  
															 | 
															
															 | 
															
																             else  
															 | 
														
													
												
													
														
															| 
															 | 
															
																             { 
															 | 
															
															 | 
															
																             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                if (message[0] ==0x1D && message[6]==0x60 && message[7] == 0x00) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                if (message[0] ==0x1D && message[8]==0x60) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 { 
															 | 
															
															 | 
															
																                 { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    this.TunePosition1 = BitConverter.ToSingle(new byte[] { message[10], message[11], message[12], message[13] }, 0) * 10; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    this.TunePosition2 = BitConverter.ToSingle(new byte[] { message[14], message[15], message[16], message[17] }, 0) * 10; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    TunePosition1 = BitConverter.ToSingle(new byte[] { message[10], message[11], message[12], message[13] }, 0) * 100; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    TunePosition2 = BitConverter.ToSingle(new byte[] { message[14], message[15], message[16], message[17] }, 0) * 100; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     switch (message[7]) 
															 | 
															
															 | 
															
																                     switch (message[7]) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     { 
															 | 
															
															 | 
															
																                     { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         case 0x01: 
															 | 
															
															 | 
															
																                         case 0x01: 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -477,37 +527,25 @@ namespace Venus_RT.Devices 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             break;                            
															 | 
															
															 | 
															
																                             break;                            
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         default: 
															 | 
															
															 | 
															
																                         default: 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             break; 
															 | 
															
															 | 
															
																                             break; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    } 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                     
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    }                                        
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 } 
															 | 
															
															 | 
															
																                 } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            } 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            } 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-         
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            }                
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         private void SerialPortErrorOccurred(string str) 
															 | 
															
															 | 
															
																         private void SerialPortErrorOccurred(string str) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             LOG.Write(eEvent.ERR_RF, Module, $"AdTec Match error [{str}]"); 
															 | 
															
															 | 
															
																             LOG.Write(eEvent.ERR_RF, Module, $"AdTec Match error [{str}]"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        private void SendCmd(string str) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            _serial?.Write(str + "\r"); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //EV.PostInfoLog(Module.ToString(), $"Match send [{str}]"); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        } 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         private void SetPosition(float c1val, float c2val) 
															 | 
															
															 | 
															
																         private void SetPosition(float c1val, float c2val) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             List<byte> Len = new List<byte>() { 0x16, 0xE9}; 
															 | 
															
															 | 
															
																             List<byte> Len = new List<byte>() { 0x16, 0xE9}; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            List<byte> DstSrc = new List<byte>() { 0x00, 0x0A, 0x00, 0x00}; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            List<byte> DstSrc = new List<byte>() { 0x00, 0x02, 0x00, 0x01}; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             List<byte> Cmd = new List<byte> { 0x60, 0x40 }; 
															 | 
															
															 | 
															
																             List<byte> Cmd = new List<byte> { 0x60, 0x40 }; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             byte[] val1Bytes = BitConverter.GetBytes(c1val / 100); 
															 | 
															
															 | 
															
																             byte[] val1Bytes = BitConverter.GetBytes(c1val / 100); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             byte[] val2Bytes = BitConverter.GetBytes(c2val / 100); 
															 | 
															
															 | 
															
																             byte[] val2Bytes = BitConverter.GetBytes(c2val / 100); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            List<byte> Act = new List<byte>() { 0x64 }; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            List<byte> Ctr123 = new List<byte> { 0x08, 0x01, 0x80 };             
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            List<byte> Act = new List<byte>() { 0x00 }; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            List<byte> Ctr123 = new List<byte> { 0x08, 0x00, 0x00 }; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             List<byte> baseBytes = new List<byte>() { }; 
															 | 
															
															 | 
															
																             List<byte> baseBytes = new List<byte>() { }; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             baseBytes.AddRange(Len); 
															 | 
															
															 | 
															
																             baseBytes.AddRange(Len); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             baseBytes.AddRange(DstSrc); 
															 | 
															
															 | 
															
																             baseBytes.AddRange(DstSrc); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -516,37 +554,31 @@ namespace Venus_RT.Devices 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             baseBytes.AddRange(val2Bytes); 
															 | 
															
															 | 
															
																             baseBytes.AddRange(val2Bytes); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             baseBytes.AddRange(Act); 
															 | 
															
															 | 
															
																             baseBytes.AddRange(Act); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             baseBytes.AddRange(Ctr123); 
															 | 
															
															 | 
															
																             baseBytes.AddRange(Ctr123); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            byte ack=0x00; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            int a = 0; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             for (int i=2; i< baseBytes.Count;i++) 
															 | 
															
															 | 
															
																             for (int i=2; i< baseBytes.Count;i++) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             { 
															 | 
															
															 | 
															
																             { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                ack += baseBytes[i]; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                a+=(Int16)baseBytes[i]; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             } 
															 | 
															
															 | 
															
																             } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            baseBytes.Add(ack); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //SetPointCommandQueue.Add(cmd); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            byte []ackture= new byte[2]; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+             
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            byte[]ackbyte= BitConverter.GetBytes(a); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            ackture[0] = ackbyte[1]; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            ackture[1] = ackbyte[0]; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            baseBytes.AddRange(ackture); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             _serial.Write(baseBytes.ToArray()); 
															 | 
															
															 | 
															
																             _serial.Write(baseBytes.ToArray()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         public override bool SetMatchMode(EnumRfMatchTuneMode enumRfMatchTuneMode, out string reason) 
															 | 
															
															 | 
															
																         public override bool SetMatchMode(EnumRfMatchTuneMode enumRfMatchTuneMode, out string reason) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             reason = string.Empty; 
															 | 
															
															 | 
															
																             reason = string.Empty; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            SetWorkMode(enumRfMatchTuneMode); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																- 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             return true; 
															 | 
															
															 | 
															
																             return true; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         private void SetWorkMode(EnumRfMatchTuneMode mode) 
															 | 
															
															 | 
															
																         private void SetWorkMode(EnumRfMatchTuneMode mode) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //string data = mode == EnumRfMatchTuneMode.Auto ? AdTecMatchMessage.AUTO : 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //    mode == EnumRfMatchTuneMode.Manual ? AdTecMatchMessage.MANUAL : ""; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //this.SendCmd(mode == EnumRfMatchTuneMode.Auto ? AdTecMatchMessage.AUTO : 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //    mode == EnumRfMatchTuneMode.Manual ? AdTecMatchMessage.MANUAL : ""); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //SetPointCommandQueue.Add(data); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         private void SetPresetMemory(byte gear) 
															 | 
															
															 | 
															
																         private void SetPresetMemory(byte gear) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //this.SendCmd(AdTecMatchMessage.PRESET_MEM + gear.ToString()); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            //SetPointCommandQueue.Add(AdTecMatchMessage.PRESET_MEM + gear.ToString()); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     } 
															 | 
															
															 | 
															
																     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 } 
															 | 
															
															 | 
															
																 } 
															 |