|
||||||||||
| 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 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. |
NormalizedDouble |
getGoalPosition()
Returns the goal position. |
Id |
getId()
Returns the Servo's id. |
void |
propertyChange(PropertyChangeEvent pce)
|
void |
setGoalPosition(NormalizedDouble pos)
Sets the goal position. |
| Methods inherited from class org.robokind.api.common.property.PropertyChangeNotifier |
|---|
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, 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 NormalizedDouble myGoalPosition
| Constructor Detail |
|---|
public AbstractServo(Conf config,
Ctrl controller)
config - Servo configuration parameterscontroller - Servo's parent ServoController| Method 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 NormalizedDouble getGoalPosition()
Servo
getGoalPosition in interface Servo<Id,Conf extends ServoConfig<Id>>public Integer getAbsoluteGoalPosition()
public void setGoalPosition(NormalizedDouble pos)
Servo
setGoalPosition in interface Servo<Id,Conf extends ServoConfig<Id>>pos - the goal positionpublic void propertyChange(PropertyChangeEvent pce)
propertyChange in interface PropertyChangeListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||