using System; using System.Collections.Generic; using System.Threading; using System.Diagnostics; using System.Linq; using Aitex.Core.Common; using Aitex.Core.RT.DataCenter; using Aitex.Core.RT.Device; using Aitex.Core.RT.Event; using Aitex.Core.RT.Fsm; using Aitex.Core.RT.OperationCenter; using Aitex.Core.RT.Routine; using Aitex.Core.RT.SCCore; using Aitex.Core.Util; using Aitex.Sorter.Common; using MECF.Framework.Common.DataCenter; using MECF.Framework.Common.Equipment; using MECF.Framework.Common.Schedulers; using MECF.Framework.Common.SubstrateTrackings; using Venus_Core; using Venus_RT.Devices; using Venus_RT.Modules; using Venus_RT.Modules.PMs; namespace Venus_RT.Modules.PMs { public class RecipeRunningInfo { public Guid InnerId { get; set; } public RecipeHead Head { get; set; } public List RecipeStepList { get; set; } public string RecipeName { get; set; } public DateTime BeginTime { get; set; } public DateTime EndTime { get; set; } public int StepNumber { get; set; } public string StepName { get; set; } public double StepTime { get; set; } public double StepElapseTime { get; set; } public double TotalTime { get; set; } public double TotalElapseTime { get; set; } } public class PMEntity : Entity, IModuleEntity { public enum MSG { Home, Transfer, PrepareTransfer, PostTransfer, Reset, Abort, Error, LaunchPump, Pump, Vent, CyclePurge, Heat, TransferHandoff, StartTransfer, LeakCheck, MoveLiftPin, MoveGuidePin, Process, RunRecipe, PostProcess, RecipeSkipStep, RecipeUpdate, RecipeResume, RecipePause, RecipeAbort, PreProcess, AutoMode, ManualMode, LockLid, Online, Offline, GasFlow, StopGasFlow, RfPower, MaxMsg } public ModuleName Module { get; } public Action TransferPrepared; public bool IsIdle { get; } public bool IsError { get; } public bool IsInit { get;// { return fsm.State == (int)PMState.Init; } } public bool IsBusy { get { return !IsInit && !IsError && !IsIdle; } } public bool Check(int msg, out string reason, object[] objs) { reason = ""; return true; } public int Invoke(string function, params object[] args) { //switch (function) //{ // //case "Home": // // CheckToPostMessage((int)MSG.Home); // // return (int)MSG.Home; //} return (int)FSM_MSG.NONE; } public bool CheckAcked(int msg) { return fsm.CheckExecuted(msg); } public PMEntity(ModuleName module) { fsm = new StateMachine(Module.ToString(), (int)PMState.Init, 100); } } }