using Aitex.Core.RT.Routine;
using MECF.Framework.Common.Equipment;
using SicModules.PMs.Routines.Base;

namespace SicModules.PMs.Routines.Recipe
{
    public class PostPMMacroRoutine : PMBaseRoutine
    {
        enum RoutineStep
        {

        }


        public PostPMMacroRoutine(ModuleName module, PMModule pm1) : base(module, pm1)
        {
            Module = module.ToString();  
            Name   = "PostPMMacro";
        }

        public override Result Start(params object[] objs)
        {
            Reset();

            Notify("Start");
            return Result.RUN;
        }

        public override Result Monitor()
        {
            try
            {
               
            }
            catch (RoutineBreakException)
            {
                return Result.RUN;
            }
            catch (RoutineFaildException)
            {
                return Result.FAIL;
            }

            Notify("Finished");

            return Result.DONE;
        }

        public override void Abort()
        {
            PmDevice.AbortRunProcess(out string reason);
        }
    }
}
