cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric
Class Requests
java.lang.Object
cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT>
cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule<UT2004Bot>
cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.Requests
- All Implemented Interfaces:
- IComponent
public class Requests
- extends SensomotoricModule<UT2004Bot>
Memory module specialized on requests to the map.
It is designed to be initialized inside IUT2004BotController.initializeController(UT2004Bot)
method call
and may be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage)
is called.
- Author:
- Juraj 'Loque' Simlovic
Method Summary |
protected void |
cleanUp()
|
cz.cuni.amis.utils.flag.Flag<Long> |
getLastPong()
Returns flag that holds the value of 'last pong receive time'. |
cz.cuni.amis.utils.flag.Flag<Long> |
ping()
Sends PING message to the server, use getLastPong() to see the results. |
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, start, stop, toString |
Requests
public Requests(UT2004Bot bot)
- Constructor. Setups the memory module based on given WorldView.
- Parameters:
bot
- worldView WorldView object to read the info from.
Requests
public Requests(UT2004Bot bot,
Logger log)
- Constructor. Setups the memory module based on given WorldView.
- Parameters:
bot
- worldView WorldView object to read the info from.log
- Logger to be used for logging runtime/debug info. If null, module creates its own logger.
ping
public cz.cuni.amis.utils.flag.Flag<Long> ping()
- Sends PING message to the server, use
getLastPong()
to see the results.
- Returns:
- flag that contains
System.currentTimeMillis()
readings of the last Pong
message received.
getLastPong
public cz.cuni.amis.utils.flag.Flag<Long> getLastPong()
- Returns flag that holds the value of 'last pong receive time'.
cleanUp
protected void cleanUp()
- Overrides:
cleanUp
in class AgentModule<UT2004Bot>
Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.