|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT> cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule<USAR2004Bot> cz.cuni.amis.pogamut.usar2004.agent.module.master.ConfigMasterModule
public class ConfigMasterModule
ConfigurationMasterModule provides methods for querying messages to server and methods for reading answers to those queries. Please note, that You have to produce suitable query before reading any data. Query methods: starts with query* Module methods: starts with get* Data at each module updates every time You call query method again.
Field Summary | |
---|---|
protected ConfigContainer |
configModules
|
protected cz.cuni.amis.pogamut.usar2004.agent.module.master.ConfigMasterModule.ConfigurationMessageListener |
confListener
|
protected static ConfigMasterModule |
singleton
|
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule |
---|
act, worldView |
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
---|
agent, controller, eventBus, log |
Constructor Summary | |
---|---|
ConfigMasterModule(USAR2004Bot bot)
Private ctor |
Method Summary | |
---|---|
protected void |
cleanUp()
|
protected SuperConfiguration |
createNewSensor(ConfigurationMessage message)
Asks ConfigType enum if it knows ConfigType represented by string type. |
protected void |
fileMessage(ConfigurationMessage message)
Updates previous State on genuine Sensor or creates a new Record. |
SuperConfiguration |
getConfigurationByTypeName(String type,
String name)
Gets configuration message representatives from local hashmap specified by type and by name. |
List<SuperConfiguration> |
getConfigurationsByClass(Class clazz)
Adds every object that can be casted to initial class to the output list. |
List<SuperConfiguration> |
getConfigurationsByConfigType(ConfigType type)
Note, that if type = UNKNOWN it returns all unknown Configurations. |
List<SuperConfiguration> |
getConfigurationsByType(String type)
|
static ConfigMasterModule |
getModuleInstance(USAR2004Bot bot)
Method for obtaining the singleton. |
List<MessageDescriptor> |
getNonEmptyDescription()
For each type of Configuration it adds all individuals to the returnee List as a couple (Type, Name) |
Boolean |
isReady()
Collection of sensor data check. |
void |
queryConfigurationByType(String type)
Sends GETCONF message with specified type. |
void |
queryConfigurationByTypeName(String type,
String name)
Sends GETCONF message with specified type and name. |
protected boolean |
updateSensorCollection(ConfigurationMessage message)
Returns a flag that indicates if sensorUpdate was successful. |
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
---|
getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, start, stop, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected cz.cuni.amis.pogamut.usar2004.agent.module.master.ConfigMasterModule.ConfigurationMessageListener confListener
protected static ConfigMasterModule singleton
protected ConfigContainer configModules
Constructor Detail |
---|
public ConfigMasterModule(USAR2004Bot bot)
bot
- USAR2004Bot variable for creating instance of each new record
in configModules(due to inheritance)Method Detail |
---|
public static ConfigMasterModule getModuleInstance(USAR2004Bot bot)
bot
- USAR2004Bot parameter for creation of the singleton instance
when called for the first time.
public Boolean isReady()
public List<SuperConfiguration> getConfigurationsByClass(Class clazz)
c
- Class representing the type of which the return list should be
public List<SuperConfiguration> getConfigurationsByType(String type)
type
- String representing the type of Configuration to return
public List<SuperConfiguration> getConfigurationsByConfigType(ConfigType type)
type
- ConfigurationType representing the type of Configuration to
return
public SuperConfiguration getConfigurationByTypeName(String type, String name)
type
- String representing the type of configuration to return.name
- String representing the name of configuration to return.
public List<MessageDescriptor> getNonEmptyDescription()
public void queryConfigurationByType(String type)
type
- type of Configuration data we want to know about. For example
: Sonar, MisPkg, Robot, Effecter, etc..public void queryConfigurationByTypeName(String type, String name)
type
- type of Configuration data we want to know about. For example
: Sonar, MisPkg, Robot, Effecter, etc..name
- of sensor/effecter. Can be omitted.protected SuperConfiguration createNewSensor(ConfigurationMessage message)
type
- String representing possible valid ConfigType.
protected boolean updateSensorCollection(ConfigurationMessage message)
message
-
protected void fileMessage(ConfigurationMessage message)
message
- This ought to be SensorMessage caught by listener.protected void cleanUp()
cleanUp
in class cz.cuni.amis.pogamut.base.agent.module.AgentModule<USAR2004Bot>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |