public class SensorSpecificModule<Module extends SuperSensor> extends cz.cuni.amis.pogamut.base.agent.module.SensorModule<USAR2004Bot>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
flagReaded |
protected Module |
sensor |
protected cz.cuni.amis.pogamut.usar2004.agent.module.master.SensorSpecificModule.SensorMessageListener |
sensorListener |
| Constructor and Description |
|---|
SensorSpecificModule(USAR2004Bot bot,
Class<Module> c)
Captures and provides data of the first sensor of respective type
|
SensorSpecificModule(USAR2004Bot bot,
String name,
Class<Module> c)
If we know both type and name of sensor we want to get data from - this
ctor is the one to use.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanUp() |
protected void |
fillModule(SensorMessage message)
Updates sensor data when either the sensor name was not specified(Than it
monitors the first Sensor of this type) or the type and name matches.
|
Module |
getModule()
Returns module of specified type by generics.
|
boolean |
isReaded()
Check method for making sure we don't use old value.
|
Boolean |
isReady()
Collection of sensor data check.
|
protected cz.cuni.amis.pogamut.usar2004.agent.module.master.SensorSpecificModule.SensorMessageListener sensorListener
protected Module extends SuperSensor sensor
protected boolean flagReaded
public SensorSpecificModule(USAR2004Bot bot, Class<Module> c)
bot - USAR2004Bot variable for creating sensor instancec - Class definition of Generic class. Ideally we would want to say
Module.class, but that is not possiblepublic SensorSpecificModule(USAR2004Bot bot, String name, Class<Module> c)
bot - USAR2004Bot variable for creating sensor instancename - Name of the modulec - Class definition of Generic class. Ideally we would want to say
Module.class, but that is not possiblepublic Boolean isReady()
public boolean isReaded()
public Module getModule()
protected void fillModule(SensorMessage message)
message - 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.