Пример #1
0
        bool RecoverActiveSlaveCommand(MOG_Command pActiveSlave)
        {
            bool bRecovered = false;

            // Make sure we have a valid slave specified?
            if (pActiveSlave != null)
            {
                // Make sure this slave actually has an active command
                if (pActiveSlave.GetCommand() != null)
                {
                    // Get the job of this slave's command
                    MOG_JobInfo job = (MOG_JobInfo)mActiveJobs[pActiveSlave.GetCommand().GetJobLabel()];
                    if (job != null)
                    {
                        bRecovered = job.RecoverCommand(pActiveSlave.GetCommand());
                    }
                }
            }

            return(bRecovered);
        }
Пример #2
0
        internal bool AddCommand(MOG_Command pCommand)
        {
            bool bAdded = false;

            MOG_JobInfo job = (MOG_JobInfo)mActiveJobs[pCommand.GetJobLabel()];

            if (job == null)
            {
                // Create a new job
                job = new MOG_JobInfo(this);
                mJobOrder.Add(job);
                mActiveJobs[pCommand.GetJobLabel()] = job;
            }

            // Make sure we have a valid job?
            if (job != null)
            {
                // Add this command to the identified job
                bAdded = job.AddCommand(pCommand);
            }

            return(bAdded);
        }