public IWork Work(DayTime dayTime, IHandleBigData bigData, string name)
        {
            if (CurrentWo == null)
            {
                if (Buffer.Count > 0)
                {
                    CurrentWo             = Buffer.Dequeue();
                    CurrentInspectionTime = _inspectionTime;
                }
                return(null);
            }

            IWork answer = null;

            CurrentInspectionTime--;
            if (CurrentInspectionTime == 0)
            {
                answer    = CurrentWo;
                CurrentWo = null;

                answer.NonConformance = bigData.IsNonConformance(name);
                if (!answer.NonConformance)
                {
                    answer.SetNextOp();
                }
            }

            return(answer);
        }
Beispiel #2
0
        public void Work(DayTime dayTime)
        {
            if (!Queue.Any())
            {
                return;
            }

            if (_stage_counter == 0)
            {
                IWork process = Queue.Dequeue();
                process.SetNextOp();
                OutputBuffer.Enqueue(process);
                _stage_counter = COUNTER_RESET_VALUE;
            }

            _stage_counter--;
        }