public abstract class AbstractMachine extends AbstractModelObject implements Machine
Modifier and Type | Class and Description |
---|---|
static class |
AbstractMachine.State
History:
Note: Can't actually use the @Version annotation because of a bug in SimpleXML.
|
PropertySheetHolder.PropertySheet
Modifier and Type | Field and Description |
---|---|
protected IdentifiableList<Actuator> |
actuators |
protected IdentifiableList<Axis> |
axes |
protected IdentifiableList<Camera> |
cameras |
protected Location |
discardLocation |
protected IdentifiableList<Driver> |
drivers |
protected java.util.concurrent.ThreadPoolExecutor |
executor |
protected IdentifiableList<Feeder> |
feeders |
protected IdentifiableList<Head> |
heads |
protected java.util.Set<MachineListener> |
listeners |
protected IdentifiableList<NozzleTip> |
nozzleTips |
protected IdentifiableList<PartAlignment> |
partAlignments |
protected java.util.HashMap<java.lang.String,java.lang.Object> |
properties |
protected IdentifiableList<Signaler> |
signalers |
protected double |
speed |
protected java.lang.Thread |
taskThread |
propertyChangeSupport
DEFAULT_TASK_BUSY_TIMEOUT_MS
Modifier | Constructor and Description |
---|---|
protected |
AbstractMachine() |
Modifier and Type | Method and Description |
---|---|
void |
addActuator(Actuator actuator) |
void |
addAxis(Axis axis) |
void |
addCamera(Camera camera) |
void |
addDriver(Driver driver) |
void |
addFeeder(Feeder feeder) |
void |
addHead(Head head) |
void |
addListener(MachineListener listener) |
void |
addNozzleTip(NozzleTip nozzleTip) |
void |
addSignaler(Signaler signaler) |
protected void |
commit() |
<T> T |
execute(java.util.concurrent.Callable<T> callable,
boolean onlyIfEnabled,
long busyTimeout,
long executeTimeout)
Execute a task to be run with access to the Machine.
|
void |
findIssues(Solutions solutions)
Report any detected issue and proposed solution in the list.
|
void |
fireMachineAboutToBeDisabled(java.lang.String reason) |
void |
fireMachineActuatorActivity(Actuator actuator) |
void |
fireMachineBusy(boolean busy) |
void |
fireMachineDisabled(java.lang.String reason) |
void |
fireMachineDisableFailed(java.lang.String reason) |
void |
fireMachineEnabled() |
void |
fireMachineEnableFailed(java.lang.String reason) |
void |
fireMachineHeadActivity(Head head) |
void |
fireMachineHomed(boolean isHomed) |
void |
fireMachineTargetedUserAction(HeadMountable hm,
boolean jogging) |
Actuator |
getActuator(java.lang.String id)
Get the Actuator attached to this Machine and not to a Head that has the specified id.
|
Actuator |
getActuatorByName(java.lang.String name) |
java.util.List<Actuator> |
getActuators()
Get a list of Actuators that are attached to this Machine and not to a Head.
|
java.util.List<Actuator> |
getAllActuators()
Gets a list of all Actuator attached to the Machine and to all the Heads.
|
java.util.List<Camera> |
getAllCameras()
Gets a list of all Cameras attached to the Machine and to all the Heads.
|
java.util.List<Axis> |
getAxes()
Gets a List of Axes attached to the Machine.
|
Axis |
getAxis(java.lang.String id) |
Camera |
getCamera(java.lang.String id) |
java.util.List<Camera> |
getCameras()
Gets a List of Cameras attached to the Machine that are not attached to Heads.
|
AbstractAxis |
getDefaultAxis(Axis.Type type)
Find a default machine axis by type.
|
Head |
getDefaultHead() |
Location |
getDiscardLocation() |
Driver |
getDriver(java.lang.String id) |
java.util.List<Driver> |
getDrivers()
Gets a List of Drivers attached to the Machine.
|
Feeder |
getFeeder(java.lang.String id) |
Feeder |
getFeederByName(java.lang.String name) |
java.util.List<Feeder> |
getFeeders()
Gets a List of Feeders attached to the Machine.
|
Head |
getHead(java.lang.String id) |
Head |
getHeadByName(java.lang.String name) |
java.util.List<Head> |
getHeads()
Gets all active heads on the machine.
|
NozzleTip |
getNozzleTip(java.lang.String id) |
NozzleTip |
getNozzleTipByName(java.lang.String name) |
java.util.List<NozzleTip> |
getNozzleTips()
Get a list of the NozzleTips currently attached to the Nozzle.
|
java.util.List<PartAlignment> |
getPartAlignments() |
java.lang.Object |
getProperty(java.lang.String name) |
javax.swing.Icon |
getPropertySheetHolderIcon() |
Signaler |
getSignaler(java.lang.String id) |
Signaler |
getSignalerByName(java.lang.String name) |
java.util.List<Signaler> |
getSignalers()
Gets a List of Signalers attached to the Machine.
|
double |
getSpeed() |
protected java.lang.Thread |
getTaskThread() |
void |
home()
Commands all Heads to perform visual homing if available.
|
boolean |
isBusy() |
boolean |
isTask(java.lang.Thread thread)
Determines whether the given thread is a task thread currently executed by the machine.
|
void |
permutateActuator(Actuator actuator,
int direction) |
void |
permutateAxis(Axis axis,
int direction) |
void |
permutateCamera(Camera camera,
int direction) |
void |
permutateDriver(Driver driver,
int direction) |
void |
removeActuator(Actuator actuator) |
void |
removeAxis(Axis axis) |
void |
removeCamera(Camera camera) |
void |
removeDriver(Driver driver) |
void |
removeFeeder(Feeder feeder) |
void |
removeListener(MachineListener listener) |
void |
removeNozzleTip(NozzleTip nozzleTip) |
void |
removeSignaler(Signaler signaler) |
void |
setDiscardLocation(Location discardLocation) |
void |
setProperty(java.lang.String name,
java.lang.Object value) |
void |
setSpeed(double speed) |
protected void |
setTaskThread(java.lang.Thread taskThread) |
<T> java.util.concurrent.Future<T> |
submit(java.util.concurrent.Callable<T> callable) |
<T> java.util.concurrent.Future<T> |
submit(java.util.concurrent.Callable<T> callable,
<any> callback) |
<T> java.util.concurrent.Future<T> |
submit(java.util.concurrent.Callable<T> callable,
<any> callback,
boolean ignoreEnabled)
Submit a task to be run with access to the Machine.
|
java.util.concurrent.Future<java.lang.Object> |
submit(java.lang.Runnable runnable) |
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute, execute, executeIfEnabled, getCompatibleActuatorClasses, getCompatibleAxisClasses, getCompatibleCameraClasses, getCompatibleDriverClasses, getCompatibleFeederClasses, getCompatibleMotionPlannerClasses, getCompatibleNozzleClasses, getCompatibleSignalerClasses, getFiducialLocator, getHomeAfterEnabled, getMotionPlanner, getPnpJobProcessor, getUnsafeZRoamingDistance, isAutoToolSelect, isEnabled, isHomed, isParkAfterHomed, isPoolScriptingEngines, isSafeZPark, setEnabled, setHomed
getConfigurationWizard
getChildPropertySheetHolders, getPropertySheetHolderActions, getPropertySheetHolderTitle, getPropertySheets
getSubjectIcon, getSubjectText
protected IdentifiableList<Axis> axes
protected IdentifiableList<Head> heads
protected IdentifiableList<Signaler> signalers
protected IdentifiableList<Feeder> feeders
protected IdentifiableList<Camera> cameras
protected IdentifiableList<Actuator> actuators
protected IdentifiableList<PartAlignment> partAlignments
protected IdentifiableList<Driver> drivers
protected Location discardLocation
protected double speed
protected java.util.HashMap<java.lang.String,java.lang.Object> properties
protected IdentifiableList<NozzleTip> nozzleTips
protected java.util.Set<MachineListener> listeners
protected java.util.concurrent.ThreadPoolExecutor executor
protected volatile java.lang.Thread taskThread
protected void commit()
public void addHead(Head head)
public java.util.List<Axis> getAxes()
Machine
public AbstractAxis getDefaultAxis(Axis.Type type)
type
- public java.util.List<Head> getHeads()
Machine
public Head getHeadByName(java.lang.String name)
getHeadByName
in interface Machine
public java.util.List<Signaler> getSignalers()
Machine
getSignalers
in interface Machine
public Signaler getSignaler(java.lang.String id)
getSignaler
in interface Machine
public Signaler getSignalerByName(java.lang.String name)
getSignalerByName
in interface Machine
public java.util.List<Feeder> getFeeders()
Machine
getFeeders
in interface Machine
public java.util.List<Camera> getCameras()
Machine
getCameras
in interface Machine
public java.util.List<Camera> getAllCameras()
Machine
getAllCameras
in interface Machine
public java.util.List<Driver> getDrivers()
Machine
getDrivers
in interface Machine
public java.util.List<PartAlignment> getPartAlignments()
getPartAlignments
in interface Machine
public java.util.List<Actuator> getActuators()
Machine
getActuators
in interface Machine
public java.util.List<Actuator> getAllActuators()
Machine
getAllActuators
in interface Machine
public Actuator getActuator(java.lang.String id)
Machine
getActuator
in interface Machine
public Actuator getActuatorByName(java.lang.String name)
getActuatorByName
in interface Machine
public Feeder getFeederByName(java.lang.String name)
getFeederByName
in interface Machine
public void home() throws java.lang.Exception
Machine
public void addListener(MachineListener listener)
addListener
in interface Machine
public void removeListener(MachineListener listener)
removeListener
in interface Machine
public void addAxis(Axis axis) throws java.lang.Exception
public void removeAxis(Axis axis)
removeAxis
in interface Machine
public void permutateAxis(Axis axis, int direction)
permutateAxis
in interface Machine
public void addFeeder(Feeder feeder) throws java.lang.Exception
public void removeFeeder(Feeder feeder)
removeFeeder
in interface Machine
public void addCamera(Camera camera) throws java.lang.Exception
public void removeCamera(Camera camera)
removeCamera
in interface Machine
public void permutateCamera(Camera camera, int direction)
permutateCamera
in interface Machine
public void addActuator(Actuator actuator) throws java.lang.Exception
addActuator
in interface Machine
java.lang.Exception
public void removeActuator(Actuator actuator)
removeActuator
in interface Machine
public void permutateActuator(Actuator actuator, int direction)
permutateActuator
in interface Machine
public void addDriver(Driver driver) throws java.lang.Exception
public void removeDriver(Driver driver)
removeDriver
in interface Machine
public void permutateDriver(Driver driver, int direction)
permutateDriver
in interface Machine
public void addSignaler(Signaler signaler) throws java.lang.Exception
addSignaler
in interface Machine
java.lang.Exception
public void removeSignaler(Signaler signaler)
removeSignaler
in interface Machine
public void fireMachineHeadActivity(Head head)
public void fireMachineTargetedUserAction(HeadMountable hm, boolean jogging)
public void fireMachineActuatorActivity(Actuator actuator)
public void fireMachineEnabled()
public void fireMachineEnableFailed(java.lang.String reason)
public void fireMachineAboutToBeDisabled(java.lang.String reason)
public void fireMachineDisabled(java.lang.String reason)
public void fireMachineDisableFailed(java.lang.String reason)
public void fireMachineHomed(boolean isHomed)
public void fireMachineBusy(boolean busy)
public javax.swing.Icon getPropertySheetHolderIcon()
getPropertySheetHolderIcon
in interface PropertySheetHolder
public java.util.concurrent.Future<java.lang.Object> submit(java.lang.Runnable runnable)
public <T> java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T> callable)
public <T> java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T> callable, <any> callback)
public <T> java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T> callable, <any> callback, boolean ignoreEnabled)
Machine
public <T> T execute(java.util.concurrent.Callable<T> callable, boolean onlyIfEnabled, long busyTimeout, long executeTimeout) throws java.lang.Exception
Machine
execute
in interface Machine
onlyIfEnabled
- True if the task must only be executed if the machine is enabled.busyTimeout
- If the machine is busy executing other submitted task, the execution
will be rejected when the timeout (in milliseconds) expires, throwing a TimeoutException.
This will typically happen, when a long-running operation like a Job is pending.executeTimeout
- If the execution takes longer than this time (in milliseconds) the
method throws a TimeoutException. Note the callable will still continue after that.java.lang.Exception
protected java.lang.Thread getTaskThread()
protected void setTaskThread(java.lang.Thread taskThread)
public boolean isTask(java.lang.Thread thread)
Machine
public boolean isBusy()
public Head getDefaultHead() throws java.lang.Exception
getDefaultHead
in interface Machine
java.lang.Exception
public Location getDiscardLocation()
getDiscardLocation
in interface Machine
public void setDiscardLocation(Location discardLocation)
public java.lang.Object getProperty(java.lang.String name)
getProperty
in interface Machine
public void setProperty(java.lang.String name, java.lang.Object value)
setProperty
in interface Machine
public java.util.List<NozzleTip> getNozzleTips()
Machine
getNozzleTips
in interface Machine
public void addNozzleTip(NozzleTip nozzleTip) throws java.lang.Exception
addNozzleTip
in interface Machine
java.lang.Exception
public void removeNozzleTip(NozzleTip nozzleTip)
removeNozzleTip
in interface Machine
public NozzleTip getNozzleTip(java.lang.String id)
getNozzleTip
in interface Machine
public NozzleTip getNozzleTipByName(java.lang.String name)
getNozzleTipByName
in interface Machine
public void findIssues(Solutions solutions)
Solutions.Subject
findIssues
in interface Solutions.Subject