refactor: 将Framework库和RT、UI放在同一个解决方案中。

This commit is contained in:
SL
2026-06-01 17:48:28 +08:00
parent 1948f4290d
commit b73d39a6b1
4331 changed files with 506148 additions and 49363 deletions
@@ -0,0 +1,101 @@
using Aitex.Core.Util;
using Aitex.Sorter.Common;
using SicRT.Modules.Schedulers;
using MECF.Framework.Common.Equipment;
using MECF.Framework.Common.SubstrateTrackings;
using SicModules.TMs;
using SicRT.Equipments.Systems;
namespace SicRT.Scheduler
{
public class SchedulerTMRobot : SchedulerModule
{
public override bool IsAvailable => _tmRobot.IsIdle && _tmRobot.IsOnline && CheckTaskDone();
public override bool IsOnline => _tmRobot.IsOnline;
public override bool IsError => _tmRobot.IsError;
private TMModuleBase _tmRobot = null;
private Hand _taskHand;
private ModuleName _target;
public bool IsInPumping => ((_task == TaskType.Pick || _task == TaskType.Place) &&
(_target == ModuleName.UnLoad || _target == ModuleName.LoadLock ||
_target == ModuleName.Load));
public SchedulerTMRobot() : base(ModuleName.TMRobot.ToString())
{
_tmRobot = Singleton<EquipmentManager>.Instance.Modules[ModuleName.TM] as TMModuleBase;
}
public bool IsReadyForPick(Hand blade)
{
return WaferManager.Instance.CheckNoWafer(ModuleName.TMRobot, (int)blade);
}
public bool IsReadyForPlace(Hand blade)
{
return WaferManager.Instance.CheckHasWafer(ModuleName.TMRobot, (int)blade);
}
public bool Pick(ModuleName target, int slot, Hand hand)
{
if (_tmRobot.Pick(target, hand, slot, out string reason))
{
_task = TaskType.Pick;
_taskHand = hand;
_target = target;
LogTaskStart(_task, $"{target}.{slot + 1}=>{Module}.{hand}");
}
return true;
}
public bool Place(ModuleName target, int slot, Hand hand)
{
if (_tmRobot.Place(target, hand, slot, out string reason))
{
_task = TaskType.Place;
_taskHand = hand;
_target = target;
LogTaskStart(_task, $"{Module}.{hand}=>{target}.{slot + 1}");
}
return true;
}
public bool Goto(ModuleName chamber, int slot, Hand hand)
{
return true;
}
public bool Monitor()
{
return true;
}
public bool CheckTaskDone()
{
var taskSucceed = false;
switch (_task)
{
case TaskType.None:
taskSucceed = true;
break;
case TaskType.Pick:
taskSucceed = WaferManager.Instance.CheckHasTray(ModuleName.TMRobot, (int)_taskHand);
break;
case TaskType.Place:
taskSucceed = WaferManager.Instance.CheckNoTray(ModuleName.TMRobot, (int)_taskHand);
break;
}
return SuperCheckTaskDone(taskSucceed, _tmRobot.IsIdle | _tmRobot.IsError);
}
}
}