Package org.openpnp.spi.base
Class AbstractFeeder
- java.lang.Object
-
- org.openpnp.model.AbstractModelObject
-
- org.openpnp.spi.base.AbstractFeeder
-
- All Implemented Interfaces:
Identifiable,Named,Solutions.Subject,Feeder,PropertySheetHolder,WizardConfigurable
- Direct Known Subclasses:
ReferenceFeeder
public abstract class AbstractFeeder extends AbstractModelObject implements Feeder
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openpnp.spi.Feeder
Feeder.FeederEmptyException, Feeder.Priority
-
Nested classes/interfaces inherited from interface org.openpnp.spi.PropertySheetHolder
PropertySheetHolder.PropertySheet
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanenabledprotected intfeedRetryCountprotected java.lang.Stringidprotected java.lang.Stringnameprotected Partpartprotected java.lang.StringpartIdprotected intpickRetryCountprotected Feeder.Prioritypriorityprotected java.lang.IntegerretryCountNote: This is feedRetryCount in reality.-
Fields inherited from class org.openpnp.model.AbstractModelObject
propertyChangeSupport
-
-
Constructor Summary
Constructors Constructor Description AbstractFeeder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanTakeBackPart()intgetFeedRetryCount()If feed() throws an Exception during job processing, the job processor will retry the feed() call this many times before raising the error.java.lang.StringgetId()java.lang.StringgetName()PartgetPart()Get the Part that is loaded into this Feeder.intgetPickRetryCount()If post pick checks such as isPartOn() fail during job processing, the job processor will retry the pick and check process this many times before raising the error.Feeder.PrioritygetPriority()javax.swing.IcongetPropertySheetHolderIcon()PropertySheetHolder.PropertySheet[]getPropertySheets()booleanisEnabled()Return true is the Feeder is currently enabled and can be considered in Job planning.voidpostPick(Nozzle nozzle)voidsetEnabled(boolean enabled)voidsetFeedRetryCount(int feedRetryCount)voidsetName(java.lang.String name)voidsetPart(Part part)Set the Part that is loaded into this Feeder.voidsetPickRetryCount(int pickRetryCount)voidsetPriority(Feeder.Priority priority)voidtakeBackPart(Nozzle nozzle)Asks the feeder to take back the part currently on the nozzle.-
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, toString, wait, wait, wait
-
Methods inherited from interface org.openpnp.spi.Feeder
feed, getJobPreparationLocation, getPickLocation, isPartHeightAbovePickLocation, prepareForJob
-
Methods inherited from interface org.openpnp.spi.PropertySheetHolder
getChildPropertySheetHolders, getPropertySheetHolderActions, getPropertySheetHolderTitle
-
Methods inherited from interface org.openpnp.model.Solutions.Subject
findIssues, getSubjectIcon, getSubjectText
-
Methods inherited from interface org.openpnp.spi.WizardConfigurable
getConfigurationWizard
-
-
-
-
Field Detail
-
id
protected java.lang.String id
-
name
protected java.lang.String name
-
enabled
protected boolean enabled
-
partId
protected java.lang.String partId
-
retryCount
protected java.lang.Integer retryCount
Note: This is feedRetryCount in reality. It was left as retryCount for backwards compatibility when pickRetryCount was added. TODO Migration has been added and this can be removed after 2021-12-29.
-
feedRetryCount
protected int feedRetryCount
-
pickRetryCount
protected int pickRetryCount
-
part
protected Part part
-
priority
protected Feeder.Priority priority
-
-
Method Detail
-
getId
public java.lang.String getId()
- Specified by:
getIdin interfaceIdentifiable
-
isEnabled
public boolean isEnabled()
Description copied from interface:FeederReturn true is the Feeder is currently enabled and can be considered in Job planning.
-
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabledin interfaceFeeder
-
setPart
public void setPart(Part part)
Description copied from interface:FeederSet the Part that is loaded into this Feeder.
-
getPart
public Part getPart()
Description copied from interface:FeederGet the Part that is loaded into this Feeder.
-
getPropertySheetHolderIcon
public javax.swing.Icon getPropertySheetHolderIcon()
- Specified by:
getPropertySheetHolderIconin interfacePropertySheetHolder
-
getFeedRetryCount
public int getFeedRetryCount()
Description copied from interface:FeederIf feed() throws an Exception during job processing, the job processor will retry the feed() call this many times before raising the error.- Specified by:
getFeedRetryCountin interfaceFeeder- Returns:
-
setFeedRetryCount
public void setFeedRetryCount(int feedRetryCount)
-
getPickRetryCount
public int getPickRetryCount()
Description copied from interface:FeederIf post pick checks such as isPartOn() fail during job processing, the job processor will retry the pick and check process this many times before raising the error. Note that this does not include re-feeding the part.- Specified by:
getPickRetryCountin interfaceFeeder- Returns:
-
setPickRetryCount
public void setPickRetryCount(int pickRetryCount)
-
getPropertySheets
public PropertySheetHolder.PropertySheet[] getPropertySheets()
- Specified by:
getPropertySheetsin interfacePropertySheetHolder
-
postPick
public void postPick(Nozzle nozzle) throws java.lang.Exception
-
canTakeBackPart
public boolean canTakeBackPart()
- Specified by:
canTakeBackPartin interfaceFeeder
-
takeBackPart
public void takeBackPart(Nozzle nozzle) throws java.lang.Exception
Description copied from interface:FeederAsks the feeder to take back the part currently on the nozzle.- Specified by:
takeBackPartin interfaceFeeder- Throws:
java.lang.Exception
-
getPriority
public Feeder.Priority getPriority()
- Specified by:
getPriorityin interfaceFeeder
-
setPriority
public void setPriority(Feeder.Priority priority)
- Specified by:
setPriorityin interfaceFeeder
-
-