cz.cuni.amis.pogamut.usar2004.agent.module.configuration
Class SuperConfiguration

Package class diagram package SuperConfiguration
java.lang.Object
  extended by cz.cuni.amis.pogamut.usar2004.agent.module.configuration.SuperConfiguration
Direct Known Subclasses:
ConfigEffecter, ConfigMissionPackage, ConfigSensor, VehicleConfiguration

public abstract class SuperConfiguration
extends Object

Parent class for all possible configuration subjects. It covers the basic and common properties for all the configuration subjects.

Author:
vejmanm

Field Summary
protected  ConfigType confType
           
protected  ConfigurationMessage lastMessage
           
 
Constructor Summary
SuperConfiguration(ConfigType type)
          Ctor.
 
Method Summary
 ConfigType getConfigType()
          ConfigType is a descriptor used for creating particular instance and for getting type information about particular configuration subject.
 Set<String> getFeatureNames()
          For a camera, sensor or effecter, a configuration message conatins a pair â€?{Name Value}’ that describes the feature of this sensor type.
 Map<String,String> getFeatures()
          For a camera, sensor or effecter, a configuration message conatins a pair â€?{Name Value}’ that describes the feature of this sensor type.
 int getFeatureSize()
          For a camera, sensor or effecter, a configuration message conatins a pair â€?{Name Value}’ that describes the feature of this sensor type.
 String getFeatureValueBy(String Name)
          For a camera, sensor or effecter, a configuration message conatins a pair â€?{Name Value}’ that describes the feature of this sensor type.
 String getName()
          Name of the subject that this geometry message concerns.
 String getType()
          Type describes the vehicle type.
 Boolean isReady()
          Used to make sure the object is filled.
 void updateMessage(ConfigurationMessage message)
          Method used for updating the message object that provides particular properties for given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

confType

protected ConfigType confType

lastMessage

protected ConfigurationMessage lastMessage
Constructor Detail

SuperConfiguration

public SuperConfiguration(ConfigType type)
Ctor.

Parameters:
type - Configuration type describes particular subject about which we want to know about. It is used to distinguish incoming message from the server.
Method Detail

isReady

public Boolean isReady()
Used to make sure the object is filled.

Returns:
Returns true if the object is filled with Conf. message.

getType

public String getType()
Type describes the vehicle type. It will be one of the following values: "GroundVehicle”, “LeggedRobot”, “NauticVehicle”, or “AerialVehicle” of "Camera" or some kind of sensor or effecter or "MisPkg".

Returns:
Returns type of the geometry message.

getName

public String getName()
Name of the subject that this geometry message concerns.

Returns:
Returns the name of the Geometry item.

getConfigType

public ConfigType getConfigType()
ConfigType is a descriptor used for creating particular instance and for getting type information about particular configuration subject.

Returns:
Returns ConfigType.

getFeatureNames

public Set<String> getFeatureNames()
For a camera, sensor or effecter, a configuration message conatins a pair �{Name Value}’ that describes the feature of this sensor type. Different sensor types have different name value pairs. For detailed information, please refer to section 10 of USARSim manual v3.1.3 about how to configure the sensor. Example: CONF {Type Camera} {CameraDefFov 0.8727} {CameraMinFov 0.3491} {CameraMaxFov 2.0943} {CameraFov 0.8726}

Returns:
Returns keySet of features.

getFeatureValueBy

public String getFeatureValueBy(String Name)
For a camera, sensor or effecter, a configuration message conatins a pair �{Name Value}’ that describes the feature of this sensor type. Different sensor types have different name value pairs. For detailed information, please refer to section 10 of USARSim manual v3.1.3 about how to configure the sensor. Example: CONF {Type Camera} {CameraDefFov 0.8727} {CameraMinFov 0.3491} {CameraMaxFov 2.0943} {CameraFov 0.8726}

Returns:
Returns feature value by feature name from the feature map.

getFeatureSize

public int getFeatureSize()
For a camera, sensor or effecter, a configuration message conatins a pair �{Name Value}’ that describes the feature of this sensor type. Different sensor types have different name value pairs. For detailed information, please refer to section 10 of USARSim manual v3.1.3 about how to configure the sensor. Example: CONF {Type Camera} {CameraDefFov 0.8727} {CameraMinFov 0.3491} {CameraMaxFov 2.0943} {CameraFov 0.8726}

Returns:
Returns the size of the feature map.

getFeatures

public Map<String,String> getFeatures()
For a camera, sensor or effecter, a configuration message conatins a pair �{Name Value}’ that describes the feature of this sensor type. Different sensor types have different name value pairs. For detailed information, please refer to section 10 of USARSim manual v3.1.3 about how to configure the sensor. Example: CONF {Type Camera} {CameraDefFov 0.8727} {CameraMinFov 0.3491} {CameraMaxFov 2.0943} {CameraFov 0.8726}

Returns:
Returns Map of features.

updateMessage

public void updateMessage(ConfigurationMessage message)
Method used for updating the message object that provides particular properties for given type. Note that this object is created by yylex parser and contains properties for all configuration subject types. But only relevat to individual Config Subject are filled.

Parameters:
message - Configuration message from server.


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.