Class AbstractReferenceDriver
- java.lang.Object
-
- org.openpnp.model.AbstractModelObject
-
- org.openpnp.spi.base.AbstractDriver
-
- org.openpnp.machine.reference.driver.AbstractReferenceDriver
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,Identifiable,Named,Solutions.Subject,Driver,PropertySheetHolder,WizardConfigurable
- Direct Known Subclasses:
GcodeDriver,NeoDen4Driver
public abstract class AbstractReferenceDriver extends AbstractDriver
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractReferenceDriver.CommunicationsType-
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 protected booleanallowUnhomedMotionprotected java.lang.IntegerbaudDeprecated.protected AbstractReferenceDriver.CommunicationsTypecommunicationsTypeprotected booleanconnectionKeepAliveprotected SerialPortCommunications.DataBitsdataBitsDeprecated.protected SerialPortCommunications.FlowControlflowControlDeprecated.protected Driver.MotionControlTypemotionControlTypeprotected SerialPortCommunications.ParityparityDeprecated.protected java.lang.StringportNameDeprecated.protected SerialPortCommunicationsserialprotected java.lang.BooleansetDtrDeprecated.protected java.lang.BooleansetRtsDeprecated.protected SimulatedCommunicationssimulatedprotected SerialPortCommunications.StopBitsstopBitsDeprecated.protected booleansyncInitialLocationprotected TcpCommunicationstcp-
Fields inherited from class org.openpnp.spi.base.AbstractDriver
deleteAction, id, name, permutateDownAction, permutateUpAction
-
Fields inherited from class org.openpnp.model.AbstractModelObject
propertyChangeSupport
-
-
Constructor Summary
Constructors Constructor Description AbstractReferenceDriver()
-
Method Summary
-
Methods inherited from class org.openpnp.spi.base.AbstractDriver
assignCameraVirtualAxes, createAxisMappingDefaults, createDefaults, getAxes, getChildPropertySheetHolders, getFeedRatePerSecond, getId, getMinimumRate, getName, getPropertySheetHolderActions, getPropertySheetHolderIcon, getPropertySheetHolderTitle, isSupportingPreMove, migrateAxis, migrateDriver, setId, setName, 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, delay, getInterpolationJerkSteps, getInterpolationMaxSteps, getInterpolationMinStep, getInterpolationTimeStep, getJunctionDeviation, getReportedLocation, getUnits, home, isMotionPending, isUsingLetterVariables, moveTo, setGlobalOffsets, waitForCompletion
-
Methods inherited from interface org.openpnp.model.Solutions.Subject
findIssues, getSubjectIcon, getSubjectText
-
-
-
-
Field Detail
-
motionControlType
protected Driver.MotionControlType motionControlType
-
serial
protected SerialPortCommunications serial
-
tcp
protected TcpCommunications tcp
-
simulated
protected SimulatedCommunications simulated
-
communicationsType
protected AbstractReferenceDriver.CommunicationsType communicationsType
-
connectionKeepAlive
protected boolean connectionKeepAlive
-
syncInitialLocation
protected boolean syncInitialLocation
-
allowUnhomedMotion
protected boolean allowUnhomedMotion
-
portName
@Deprecated protected java.lang.String portName
Deprecated.TODO The following properties are for backwards compatibility and can be removed after 2019-07-15.
-
baud
@Deprecated protected java.lang.Integer baud
Deprecated.
-
flowControl
@Deprecated protected SerialPortCommunications.FlowControl flowControl
Deprecated.
-
dataBits
@Deprecated protected SerialPortCommunications.DataBits dataBits
Deprecated.
-
stopBits
@Deprecated protected SerialPortCommunications.StopBits stopBits
Deprecated.
-
parity
@Deprecated protected SerialPortCommunications.Parity parity
Deprecated.
-
setDtr
@Deprecated protected java.lang.Boolean setDtr
Deprecated.
-
setRts
@Deprecated protected java.lang.Boolean setRts
Deprecated.
-
-
Method Detail
-
commit
public void commit()
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-
disconnect
public abstract void disconnect() throws java.lang.Exception- Throws:
java.lang.Exception
-
getMotionControlType
public Driver.MotionControlType getMotionControlType()
- Returns:
- The MotionControlType that determines how the OpenPnP MotionPlanner will do its planning and how it will talk to the controller.
-
setMotionControlType
public void setMotionControlType(Driver.MotionControlType motionControlType)
-
getCommunicationsType
public AbstractReferenceDriver.CommunicationsType getCommunicationsType()
-
setCommunicationsType
public void setCommunicationsType(AbstractReferenceDriver.CommunicationsType communicationsType)
-
getSerial
public SerialPortCommunications getSerial()
-
getTcp
public TcpCommunications getTcp()
-
isConnectionKeepAlive
public boolean isConnectionKeepAlive()
-
setConnectionKeepAlive
public void setConnectionKeepAlive(boolean connectionKeepAlive)
-
isSyncInitialLocation
public boolean isSyncInitialLocation()
- Returns:
- true if the driver should synchronize its initial position after enabling.
-
setSyncInitialLocation
public void setSyncInitialLocation(boolean syncInitialLocation)
-
isAllowUnhomedMotion
public boolean isAllowUnhomedMotion()
- Returns:
- true if the driver allows motion on an unhomed machine.
-
setAllowUnhomedMotion
public void setAllowUnhomedMotion(boolean allowUnhomedMotion)
-
isInSimulationMode
public boolean isInSimulationMode()
-
getCommunications
public ReferenceDriverCommunications getCommunications()
-
getLineEndingType
public ReferenceDriverCommunications.LineEndingType getLineEndingType()
-
setLineEndingType
public void setLineEndingType(ReferenceDriverCommunications.LineEndingType lineEndingType)
-
getPortName
public java.lang.String getPortName()
-
setPortName
public void setPortName(java.lang.String portName)
-
getBaud
public int getBaud()
-
setBaud
public void setBaud(int baud)
-
getFlowControl
public SerialPortCommunications.FlowControl getFlowControl()
-
setFlowControl
public void setFlowControl(SerialPortCommunications.FlowControl flowControl)
-
getDataBits
public SerialPortCommunications.DataBits getDataBits()
-
setDataBits
public void setDataBits(SerialPortCommunications.DataBits dataBits)
-
getStopBits
public SerialPortCommunications.StopBits getStopBits()
-
setStopBits
public void setStopBits(SerialPortCommunications.StopBits stopBits)
-
getParity
public SerialPortCommunications.Parity getParity()
-
setParity
public void setParity(SerialPortCommunications.Parity parity)
-
isSetDtr
public boolean isSetDtr()
-
setSetDtr
public void setSetDtr(boolean setDtr)
-
isSetRts
public boolean isSetRts()
-
setSetRts
public void setSetRts(boolean setRts)
-
getIpAddress
public java.lang.String getIpAddress()
-
setIpAddress
public void setIpAddress(java.lang.String ipAddress)
-
getPort
public int getPort()
-
setPort
public void setPort(int port)
-
setEnabled
public void setEnabled(boolean enabled) throws java.lang.ExceptionDescription copied from interface:DriverAttempts to enable the Driver, turning on all outputs.- Throws:
java.lang.Exception
-
getPropertySheets
public PropertySheetHolder.PropertySheet[] getPropertySheets()
- Specified by:
getPropertySheetsin interfacePropertySheetHolder- Overrides:
getPropertySheetsin classAbstractDriver
-
getConfigurationWizard
public Wizard getConfigurationWizard()
Description copied from interface:WizardConfigurableGets a Wizard that can be used to configure this object.- Returns:
-
unescape
public static java.lang.String unescape(java.lang.String s)
-
-