|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.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.GeometryMasterModule
public class GeometryMasterModule
GeometryMasterModule 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 cz.cuni.amis.pogamut.usar2004.agent.module.master.GeometryMasterModule.GeometryMessageListener |
geoListener
|
protected GeometryContainer |
geometryModules
|
protected static GeometryMasterModule |
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 | |
---|---|
GeometryMasterModule(USAR2004Bot bot)
Private ctor |
Method Summary | |
---|---|
protected void |
cleanUp()
|
protected SuperGeometry |
createNewSensor(GeometryMessage message)
Asks GeometryType enum if it knows GeometryType represented by string type. |
protected void |
fileMessage(GeometryMessage message)
Updates previous State on genuine Sensor or creates a new Record. |
List<SuperGeometry> |
getGeometriesByClass(Class clazz)
Adds every object that can be casted to initial class to the output list. |
List<SuperGeometry> |
getGeometriesByGeometryType(GeometryType type)
Note, that if type = UNKNOWN it returns all unknown Geometries. |
List<SuperGeometry> |
getGeometriesByType(String type)
|
SuperGeometry |
getGeometryByTypeName(String type,
String name)
Gets geometry message representatives from local hashmap specified by type and by name. |
static GeometryMasterModule |
getModuleInstance(USAR2004Bot bot)
Method for obtaining the singleton. |
List<MessageDescriptor> |
getNonEmptyDescription()
For each type of Geometry it adds all individuals to the returnee List as a couple (Type, Name) |
Boolean |
isReady()
Collection of sensor data check. |
void |
queryGeometryByType(String type)
Sends GETGEO message with specified type. |
void |
queryGeometryByTypeName(String type,
String name)
Sends GETGEO message with specified type and name. |
protected boolean |
updateSensorCollection(GeometryMessage 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.GeometryMasterModule.GeometryMessageListener geoListener
protected static GeometryMasterModule singleton
protected GeometryContainer geometryModules
Constructor Detail |
---|
public GeometryMasterModule(USAR2004Bot bot)
bot
- USAR2004Bot variable for creating instance of each new record
in geometryModules(due to inheritance)Method Detail |
---|
public static GeometryMasterModule getModuleInstance(USAR2004Bot bot)
bot
- USAR2004Bot parameter for creation of the singleton instance
when called for the first time.
public Boolean isReady()
public List<SuperGeometry> getGeometriesByClass(Class clazz)
c
- Class representing the type of which the return list should be
public List<SuperGeometry> getGeometriesByType(String type)
type
- String representing the type of Geometry to return
public List<SuperGeometry> getGeometriesByGeometryType(GeometryType type)
type
- GeometryType representing the type of Geometry to return
public SuperGeometry getGeometryByTypeName(String type, String name)
type
- String representing the type of geometry to return.name
- String representing the name of geometry to return.
public List<MessageDescriptor> getNonEmptyDescription()
public void queryGeometryByType(String type)
type
- type of geometry data we want to know about. For example :
Sonar, MisPkg, Robot, Effecter, etc..public void queryGeometryByTypeName(String type, String name)
type
- type of geometry data we want to know about. For example :
Sonar, MisPkg, Robot, Effecter, etc..name
- of sensor/effecter. Can be omitted.protected SuperGeometry createNewSensor(GeometryMessage message)
type
- String representing possible valid GeometryType.
protected boolean updateSensorCollection(GeometryMessage message)
message
-
protected void fileMessage(GeometryMessage 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 |