Example #1
0
        public ReadStatusMachine(MachineParameters config, IRTSender rtSender, int updateT, int timeoutT, int maxretry)
        {
            this.maxretry = maxretry;
            this.updateT  = updateT;
            this.timeoutT = timeoutT;

            this.config   = config;
            this.rtSender = rtSender;

            updateWait = new EventWaitHandle(false, EventResetMode.AutoReset);
        }
 public ProgramBuilder_Excellon(ProgramBuilder builder,
                                IMachine machine,
                                IMillManager toolManager,
                                MachineParameters config,
                                IRTSender rtSender,
                                IModbusSender modbusSender)
 {
     this.builder      = builder;
     this.machine      = machine;
     this.toolManager  = toolManager;
     this.config       = config;
     this.rtSender     = rtSender;
     this.modbusSender = modbusSender;
 }
 public SyncRTSender(IRTSender rtSender)
 {
     waitResponse                       = new EventWaitHandle(false, EventResetMode.ManualReset);
     this.rtSender                      = rtSender;
     this.rtSender.Debug               += RTSender_Debug;
     this.rtSender.Error               += RTSender_Error;
     this.rtSender.Reseted             += RTSender_Reseted;
     this.rtSender.Queued              += RTSender_Queued;
     this.rtSender.Dropped             += RTSender_Dropped;
     this.rtSender.Started             += RTSender_Started;
     this.rtSender.Failed              += RTSender_Failed;
     this.rtSender.Completed           += RTSender_Completed;
     this.rtSender.SlotsNumberReceived += RTSender_SlotsNumberReceived;
     this.rtSender.EmptySlotAppeared   += RTSender_EmptySlotAppeared;
     this.rtSender.EmptySlotsEnded     += RTSender_EmptySlotsEnded;
 }
Example #4
0
        public RTAction(IRTSender sender, IRTCommand command)
        {
            this.sender                      = sender;
            this.sender.Queued              += OnQueuedHdl;
            this.sender.Dropped             += OnDroppedHdl;
            this.sender.Started             += OnStartedHdl;
            this.sender.Completed           += OnCompletedHdl;
            this.sender.Failed              += OnFailedHdl;
            this.sender.EmptySlotAppeared   += OnEmptySlotHdl;
            this.sender.EmptySlotsEnded     += OnEmptySlotsEndedHdl;
            this.sender.SlotsNumberReceived += OnSpaceReceived;
            Command = command;

            ContiniousBlockCompleted = new EventWaitHandle(false, EventResetMode.ManualReset);
            ReadyToRun = new EventWaitHandle(sender.HasSlots, EventResetMode.ManualReset);
            Started    = new EventWaitHandle(false, EventResetMode.ManualReset);
            Finished   = new EventWaitHandle(false, EventResetMode.ManualReset);

            Failed    = false;
            Aborted   = false;
            CommandId = -1;
        }
        public ProgramBuilder(GCodeMachine.GCodeMachine machine,
                              IStateSyncManager stateSyncManager,
                              IRTSender rtSender,
                              IModbusSender modbusSender,
                              IMillManager toolManager,
                              MachineParameters config,
                              IReadOnlyDictionary <int, IDriver> tool_drivers)
        {
            this.stateSyncManager = stateSyncManager;
            this.machine          = machine;
            this.rtSender         = rtSender;
            this.modbusSender     = modbusSender;
            this.toolManager      = toolManager;
            this.config           = config;

            moveFeedLimiter = new MoveFeedLimiter(this.config);
            optimizer       = new MoveOptimizer(this.config);
            timeCalculator  = new ExpectedTimeCalculator();
            axisStateStack  = new Stack <AxisState.Parameters>();
            toolsPending    = new List <int>();

            this.tool_drivers = tool_drivers;
        }
 public GPIO_driver(IRTSender sender, int gpio)
 {
     this.gpio   = gpio;
     this.sender = sender;
 }