Skip to content
Snippets Groups Projects
Commit 107cc9cd authored by Thomas Oster's avatar Thomas Oster
Browse files

Estimate Job Duration is optional

parent fbe19d4b
No related branches found
No related tags found
No related merge requests found
......@@ -153,13 +153,27 @@ public abstract class LaserCutter implements Cloneable
*/
public abstract void setSettingValue(String attribute, String value);
/**
* Override this method, return true and override the
* estimateJobDuration-method to allow Programs to use
* your driver to estimate the duration of a job before
* executing
* @return
*/
public boolean canEstimateJobDuration()
{
return false;
}
/**
* Returns an estimated time, how long the job would take
* in seconds
* @param job
* @return
*/
public abstract int estimateJobDuration(LaserJob job);
public int estimateJobDuration(LaserJob job)
{
throw new RuntimeException("Method not implemented");
}
public LaserProperty getLaserPropertyForVectorPart()
{
......
......@@ -848,6 +848,12 @@ abstract class EpilogCutter extends LaserCutter
return Arrays.asList(attributes);
}
@Override
public boolean canEstimateJobDuration()
{
return true;
}
@Override
public int estimateJobDuration(LaserJob job)
{
......
......@@ -813,12 +813,6 @@ public class LaosCutter extends LaserCutter
}
}
@Override
public int estimateJobDuration(LaserJob job)
{
return 10000;
}
@Override
public LaserCutter clone()
{
......
......@@ -544,11 +544,6 @@ public class Lasersaur extends LaserCutter {
}
}
@Override
public int estimateJobDuration(LaserJob job) {
return 10000;
}
@Override
public LaserCutter clone() {
Lasersaur clone = new Lasersaur();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment