org.robokind.impl.motion.serial
Class SerialConfigXMLReader<ServoIdType,ServoConf extends org.robokind.api.motion.servos.config.ServoConfig<ServoIdType>,SerialConf extends SerialServoControllerConfig<ServoIdType,ServoConf>>

java.lang.Object
  extended by org.robokind.impl.motion.config.ServoControllerConfigXMLReader<SerialConf>
      extended by org.robokind.impl.motion.serial.SerialConfigXMLReader<ServoIdType,ServoConf,SerialConf>
All Implemented Interfaces:
org.robokind.api.common.services.ServiceConfigurationLoader<SerialConf,org.apache.commons.configuration.HierarchicalConfiguration>

public abstract class SerialConfigXMLReader<ServoIdType,ServoConf extends org.robokind.api.motion.servos.config.ServoConfig<ServoIdType>,SerialConf extends SerialServoControllerConfig<ServoIdType,ServoConf>>
extends ServoControllerConfigXMLReader<SerialConf>

Loads a SerialServoControllerConfig from a HierarchicalConfiguration using the given VersionProperty.

Author:
Matthew Stevenson

Field Summary
static String XML_BAUD_RATE
          Baud rate XML Element.
static String XML_CONNECTION_PARAMS
          Connection parameters XML Element.
static String XML_DEFAULT_POSITON
          Servo default position XML Element.
static String XML_JOINT_NAME
          Servo name XML Element.
static String XML_JOINT_PARAMS
          Servo parameters XML Element.
static String XML_MAX_POSITON
          Servo max position XML Element.
static String XML_MIN_POSITION
          Servo min position XML Element.
static String XML_PORT_NAME
          Port name XML Element.
static String XML_SERVO
          Servo XML Element.
static String XML_SERVO_CONTROLLER_ID
          Connection parameters XML Element.
static String XML_SERVO_ID
          Servo physical id XML Element.
 
Fields inherited from interface org.robokind.api.common.services.ServiceConfigurationLoader
PROP_CONFIG_FORMAT_VERSION, PROP_PARAMETER_CLASS, PROP_SERVICE_CONFIG_CLASS
 
Constructor Summary
SerialConfigXMLReader(org.robokind.api.motion.servos.utils.ServoIdReader<ServoIdType> reader)
           
 
Method Summary
 SerialConf loadConfiguration(org.apache.commons.configuration.HierarchicalConfiguration param)
           
protected abstract  SerialConf newConfig()
           
protected abstract  ServoConf newServoConfig(ServoIdType id, String name, int minPos, int maxPos, int defPos)
           
 
Methods inherited from class org.robokind.impl.motion.config.ServoControllerConfigXMLReader
getConfigurationClass, getConfigurationFormat, getParameterClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_SERVO_CONTROLLER_ID

public static final String XML_SERVO_CONTROLLER_ID
Connection parameters XML Element.

See Also:
Constant Field Values

XML_CONNECTION_PARAMS

public static final String XML_CONNECTION_PARAMS
Connection parameters XML Element.

See Also:
Constant Field Values

XML_PORT_NAME

public static final String XML_PORT_NAME
Port name XML Element.

See Also:
Constant Field Values

XML_BAUD_RATE

public static final String XML_BAUD_RATE
Baud rate XML Element.

See Also:
Constant Field Values

XML_JOINT_PARAMS

public static final String XML_JOINT_PARAMS
Servo parameters XML Element.

See Also:
Constant Field Values

XML_SERVO

public static final String XML_SERVO
Servo XML Element.

See Also:
Constant Field Values

XML_SERVO_ID

public static final String XML_SERVO_ID
Servo physical id XML Element.

See Also:
Constant Field Values

XML_JOINT_NAME

public static final String XML_JOINT_NAME
Servo name XML Element.

See Also:
Constant Field Values

XML_MIN_POSITION

public static final String XML_MIN_POSITION
Servo min position XML Element.

See Also:
Constant Field Values

XML_MAX_POSITON

public static final String XML_MAX_POSITON
Servo max position XML Element.

See Also:
Constant Field Values

XML_DEFAULT_POSITON

public static final String XML_DEFAULT_POSITON
Servo default position XML Element.

See Also:
Constant Field Values
Constructor Detail

SerialConfigXMLReader

public SerialConfigXMLReader(org.robokind.api.motion.servos.utils.ServoIdReader<ServoIdType> reader)
Method Detail

loadConfiguration

public SerialConf loadConfiguration(org.apache.commons.configuration.HierarchicalConfiguration param)
Specified by:
loadConfiguration in interface org.robokind.api.common.services.ServiceConfigurationLoader<SerialConf extends SerialServoControllerConfig<ServoIdType,ServoConf>,org.apache.commons.configuration.HierarchicalConfiguration>
Specified by:
loadConfiguration in class ServoControllerConfigXMLReader<SerialConf extends SerialServoControllerConfig<ServoIdType,ServoConf>>

newConfig

protected abstract SerialConf newConfig()

newServoConfig

protected abstract ServoConf newServoConfig(ServoIdType id,
                                            String name,
                                            int minPos,
                                            int maxPos,
                                            int defPos)


Copyright © 2011. All Rights Reserved.