org.robokind.api.motion.servos
Class ServoJoint<S extends Servo>

java.lang.Object
  extended by org.robokind.api.common.property.PropertyChangeNotifier
      extended by org.robokind.api.motion.AbstractJoint
          extended by org.robokind.api.motion.servos.ServoJoint<S>
Type Parameters:
S - Servo Type to use
All Implemented Interfaces:
PropertyChangeListener, EventListener, org.robokind.api.common.property.PropertyChangeSource, Joint
Direct Known Subclasses:
EmptyServoJoint

public class ServoJoint<S extends Servo>
extends AbstractJoint

Author:
Matthew Stevenson

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.robokind.api.motion.Joint
Joint.Id
 
Field Summary
protected  S myServo
          The ServoJoint's Servo
 
Fields inherited from class org.robokind.api.motion.AbstractJoint
myProperties
 
Fields inherited from interface org.robokind.api.motion.Joint
PROP_ENABLED, PROP_GOAL_POSITION
 
Constructor Summary
ServoJoint(Joint.Id jointId, S servo, List<JointProperty> properties)
          Creates a new ServoJoint
 
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 the ServoRobot to set the goal position.
 
Methods inherited from class org.robokind.api.motion.AbstractJoint
addProperty, getId, getProperty, getProperty, propertyChange, removeProperty
 
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
 

Field Detail

myServo

protected S extends Servo myServo
The ServoJoint's Servo

Constructor Detail

ServoJoint

public ServoJoint(Joint.Id jointId,
                  S servo,
                  List<JointProperty> properties)
Creates a new ServoJoint

Parameters:
jointId - Joint.Id to use
servo - Servo to use
properties - JointProperties for this Joint
Method Detail

getName

public String getName()
Description copied from interface: Joint
Returns the name of the Joint.

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.

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.


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.

Returns:
true if enabled

getGoalPosition

public org.robokind.api.common.position.NormalizedDouble getGoalPosition()
Description copied from interface: Joint
Returns the goal position.

Returns:
goal position

setGoalPosition

protected void setGoalPosition(org.robokind.api.common.position.NormalizedDouble pos)
Allows the ServoRobot to set the goal position.

Parameters:
pos - new goal position


Copyright © 2011. All Rights Reserved.