|
||||||||||
| 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.SensorModule<USAR2004Bot>
cz.cuni.amis.pogamut.usar2004.agent.module.master.SensorMasterModuleQueued
public class SensorMasterModuleQueued
Master module for gathering every sensor message server sends. They are saved respectively by their type and than name. There is a listener for SEN messages that updates data in SensorContainerQueued. Note that this is equvalent with SensorMasterModule. The difference is that the Queued version does not throw out records until it is requiered to do so. It lines them up to lists. This is needed when we want the best quality readings and regular ticks are not enough to keep up with the speed of sensor messages being recieved.
| Field Summary | |
|---|---|
protected cz.cuni.amis.pogamut.usar2004.agent.module.master.SensorMasterModuleQueued.SensorMessageListener |
sensorListener
|
protected SensorsContainerQueued |
sensorModules
|
protected static SensorMasterModuleQueued |
singleton
|
| Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.SensorModule |
|---|
worldView |
| Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
|---|
agent, controller, eventBus, log |
| Constructor Summary | |
|---|---|
SensorMasterModuleQueued(USAR2004Bot bot)
Private ctor |
|
| Method Summary | |
|---|---|
protected void |
cleanUp()
|
protected SuperSensor |
createNewSensor(SensorMessage message)
Asks SensorType enum if it knows SensorType represented by string type. |
protected void |
fileMessage(SensorMessage message)
Updates previous State on genuine Sensor or creates a new Record. |
static SensorMasterModuleQueued |
getModuleInstance(USAR2004Bot bot)
Method for obtaining the singleton. |
List<MessageDescriptor> |
getNonEmptyDescripton()
For each type of sensor it adds all individuals to the returnee List as a couple (Type, Name) |
SuperSensor |
getSensorByTypeName(String type,
String name)
Gets sensor message representatives from local hashmap specified by type and by name. |
List<SuperSensor> |
getSensorsByClass(Class c)
Adds every object that can be casted to initial class to the output list. |
List<SuperSensor> |
getSensorsBySensorType(SensorType type)
Iterates through local hashmap values and seeks match. |
List<SuperSensor> |
getSensorsByType(String type)
Gets sensor message representatives from local hashmap. |
Boolean |
isReady()
Collection of sensor data check. |
boolean |
isSensorReady(SensorType type)
Returns value based on the sensor module element count. |
protected boolean |
updateSensorCollection(SensorMessage 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.SensorMasterModuleQueued.SensorMessageListener sensorListener
protected static SensorMasterModuleQueued singleton
protected SensorsContainerQueued sensorModules
| Constructor Detail |
|---|
public SensorMasterModuleQueued(USAR2004Bot bot)
bot - USAR2004Bot variable for creating instance of each new record
in sensorModules(due to inheritance)| Method Detail |
|---|
public static SensorMasterModuleQueued getModuleInstance(USAR2004Bot bot)
bot - USAR2004Bot parameter for creation of the singleton instance
when called for the first time.
public Boolean isReady()
public List<SuperSensor> getSensorsByType(String type)
type - String representing the type of sensor to return.
public List<SuperSensor> getSensorsBySensorType(SensorType type)
type - SensorType representing the type of sensor to return.
public boolean isSensorReady(SensorType type)
type - SensorType representing the type of sensor.
public List<SuperSensor> getSensorsByClass(Class c)
c - Class representing the type of which the return list should be
public SuperSensor getSensorByTypeName(String type,
String name)
type - String representing the type of sensor to return.name - String representing the name of sensor to return.
public List<MessageDescriptor> getNonEmptyDescripton()
protected SuperSensor createNewSensor(SensorMessage message)
type - String representing possible valid SensorType.
protected boolean updateSensorCollection(SensorMessage message)
message - new SensorMessage object.
protected void fileMessage(SensorMessage 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 | |||||||||