org.robokind.api.motion.servos.utils
Class EmptyServoJoint
java.lang.Object
org.robokind.api.common.property.PropertyChangeNotifier
org.robokind.api.motion.AbstractJoint
org.robokind.api.motion.servos.ServoJoint
org.robokind.api.motion.servos.utils.EmptyServoJoint
- All Implemented Interfaces:
- PropertyChangeListener, EventListener, org.robokind.api.common.property.PropertyChangeSource, Joint
public class EmptyServoJoint
- extends ServoJoint
An Empty implementation of a ServoJoint, used for missing Servos.
- Author:
- Matthew Stevenson
Nested classes/interfaces inherited from interface org.robokind.api.motion.Joint |
Joint.Id |
Constructor Summary |
EmptyServoJoint(Joint.Id jointId,
String name,
org.robokind.api.common.position.NormalizedDouble defPos)
Creates a new EmptyServoJoint with the given properties. |
Method Summary |
org.robokind.api.common.position.NormalizedDouble |
getDefaultPosition()
Returns the Joint's default position. |
Boolean |
getEnabled()
If enabled, this Joint will accept move commands. |
org.robokind.api.common.position.NormalizedDouble |
getGoalPosition()
Returns the goal position. |
String |
getName()
Returns the name of the Joint. |
void |
setEnabled(Boolean enabled)
If enabled, this Joint will accept move commands. |
protected void |
setGoalPosition(org.robokind.api.common.position.NormalizedDouble pos)
Allows a ServoRobot to set 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.common.property.PropertyChangeSource |
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
EmptyServoJoint
public EmptyServoJoint(Joint.Id jointId,
String name,
org.robokind.api.common.position.NormalizedDouble defPos)
- Creates a new EmptyServoJoint with the given properties.
- Parameters:
jointId
- Joint.Id of the Jointname
- name of the JointdefPos
- default position of the Joint
getName
public String getName()
- Description copied from interface:
Joint
- Returns the name of the Joint.
- Specified by:
getName
in interface Joint
- Overrides:
getName
in class ServoJoint
- Returns:
- name of the Joint
getDefaultPosition
public org.robokind.api.common.position.NormalizedDouble getDefaultPosition()
- Description copied from interface:
Joint
- Returns the Joint's default position.
- Specified by:
getDefaultPosition
in interface Joint
- Overrides:
getDefaultPosition
in class ServoJoint
- Returns:
- Joint's default position
setEnabled
public void setEnabled(Boolean enabled)
- Description copied from interface:
Joint
- If enabled, this Joint will accept move commands.
If not enabled, this joint should not move.
- Specified by:
setEnabled
in interface Joint
- Overrides:
setEnabled
in class ServoJoint
getEnabled
public Boolean getEnabled()
- Description copied from interface:
Joint
- If enabled, this Joint will accept move commands.
If not enabled, this joint should not move.
- Specified by:
getEnabled
in interface Joint
- Overrides:
getEnabled
in class ServoJoint
- Returns:
- true if enabled
getGoalPosition
public org.robokind.api.common.position.NormalizedDouble getGoalPosition()
- Description copied from interface:
Joint
- Returns the goal position.
- Specified by:
getGoalPosition
in interface Joint
- Overrides:
getGoalPosition
in class ServoJoint
- Returns:
- goal position
setGoalPosition
protected void setGoalPosition(org.robokind.api.common.position.NormalizedDouble pos)
- Allows a ServoRobot to set the goal position.
- Overrides:
setGoalPosition
in class ServoJoint
- Parameters:
pos
- goal position to set
Copyright © 2011. All Rights Reserved.