public class GeometryMasterModule extends cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule<USAR2004Bot>
| Modifier and Type | Field and Description |
|---|---|
protected cz.cuni.amis.pogamut.usar2004.agent.module.master.GeometryMasterModule.GeometryMessageListener |
geoListener |
protected GeometryContainer |
geometryModules |
protected static GeometryMasterModule |
singleton |
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected cz.cuni.amis.pogamut.usar2004.agent.module.master.GeometryMasterModule.GeometryMessageListener geoListener
protected static GeometryMasterModule singleton
protected GeometryContainer geometryModules
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 bepublic List<SuperGeometry> getGeometriesByType(String type)
type - String representing the type of Geometry to returnpublic List<SuperGeometry> getGeometriesByGeometryType(GeometryType type)
type - GeometryType representing the type of Geometry to returnpublic 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>Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.