org.robokind.impl.motion.serial
Class SerialServoController<Id,ServoConf extends org.robokind.api.motion.servos.config.ServoConfig<Id>,S extends org.robokind.api.motion.servos.Servo<Id,ServoConf>,ControllerConf extends SerialServoControllerConfig<Id,ServoConf>>
java.lang.Object
org.robokind.api.common.property.PropertyChangeNotifier
org.robokind.api.motion.servos.AbstractServoController<Id,ServoConf,S,ControllerConf>
org.robokind.impl.motion.serial.SerialServoController<Id,ServoConf,S,ControllerConf>
- Type Parameters:
J
- type of Servo
- All Implemented Interfaces:
- org.robokind.api.common.property.PropertyChangeSource, org.robokind.api.motion.servos.ServoController<Id,ServoConf,S,ControllerConf>
public abstract class SerialServoController<Id,ServoConf extends org.robokind.api.motion.servos.config.ServoConfig<Id>,S extends org.robokind.api.motion.servos.Servo<Id,ServoConf>,ControllerConf extends SerialServoControllerConfig<Id,ServoConf>>
- extends org.robokind.api.motion.servos.AbstractServoController<Id,ServoConf,S,ControllerConf>
Abstract ServoController which communicates with a Serial Port.
- Author:
- Matthew Stevenson
Nested classes/interfaces inherited from interface org.robokind.api.motion.servos.ServoController |
org.robokind.api.motion.servos.ServoController.Id, org.robokind.api.motion.servos.ServoController.ServoId<ServoIdType> |
Fields inherited from class org.robokind.api.motion.servos.AbstractServoController |
myChangeMonitor, myConfig, myConnectionStatus, myServoMap, myServos |
Fields inherited from interface org.robokind.api.motion.servos.ServoController |
PROP_CONNECTION_STATUS, PROP_ENABLED, PROP_ERROR_MESSAGES, PROP_SERVO_ADD, PROP_SERVO_REMOVE, PROP_SERVOS, PROP_VERSION |
Methods inherited from class org.robokind.api.motion.servos.AbstractServoController |
addingServo, addServo, changeServoId, connectServo, containsId, containsIds, disconnectServo, getConfig, getConnectionStatus, getId, getServo, getServos, removeServo, removingServo, servoId, setConnectStatus |
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.motion.servos.ServoController |
getEnabled, getServoIdClass, moveAllServos, moveServo, moveServos, setEnabled |
Methods inherited from interface org.robokind.api.common.property.PropertyChangeSource |
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
myPort
protected RXTXSerialPort myPort
- Underlying serial port.
myTimeoutLength
protected int myTimeoutLength
- Port timeout length.
SerialServoController
public SerialServoController(ControllerConf config)
- Creates a new SerialServoController from the SerialServoControllerConfig.
- Parameters:
config
- ControllerConfig for the new controller
setTimeoutLength
public void setTimeoutLength(int timeout)
- Sets the port timeout length.
- Parameters:
timeout
- timeout length in milliseconds
connect
public boolean connect()
setServos
protected abstract boolean setServos()
- Sets the Servo List and Servo Map of the underlying
AbstractServoController.
- Returns:
- true if successful
disconnect
public boolean disconnect()
getErrorMessages
public List<String> getErrorMessages()
Copyright © 2011. All Rights Reserved.