|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.robokind.api.common.property.PropertyChangeNotifier
org.robokind.api.motion.servos.AbstractServo<Id,Conf,Ctrl>
Id
- Identifier type for this ServoConf
- ServoConfig type for this ServoCtrl
- Servo's parent ServoController's typepublic abstract class AbstractServo<Id,Conf extends ServoConfig<Id>,Ctrl extends ServoController<Id,Conf,? extends AbstractServo<Id,Conf,Ctrl>,? extends ServoControllerConfig<Id,Conf>>>
Abstract implementation providing much of the functionality need to implement various Servos.
Field Summary | |
---|---|
protected Conf |
myConfig
The Servo's configuration parameters. |
protected Ctrl |
myController
The Servo's parent ServoController. |
protected org.robokind.api.common.position.NormalizedDouble |
myGoalPosition
The Servo's current goal position. |
protected Id |
myServoId
The Servo's Id |
Fields inherited from interface org.robokind.api.motion.servos.Servo |
---|
PROP_ENABLED, PROP_GOAL_POSITION |
Constructor Summary | |
---|---|
AbstractServo(Conf config,
Ctrl controller)
Creates a new AbstractServo from the given Servo configuration parameters and ServoController. |
Method Summary | |
---|---|
Integer |
getAbsoluteGoalPosition()
Returns the absolute goal position as used by the ServoController. |
Conf |
getConfig()
Returns the Servo's configuration values. |
Ctrl |
getController()
Returns the Servo's parent ServoController. |
org.robokind.api.common.position.NormalizedDouble |
getGoalPosition()
Returns the goal position. |
Id |
getId()
Returns the Servo's id. |
org.robokind.api.common.position.NormalizableRange<Double> |
getPositionRange()
Returns the NormalizableRange describing the range of motion. |
void |
propertyChange(PropertyChangeEvent pce)
|
void |
setGoalPosition(org.robokind.api.common.position.NormalizedDouble pos)
Sets the goal position. |
Methods inherited from class org.robokind.api.common.property.PropertyChangeNotifier |
---|
addPropertyChangeListener, addPropertyChangeListener, clearAllListeners, clearListeners, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, hasListeners, 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.robokind.api.motion.servos.Servo |
---|
getDefaultPosition, getEnabled, getMaxPosition, getMinPosition, getName, setEnabled |
Methods inherited from interface org.robokind.api.common.property.PropertyChangeSource |
---|
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
Field Detail |
---|
protected Id myServoId
protected Conf extends ServoConfig<Id> myConfig
protected Ctrl extends ServoController<Id,Conf,? extends AbstractServo<Id,Conf,Ctrl>,? extends ServoControllerConfig<Id,Conf>> myController
protected org.robokind.api.common.position.NormalizedDouble myGoalPosition
Constructor Detail |
---|
public AbstractServo(Conf config, Ctrl controller)
config
- Servo configuration parameterscontroller
- Servo's parent ServoControllerMethod Detail |
---|
public Id getId()
Servo
getId
in interface Servo<Id,Conf extends ServoConfig<Id>>
public Ctrl getController()
Servo
getController
in interface Servo<Id,Conf extends ServoConfig<Id>>
public Conf getConfig()
Servo
getConfig
in interface Servo<Id,Conf extends ServoConfig<Id>>
public org.robokind.api.common.position.NormalizedDouble getGoalPosition()
Servo
getGoalPosition
in interface Servo<Id,Conf extends ServoConfig<Id>>
public Integer getAbsoluteGoalPosition()
public void setGoalPosition(org.robokind.api.common.position.NormalizedDouble pos)
Servo
setGoalPosition
in interface Servo<Id,Conf extends ServoConfig<Id>>
pos
- the goal positionpublic void propertyChange(PropertyChangeEvent pce)
propertyChange
in interface PropertyChangeListener
public org.robokind.api.common.position.NormalizableRange<Double> getPositionRange()
Servo
getPositionRange
in interface Servo<Id,Conf extends ServoConfig<Id>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |