示例#1
0
        //TODO: move this somewhere better?
        public void ReassignTray(ITrayDetector src, ITrayDetector dst)
        {
            // Now this station is trayless and toStation owns the tray.
            var tray = src.Tray;

            // set null first since this logs the 'moved from' event.
            src.Tray = null;
            // Now ok to assign tray to destination, which logs the 'moved to' event.
            dst.Tray = tray;
            if (tray != null)
            {
                tray.CurrentStation = dst as IStation;
            }
        }
示例#2
0
        public static DynamicConfiguration CreateTrayMoverConfig(ITrayDetector source, ITrayHandler destination, IInstrument instrument, object sourceLocker)
        {
            var transport     = instrument.FindStation("Transportation");
            var machineConfig = new DynamicConfiguration(BuilderTypes.TrayMovingMachineBuilder);

            machineConfig.Data.DestinationStation = destination;
            machineConfig.Data.SourceStation      = source;
            machineConfig.Data.Instrument         = instrument;
            machineConfig.Data.Transport          = transport as ITransport;
            machineConfig.Data.NumberOfRetries    = 0;
            machineConfig.Data.SourceLockOwner    = sourceLocker;

            machineConfig.Data.ProcessType = CodeProcess.MoveTray;
            machineConfig.Data.ProcessName = CodeProcess.MoveTray.ToString();

            return(machineConfig);
        }
示例#3
0
 //TODO: move this somewhere better?
 public void SetActivityReassignTray(ITrayDetector src, ITrayDetector dst)
 {
     AddActivity(new DynamicActivity(Name + ".ReassignTray(" + src.Name + "->" + dst.Name + ")",
                                     () => ReassignTray(src, dst)));
 }
示例#4
0
        public static DynamicConfiguration CreateTransportOperationConfig(TransportOperation operation, ITrayDetector station, ITransport transport, IInstrument instrument, object sourceLocker, ITransportDock destination = null)
        {
            var config = new DynamicConfiguration(BuilderTypes.TransportOperationMachineBuilder);

            config.Data.Instrument            = instrument;
            config.Data.Station               = station;
            config.Data.Transport             = transport;
            config.Data.TransportOperation    = operation;
            config.Data.SourceLockOwner       = sourceLocker;
            config.Data.MoveCancellationToken = new MoveCancellationToken();
            // This will be the time allotted to each transport operation machine.
            config.Data.ExpirationTimespan = new TimeSpan(0, 0, 1, 15);
            // The source as an obstruction is only relevant for CompletePickup from Stainer.
            if (destination != null)
            {
                config.Data.DestinationZLocation = destination.DockZ;
            }
            return(config);
        }