Package org.openpnp.spi.base
Class AbstractDriver
- java.lang.Object
-
- org.openpnp.model.AbstractModelObject
-
- org.openpnp.spi.base.AbstractDriver
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,Identifiable
,Named
,Solutions.Subject
,Driver
,PropertySheetHolder
,WizardConfigurable
- Direct Known Subclasses:
AbstractReferenceDriver
,NullDriver
public abstract class AbstractDriver extends AbstractModelObject implements Driver
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openpnp.spi.Driver
Driver.MotionControlType
-
Nested classes/interfaces inherited from interface org.openpnp.spi.PropertySheetHolder
PropertySheetHolder.PropertySheet
-
-
Field Summary
Fields Modifier and Type Field Description javax.swing.Action
deleteAction
protected java.lang.String
id
protected java.lang.String
name
javax.swing.Action
permutateDownAction
javax.swing.Action
permutateUpAction
-
Fields inherited from class org.openpnp.model.AbstractModelObject
propertyChangeSupport
-
-
Constructor Summary
Constructors Constructor Description AbstractDriver()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
assignCameraVirtualAxes(ReferenceMachine machine, Camera hm)
protected void
createAxisMappingDefaults(ReferenceMachine machine)
void
createDefaults()
java.util.List<ControllerAxis>
getAxes(ReferenceMachine machine)
PropertySheetHolder[]
getChildPropertySheetHolders()
Length
getFeedRatePerSecond()
java.lang.String
getId()
Length
getMinimumRate(int order)
java.lang.String
getName()
javax.swing.Action[]
getPropertySheetHolderActions()
javax.swing.Icon
getPropertySheetHolderIcon()
java.lang.String
getPropertySheetHolderTitle()
PropertySheetHolder.PropertySheet[]
getPropertySheets()
boolean
isSupportingPreMove()
protected ReferenceControllerAxis
migrateAxis(ReferenceMachine machine, Axis.Type type, java.lang.String suffix)
void
migrateDriver(Machine machine)
Deprecated.void
setId(java.lang.String id)
void
setName(java.lang.String name)
java.lang.String
toString()
-
Methods inherited from class org.openpnp.model.AbstractModelObject
addPropertyChangeListener, addPropertyChangeListener, dispose, dumpListeners, fireIndexedPropertyChange, firePropertyChange, isListener, isListener, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openpnp.spi.Driver
actuate, actuate, actuate, actuatorRead, actuatorRead, getInterpolationJerkSteps, getInterpolationMaxSteps, getInterpolationMinStep, getInterpolationTimeStep, getJunctionDeviation, getMotionControlType, getReportedLocation, getUnits, home, isAllowUnhomedMotion, isMotionPending, isSyncInitialLocation, isUsingLetterVariables, moveTo, setEnabled, setGlobalOffsets, waitForCompletion
-
Methods inherited from interface org.openpnp.model.Solutions.Subject
findIssues, getSubjectIcon, getSubjectText
-
Methods inherited from interface org.openpnp.spi.WizardConfigurable
getConfigurationWizard
-
-
-
-
Method Detail
-
getId
public java.lang.String getId()
- Specified by:
getId
in interfaceIdentifiable
-
setId
public void setId(java.lang.String id)
-
isSupportingPreMove
public boolean isSupportingPreMove()
- Specified by:
isSupportingPreMove
in interfaceDriver
-
getMinimumRate
public Length getMinimumRate(int order)
- Specified by:
getMinimumRate
in interfaceDriver
- Parameters:
order
- Derivative order, velocity (1), acceleration (2), jerk (3)- Returns:
- The minimum velocity, acceleration, jerk the driver supports. Used to prevent "rounded to zero" errors in decimal formatting and interpolation.
-
getFeedRatePerSecond
public Length getFeedRatePerSecond()
- Specified by:
getFeedRatePerSecond
in interfaceDriver
- Returns:
- A driver specific feed-rate limit, applied in addition to axis feed-rate limits and according to NIST RS274NGC Interpreter - Version 3, Section 2.1.2.5 (p. 7). Given per second (will be converted to the standard per minute rate when using Gcode F values).
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getAxes
public java.util.List<ControllerAxis> getAxes(ReferenceMachine machine)
-
createAxisMappingDefaults
protected void createAxisMappingDefaults(ReferenceMachine machine) throws java.lang.Exception
- Throws:
java.lang.Exception
-
assignCameraVirtualAxes
protected void assignCameraVirtualAxes(ReferenceMachine machine, Camera hm) throws java.lang.Exception
- Throws:
java.lang.Exception
-
migrateAxis
protected ReferenceControllerAxis migrateAxis(ReferenceMachine machine, Axis.Type type, java.lang.String suffix) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getPropertySheets
public PropertySheetHolder.PropertySheet[] getPropertySheets()
- Specified by:
getPropertySheets
in interfacePropertySheetHolder
-
getPropertySheetHolderActions
public javax.swing.Action[] getPropertySheetHolderActions()
- Specified by:
getPropertySheetHolderActions
in interfacePropertySheetHolder
-
getPropertySheetHolderIcon
public javax.swing.Icon getPropertySheetHolderIcon()
- Specified by:
getPropertySheetHolderIcon
in interfacePropertySheetHolder
-
getChildPropertySheetHolders
public PropertySheetHolder[] getChildPropertySheetHolders()
- Specified by:
getChildPropertySheetHolders
in interfacePropertySheetHolder
-
getPropertySheetHolderTitle
public java.lang.String getPropertySheetHolderTitle()
- Specified by:
getPropertySheetHolderTitle
in interfacePropertySheetHolder
-
createDefaults
public void createDefaults() throws java.lang.Exception
- Throws:
java.lang.Exception
-
migrateDriver
@Deprecated public void migrateDriver(Machine machine) throws java.lang.Exception
Deprecated.Migrates the driver for the new global axes implementation. Is marked a deprecated as it can be removed along with the old GcodeDriver Axes implementation, once migration of users is expected to be complete.- Parameters:
machine
-- Throws:
java.lang.Exception
-
-