IdType - Identifier type used by this ServoController's ServosServoType - ServoController's Servo typeServoConf - ServoConfig typeControllerConf - ServoControllerConfig typepublic interface ServoController<IdType,ServoConf extends ServoConfig<IdType>,ServoType extends Servo<IdType,ServoConf>,ControllerConf extends ServoControllerConfig<IdType,ServoConf>> extends PropertyChangeSource
| Modifier and Type | Interface and Description |
|---|---|
static class |
ServoController.Id
Id is an immutable globally unique identifier for a ServoController.
|
static class |
ServoController.ServoId<ServoIdType>
ServoId is an immutable globally unique identifier for a Servo
belonging to a Controller.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
PROP_CONNECTION_STATUS
Property string for ConnectionStatus.
|
static String |
PROP_ENABLED
Property string for Enabled.
|
static String |
PROP_ERROR_MESSAGES
Property string for ErrorMessages.
|
static String |
PROP_SERVO_ADD
Property string for AddServo.
|
static String |
PROP_SERVO_REMOVE
Property string for RemoveServo.
|
static String |
PROP_SERVOS
Property string for Servos.
|
static String |
PROP_VERSION
Used to specify the VersionProperty of a type of ServoController.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
connect()
Connects the ServoController to the underlying device to begin using.
|
boolean |
containsId(ServoController.ServoId<IdType> id)
Returns true if the controller contains a Servo for the given Servo id.
|
boolean |
containsIds(Set<ServoController.ServoId<IdType>> ids)
Returns true if the controller contains a Servo for each of the given
Servo ids.
|
boolean |
disconnect()
Disconnects the underlying device, freeing any resources that have been
locked.
|
ControllerConf |
getConfig()
Returns the ServoController's ServoControllerConfig.
|
ConnectionStatus |
getConnectionStatus()
Return the current ConnectionStatus.
|
Boolean |
getEnabled()
If enabled, this ServoController should accept move commands.
|
List<String> |
getErrorMessages()
Returns the current error messages.
|
ServoController.Id |
getId()
Returns the ServoController.Id identifying this ServoController.
|
ServoType |
getServo(ServoController.ServoId<IdType> id)
Returns the Servo with the given id.
|
Class<IdType> |
getServoIdClass()
Returns the Class of the Id used by the ServoController's Servos.
|
List<ServoType> |
getServos()
Returns a List of the controller's Servos.
|
boolean |
moveAllServos(long lenMillisec)
Move all of the controller's Servos.
|
boolean |
moveServo(ServoController.ServoId<IdType> id,
long lenMillisec)
Move the Servo with the given Servo id to its goal position in the given
time.
|
boolean |
moveServos(ServoController.ServoId<IdType>[] ids,
int len,
int offset,
long lenMillisec)
Move the Servos with the given Servo ids to their goal positions.
|
void |
setEnabled(Boolean enabled)
If enabled, this ServoController should accept move commands.
|
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListenerstatic final String PROP_VERSION
static final String PROP_CONNECTION_STATUS
static final String PROP_ERROR_MESSAGES
static final String PROP_SERVO_ADD
static final String PROP_SERVO_REMOVE
static final String PROP_SERVOS
static final String PROP_ENABLED
ServoController.Id getId()
List<ServoType> getServos()
ServoType getServo(ServoController.ServoId<IdType> id)
id - the Servo idboolean containsIds(Set<ServoController.ServoId<IdType>> ids)
ids - Set of Servo ids to checkboolean containsId(ServoController.ServoId<IdType> id)
id - Servo id to checkboolean connect()
boolean disconnect()
boolean moveServo(ServoController.ServoId<IdType> id, long lenMillisec)
id - Servo id of the Servo to movelenMillisec - number of milliseconds for the movement to takeboolean moveServos(ServoController.ServoId<IdType>[] ids, int len, int offset, long lenMillisec)
ids - Servo ids of the Servos to movelen - number of idsoffset - start indexlenMillisec - number of milliseconds for the movement to takeboolean moveAllServos(long lenMillisec)
lenMillisec - number of milliseconds for the movement to takeConnectionStatus getConnectionStatus()
List<String> getErrorMessages()
ControllerConf getConfig()
void setEnabled(Boolean enabled)
enabled - Boolean getEnabled()
Copyright © 2011-2014. All Rights Reserved.