public WorkingState(AssemblyStationState previous) : base(previous)
        {
            AssemblyStation.StInput = false;
            AssemblyStation.Run     = true;
            var workingTime = (byte)new Random().Next(30, 61);

            Debug.WriteLine($"Working time: {workingTime}s");
            _tokenSource       = new CancellationTokenSource();
            _cancellationToken = _tokenSource.Token;
            _stationRunner     = new Task(() => DoStationWork(workingTime), _cancellationToken);
            _stationRunner.Start();
        }
Example #2
0
 public IdleState(AssemblyStationState previous) : base(previous)
 {
 }
Example #3
0
 public InterventionState(AssemblyStationState previous) : base(previous)
 {
     AssemblyStation.Intervention = true;
 }
 public BlockedState(AssemblyStationState previous) : base(previous)
 {
     AssemblyStation.Blocked = true;
 }
Example #5
0
 public AlarmState(AssemblyStationState previous) : base(previous)
 {
     AssemblyStation.Alarm = true;
 }
 public ExcludedState(AssemblyStationState previous) : base(previous)
 {
     AssemblyStation.Excluded = true;
 }