org.robokind.api.motion.servos
Interface Servo<Id,Conf extends ServoConfig>

Type Parameters:
Id - Id Type used by the Servo
Conf - ServoConfig type for this Servo
All Superinterfaces:
org.robokind.api.common.property.PropertyChangeSource
All Known Implementing Classes:
AbstractServo

public interface Servo<Id,Conf extends ServoConfig>
extends org.robokind.api.common.property.PropertyChangeSource

A Servo provides control of a physical servo belonging to a servo control board.

Author:
Matthew Stevenson

Field Summary
static String PROP_ENABLED
          Property string for Enabled.
static String PROP_GOAL_POSITION
          Property string for GoalPostion.
 
Method Summary
 Conf getConfig()
          Returns the Servo's configuration values.
 ServoController getController()
          Returns the Servo's parent ServoController.
 org.robokind.api.common.position.NormalizedDouble getDefaultPosition()
          Returns the Servo default position.
 Boolean getEnabled()
          If enabled, this Servo will accept move commands.
 org.robokind.api.common.position.NormalizedDouble getGoalPosition()
          Returns the goal position.
 Id getId()
          Returns the Servo's id.
 int getMaxPosition()
          Returns the Servo maximum position.
 int getMinPosition()
          Returns the Servo minimum position.
 String getName()
          Returns the Servo name.
 void setEnabled(Boolean enabled)
          Sets the enabled value for this Servo
 void setGoalPosition(org.robokind.api.common.position.NormalizedDouble pos)
          Sets the goal position.
 
Methods inherited from interface org.robokind.api.common.property.PropertyChangeSource
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 

Field Detail

PROP_GOAL_POSITION

static final String PROP_GOAL_POSITION
Property string for GoalPostion.

See Also:
Constant Field Values

PROP_ENABLED

static final String PROP_ENABLED
Property string for Enabled.

See Also:
Constant Field Values
Method Detail

getId

Id getId()
Returns the Servo's id.

Returns:
Servo's id

getGoalPosition

org.robokind.api.common.position.NormalizedDouble getGoalPosition()
Returns the goal position.

Returns:
current goal position

setGoalPosition

void setGoalPosition(org.robokind.api.common.position.NormalizedDouble pos)
Sets the goal position.

Parameters:
pos - the goal position

getConfig

Conf getConfig()
Returns the Servo's configuration values.

Returns:
Servo's configuration values

getController

ServoController getController()
Returns the Servo's parent ServoController.

Returns:
Servo's parent ServoController

getEnabled

Boolean getEnabled()
If enabled, this Servo will accept move commands. If not enabled, this Servo should not move.

Returns:
true if enabled

setEnabled

void setEnabled(Boolean enabled)
Sets the enabled value for this Servo

Parameters:
enabled - enabled value

getName

String getName()
Returns the Servo name.

Returns:
Servo name

getMinPosition

int getMinPosition()
Returns the Servo minimum position.

Returns:
Servo minimum position

getMaxPosition

int getMaxPosition()
Returns the Servo maximum position.

Returns:
Servo maximum position

getDefaultPosition

org.robokind.api.common.position.NormalizedDouble getDefaultPosition()
Returns the Servo default position.

Returns:
Servo default position


Copyright © 2011. All Rights Reserved.