cz.cuni.amis.pogamut.udk.agent.module.sensomotoric
Class Requests

Package class diagram package Requests
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT>
      extended by cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule<UDKBot>
          extended by cz.cuni.amis.pogamut.udk.agent.module.sensomotoric.Requests
All Implemented Interfaces:
IComponent

public class Requests
extends SensomotoricModule<UDKBot>

Memory module specialized on requests to the map.

It is designed to be initialized inside IUDKBotController.initializeController(UDKBot) method call and may be used since IUDKBotController.botInitialized(cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages.GameInfo, cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages.ConfigChange, cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages.InitedMessage) is called.

Author:
Juraj 'Loque' Simlovic

Field Summary
 
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
Requests(UDKBot bot)
          Constructor.
Requests(UDKBot bot, Logger log)
          Constructor.
 
Method Summary
 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.
protected  void start(boolean startPaused)
          Provides initialization of the module (clearing internal data structures).
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule
cleanUp, getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Requests

public Requests(UDKBot bot)
Constructor. Setups the memory module based on given WorldView.

Parameters:
bot - worldView WorldView object to read the info from.

Requests

public Requests(UDKBot 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.
Method Detail

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'.


start

protected void start(boolean startPaused)
Provides initialization of the module (clearing internal data structures). Called automatically during the agent starting sequence.

Overrides:
start in class AgentModule<UDKBot>


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.