|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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>>
A ServoController provides control of a collection of Servos and the means of directly controlling them.
| Nested Class Summary | |
|---|---|
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. |
| Field Summary | |
|---|---|
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. |
| Method Summary | |
|---|---|
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. |
| Methods inherited from interface org.robokind.api.common.property.PropertyChangeSource |
|---|
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
| Field Detail |
|---|
static 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
| Method Detail |
|---|
ServoController.Id getId()
List<ServoType> getServos()
ServoType getServo(ServoController.ServoId<IdType> id)
id - the Servo id
boolean containsIds(Set<ServoController.ServoId<IdType>> ids)
ids - Set of Servo ids to check
boolean containsId(ServoController.ServoId<IdType> id)
id - Servo id to check
boolean 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 take
boolean 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 take
boolean moveAllServos(long lenMillisec)
lenMillisec - number of milliseconds for the movement to take
ConnectionStatus getConnectionStatus()
List<String> getErrorMessages()
ControllerConf getConfig()
void setEnabled(Boolean enabled)
enabled - Boolean getEnabled()
Class<IdType> getServoIdClass()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||