ControlWorker

public class ControlWorker extends Timer

A Timer which schedules a task that regularly queries the AnalysisWorker for batched output, and passes it on to the controller, then gets the controller’s output and passes it on to the laser.

Author:Marcel Stefko

Constructors

ControlWorker

public ControlWorker(AnalysisWorker analysis_worker, Controller controller, Laser laser)

Initialize the ControlWorker

Parameters:
  • analysis_worker – AnalysisWorker which will be queried for output
  • controller – Controller to which output of AnalysisWorker is fed
  • laser – Laser to which output of Controller is fed

Methods

getLastControllerOutput

public double getLastControllerOutput()
Returns:last controller output

scheduleExecution

public void scheduleExecution(long delay_ms, long period_ms)

The task of this worker will be executed regularly.

Parameters:
  • delay_ms – initial delay
  • period_ms – period of the task