Пример #1
0
        /// <summary>
        /// host端测试Remote Control场景相关功能
        /// </summary>
        /// <returns></returns>
        public bool LaunchHostCommandProcess(RCMD hostCommand)
        {
            //var hostCommand = HostCommand.START;
            var rcs = scenarioControllers[Scenarios.Recipe_Management] as RemoteControl;

            return(rcs.LaunchHostCommand(hostCommand));
        }
        /// <summary>
        /// Host端测试接口: 发送Host Command
        /// </summary>
        /// <param name="hostCommand"></param>
        /// <returns></returns>
        public bool LaunchHostCommand(RCMD hostCommand)
        {
            //var stack = new Stack<List<Item>>();
            //stack.Push(new List<Item>());
            //stack.Peek().Add(A($"{(Int32)hostCommand}"));
            //stack.Push(new List<Item>());
            //stack.Push(new List<Item>());
            //stack.Peek().Add(A("PTID"));
            //stack.Peek().Add(A("PTID"));
            //stack.Push(new List<Item>());
            //stack.Peek().Add(A("CSTID"));
            //stack.Peek().Add(A("CSTID"));
            //stack.Push(new List<Item>());
            //stack.Peek().Add(A("LOTID"));
            //stack.Peek().Add(A("CSTID"));
            //var item = ParseItem(stack);

            //var replyMsg = S2F41(item, (int)hostCommand);
            //if (replyMsg != null && replyMsg.GetSFString() == "S4F42")
            //{
            //    try
            //    {
            //        int ack = replyMsg.GetCommandValue();
            //        if (ack == (int)hostCommand)
            //        {
            //            return true;
            //        }
            //    }
            //    catch (InvalidOperationException)
            //    {
            //        return false;
            //    }
            //}
            return(false);
        }
Пример #3
0
        /// <summary>
        /// Remote Control Scenario:
        /// Process (Start/Cancel/Abort/Pause/Resume/Operator Call)
        /// Report
        /// </summary>
        /// <param name="rcmd"></param>
        /// <param name="processLaunchReport"></param>
        /// <param name="equipmentInfo"></param>
        /// <returns></returns>
        public bool LaunchProcessReport(RCMD rcmd, ProcessLaunchReport processLaunchReport, EquipmentInfo equipmentInfo)
        {
            var rc = scenarioControllers[Scenarios.Remote_Control] as RemoteControl;

            return(rc.LaunchProcessReport(rcmd, processLaunchReport, equipmentInfo.EquipmentStatus));
        }
        /// <summary>
        /// Process Report
        /// CEID: 301=>start, 304=>cancel, 305=>abort, 306=>pause, 307=>resume
        /// </summary>
        /// <returns></returns>
        public bool LaunchProcessReport(RCMD rcmd,
                                        ProcessLaunchReport processLaunchReport,
                                        EquipmentStatus equipmentStatus)
        {
            int ceid = 0;

            switch (rcmd)
            {
            case RCMD.START:
                ceid = 301;
                break;

            case RCMD.CANCEL:
                ceid = 304;
                break;

            case RCMD.ABORT:
                ceid = 305;
                break;

            case RCMD.PAUSE:
                ceid = 306;
                break;

            case RCMD.RESUME:
                ceid = 307;
                break;

            case RCMD.OPERATOR_CALL:
            default:
                break;
            }
            if (ceid <= 0)
            {
                CIMBASE.WriteLog(AATS.Log.LogLevel.ERROR, "CEID value is out of range. CEID: " + ceid);
                return(false);
            }
            ProcessLaunchReport newReport = new ProcessLaunchReport(0, ceid, 100, equipmentStatus, 301)
            {
                LOTID     = processLaunchReport.LOTID,
                PTID      = processLaunchReport.PTID,
                PTTYPE    = processLaunchReport.PTTYPE,
                PTUSETYPE = processLaunchReport.PTUSETYPE,
                CSTID     = processLaunchReport.CSTID,
                PPID      = processLaunchReport.PPID,
            };
            var replyMsg = S6F11(newReport.SecsItem, (int)ceid);

            if (replyMsg != null && replyMsg.GetSFString() == "S6F12")
            {
                try
                {
                    int ack = replyMsg.GetCommandValue();
                    if (ack == 0)
                    {
                        return(true);
                    }
                }
                catch (InvalidOperationException ex)
                {
                    CIMBASE.WriteLog(AATS.Log.LogLevel.ERROR, "", ex);
                    return(false);
                }
            }
            CIMBASE.WriteLog(AATS.Log.LogLevel.ERROR, "something wrong was happened when send process report");
            return(false);
        }
Пример #5
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            string str = $"Control Command: {RCMD.ToString()}, PTID: {PTID}, CSTID: {CSTID}, LOTID: { CSTID}, LOTID: {LOTID}, OPCALL: { OPCALL}";

            return(str);
        }