123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- 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<RecipeStep> 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<bool, bool> 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<PMEntity>(Module.ToString(), (int)PMState.Init, 100);
- }
- }
- }
|