| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 | using Aitex.Core.RT.Log;using Aitex.Core.RT.SCCore;using MECF.Framework.Common.Communications;using MECF.Framework.Common.Device.Bases;using MECF.Framework.Common.Equipment;using System;using System.Collections;using System.Collections.Generic;using System.Linq;using System.Net;using System.Text;using System.Threading.Tasks;using Venus_Core;namespace Venus_RT.Devices{    static class RevtechMatchMessage    {        public const string EOF                     = "\n";        public const string QUERY_STATE_INFORMATION = "MATCH:FETCH?";        public const string SET_C1_POS              = "MATCH:POS:C1";        public const string SET_C2_POS              = "MATCH:POS:C2";        public const string SET_WORK_MODE           = "MATCH:MODE";    }    public class RevtechMatch : RfMatchBase    {        private AsyncSocketDevice _socket;        public RevtechMatch(ModuleName mod, string address) : base(mod.ToString(), VenusDevice.Match.ToString())        {            _socket = new AsyncSocketDevice(address);            _socket.OnDataChanged += new AsyncSocketDevice.MessageHandler(OnDataChanged);            SerachCommandList = new List<string>()            {            SkyPumpMessage.READ_DATA            };            sendDataChangedEvent += RevtechMatch_sendDataChangedEvent;            baseStopwatch.Start();            baseTimer.Enabled = true;        }        private void RevtechMatch_sendDataChangedEvent(string obj)        {            //var newstr = obj + "\r";            //_serial?.Write(newstr);        }        public void OnDataChanged(byte[] rawMessage)        {            string data = System.Text.Encoding.Default.GetString(rawMessage);        }        public override void SetMatchPosition(float c1, float c2, out string reason)        {                      reason = "";        }    }}
 |