首次上传

This commit is contained in:
hanqiangqiang
2026-06-15 10:56:30 +08:00
commit b0213b94d6
4160 changed files with 736101 additions and 0 deletions
@@ -0,0 +1,35 @@
using System.Linq;
using System.Text;
using MECF.Framework.Common.Communications;
namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Aligners.HiWinAligner.Handlers
{
public abstract class HwAlignerGuideHandler : HandlerBase
{
public HwAlignerGuide Device { get; }
protected HwAlignerGuideHandler(HwAlignerGuide device, string command)
: base(BuildMessage(command))
{
Device = device;
}
private static byte[] BuildMessage(string command)
{
var liCmd = Encoding.ASCII.GetBytes(command).ToList<byte>();
liCmd.Add(0x0d); //CR
liCmd.Add(0x0a); //LF 不可颠倒
return liCmd.ToArray();
}
public override bool HandleMessage(MessageBase msg, out bool handled)
{
var result = msg as HwAlignerGuideMessage;
ResponseMessage = msg;
handled = true;
return true;
}
}
}
@@ -0,0 +1,32 @@
using System;
using MECF.Framework.Common.Communications;
namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Aligners.HiWinAligner.Handlers
{
public class HwAlignerGuideSetHandler : HwAlignerGuideHandler
{
public HwAlignerGuideSetHandler(HwAlignerGuide device, string name, string command, int timeout = 30)
: base(device, command)
{
AckTimeout = TimeSpan.FromSeconds(timeout);
CompleteTimeout = TimeSpan.FromSeconds(timeout);
Name = name;
device.SetCurrentOper();
}
public override bool HandleMessage(MessageBase msg, out bool handled)
{
handled = false;
var result = msg as HwAlignerGuideMessage;
if (result is { IsResponse: false })
{
handled = true;
return false;
}
handled = Device.ParseData(Name, result.Data, out var returnIfo);
return returnIfo;
}
}
}
@@ -0,0 +1,31 @@
using System;
using MECF.Framework.Common.Communications;
namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Aligners.HiWinAligner.Handlers
{
public class HwAlignerWaferCheckHandler : HwAlignerGuideHandler
{
public HwAlignerWaferCheckHandler(HwAlignerGuide device, int timeout = 100)
: base(device, "DOC")
{
AckTimeout = TimeSpan.FromSeconds(timeout);
CompleteTimeout = TimeSpan.FromSeconds(timeout);
Name = device.Name;
device.HaveWafer = false;
device.SetCurrentOper();
}
public override bool HandleMessage(MessageBase msg, out bool handled)
{
var result = msg as HwAlignerGuideMessage;
if (result is { IsResponse: false })
{
handled = true;
return false;
}
handled = Device.CheckWaferDataA(Name, result.Data, out var returnIfo);
return returnIfo;
}
}
}