cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands
Class ConfigurationObserver

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.CommandMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.ConfigurationObserver

public class ConfigurationObserver
extends CommandMessage

Representation of the GameBots2004 command CONF. Configures various attributes of the observer. You can include several of the parameters. The state of options you don't specify will remain unchanged.


Field Summary
protected  java.lang.Boolean All
          Toggles sending all messages with every update.
protected  java.lang.Boolean Async
          Whether to send asynchronous messages, such as HIT or AIN.
protected  java.lang.Boolean Game
          Whether to send game-related messages with every update.
static java.lang.String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  java.lang.Boolean See
          Whether to send messages about what the observed player sees with every update.
protected  java.lang.Boolean Self
          Whether to send messages about the observed player with every update.
protected  java.lang.Boolean Special
          Whether to send messages about special objects on the map with every update.
protected  java.lang.Double Update
          The frequency (in seconds) you will receive updates from the observer.
protected  java.lang.Double UpdateTime
          The frequency (in seconds) you will receive updates from the observer.
 
Constructor Summary
ConfigurationObserver()
          Creates new instance of command ConfigurationObserver.
ConfigurationObserver(ConfigurationObserver original)
          Cloning constructor.
ConfigurationObserver(java.lang.Double UpdateTime, java.lang.Double Update, java.lang.Boolean Game, java.lang.Boolean Self, java.lang.Boolean See, java.lang.Boolean Special, java.lang.Boolean All, java.lang.Boolean Async)
          Creates new instance of command ConfigurationObserver.
 
Method Summary
 java.lang.Double getUpdate()
          The frequency (in seconds) you will receive updates from the observer.
 java.lang.Double getUpdateTime()
          The frequency (in seconds) you will receive updates from the observer.
 java.lang.Boolean isAll()
          Toggles sending all messages with every update.
 java.lang.Boolean isAsync()
          Whether to send asynchronous messages, such as HIT or AIN.
 java.lang.Boolean isGame()
          Whether to send game-related messages with every update.
 java.lang.Boolean isSee()
          Whether to send messages about what the observed player sees with every update.
 java.lang.Boolean isSelf()
          Whether to send messages about the observed player with every update.
 java.lang.Boolean isSpecial()
          Whether to send messages about special objects on the map with every update.
 ConfigurationObserver setAll(java.lang.Boolean All)
          Toggles sending all messages with every update.
 ConfigurationObserver setAsync(java.lang.Boolean Async)
          Whether to send asynchronous messages, such as HIT or AIN.
 ConfigurationObserver setGame(java.lang.Boolean Game)
          Whether to send game-related messages with every update.
 ConfigurationObserver setSee(java.lang.Boolean See)
          Whether to send messages about what the observed player sees with every update.
 ConfigurationObserver setSelf(java.lang.Boolean Self)
          Whether to send messages about the observed player with every update.
 ConfigurationObserver setSpecial(java.lang.Boolean Special)
          Whether to send messages about special objects on the map with every update.
 ConfigurationObserver setUpdate(java.lang.Double Update)
          The frequency (in seconds) you will receive updates from the observer.
 ConfigurationObserver setUpdateTime(java.lang.Double UpdateTime)
          The frequency (in seconds) you will receive updates from the observer.
 java.lang.String toHtmlString()
           
 java.lang.String toMessage()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROTOTYPE

public static final java.lang.String PROTOTYPE
Example how the message looks like - used during parser tests.

See Also:
Constant Field Values

UpdateTime

protected java.lang.Double UpdateTime
The frequency (in seconds) you will receive updates from the observer.


Update

protected java.lang.Double Update
The frequency (in seconds) you will receive updates from the observer. Same as UpdateTime.


Game

protected java.lang.Boolean Game
Whether to send game-related messages with every update. Affects the following messages: NFO, PLR.


Self

protected java.lang.Boolean Self
Whether to send messages about the observed player with every update. Affects the following messages: SLF, MYINV.


See

protected java.lang.Boolean See
Whether to send messages about what the observed player sees with every update. Affects the following messages: PLR, INV, NAV, MOV, PRJ, VEH.


Special

protected java.lang.Boolean Special
Whether to send messages about special objects on the map with every update. Affects the following messages: FLG, BOM, DOM.


All

protected java.lang.Boolean All
Toggles sending all messages with every update. You can still receive the messages by asking for them using the commands GAME, SELF, SEE, SPECIAL and ALL.


Async

protected java.lang.Boolean Async
Whether to send asynchronous messages, such as HIT or AIN. Note that if you turn this off you will not be able to receive these messages at all.

Constructor Detail

ConfigurationObserver

public ConfigurationObserver(java.lang.Double UpdateTime,
                             java.lang.Double Update,
                             java.lang.Boolean Game,
                             java.lang.Boolean Self,
                             java.lang.Boolean See,
                             java.lang.Boolean Special,
                             java.lang.Boolean All,
                             java.lang.Boolean Async)
Creates new instance of command ConfigurationObserver. Configures various attributes of the observer. You can include several of the parameters. The state of options you don't specify will remain unchanged. Corresponding GameBots message for this command is CONF.

Parameters:
UpdateTime - The frequency (in seconds) you will receive updates from the observer.
Update - The frequency (in seconds) you will receive updates from the observer. Same as UpdateTime.
Game - Whether to send game-related messages with every update. Affects the following messages: NFO, PLR.
Self - Whether to send messages about the observed player with every update. Affects the following messages: SLF, MYINV.
See - Whether to send messages about what the observed player sees with every update. Affects the following messages: PLR, INV, NAV, MOV, PRJ, VEH.
Special - Whether to send messages about special objects on the map with every update. Affects the following messages: FLG, BOM, DOM.
All - Toggles sending all messages with every update. You can still receive the messages by asking for them using the commands GAME, SELF, SEE, SPECIAL and ALL.
Async - Whether to send asynchronous messages, such as HIT or AIN. Note that if you turn this off you will not be able to receive these messages at all.

ConfigurationObserver

public ConfigurationObserver()
Creates new instance of command ConfigurationObserver. Configures various attributes of the observer. You can include several of the parameters. The state of options you don't specify will remain unchanged. Corresponding GameBots message for this command is CONF.

WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!


ConfigurationObserver

public ConfigurationObserver(ConfigurationObserver original)
Cloning constructor.

Parameters:
original -
Method Detail

getUpdateTime

public java.lang.Double getUpdateTime()
The frequency (in seconds) you will receive updates from the observer.


setUpdateTime

public ConfigurationObserver setUpdateTime(java.lang.Double UpdateTime)
The frequency (in seconds) you will receive updates from the observer.


getUpdate

public java.lang.Double getUpdate()
The frequency (in seconds) you will receive updates from the observer. Same as UpdateTime.


setUpdate

public ConfigurationObserver setUpdate(java.lang.Double Update)
The frequency (in seconds) you will receive updates from the observer. Same as UpdateTime.


isGame

public java.lang.Boolean isGame()
Whether to send game-related messages with every update. Affects the following messages: NFO, PLR.


setGame

public ConfigurationObserver setGame(java.lang.Boolean Game)
Whether to send game-related messages with every update. Affects the following messages: NFO, PLR.


isSelf

public java.lang.Boolean isSelf()
Whether to send messages about the observed player with every update. Affects the following messages: SLF, MYINV.


setSelf

public ConfigurationObserver setSelf(java.lang.Boolean Self)
Whether to send messages about the observed player with every update. Affects the following messages: SLF, MYINV.


isSee

public java.lang.Boolean isSee()
Whether to send messages about what the observed player sees with every update. Affects the following messages: PLR, INV, NAV, MOV, PRJ, VEH.


setSee

public ConfigurationObserver setSee(java.lang.Boolean See)
Whether to send messages about what the observed player sees with every update. Affects the following messages: PLR, INV, NAV, MOV, PRJ, VEH.


isSpecial

public java.lang.Boolean isSpecial()
Whether to send messages about special objects on the map with every update. Affects the following messages: FLG, BOM, DOM.


setSpecial

public ConfigurationObserver setSpecial(java.lang.Boolean Special)
Whether to send messages about special objects on the map with every update. Affects the following messages: FLG, BOM, DOM.


isAll

public java.lang.Boolean isAll()
Toggles sending all messages with every update. You can still receive the messages by asking for them using the commands GAME, SELF, SEE, SPECIAL and ALL.


setAll

public ConfigurationObserver setAll(java.lang.Boolean All)
Toggles sending all messages with every update. You can still receive the messages by asking for them using the commands GAME, SELF, SEE, SPECIAL and ALL.


isAsync

public java.lang.Boolean isAsync()
Whether to send asynchronous messages, such as HIT or AIN. Note that if you turn this off you will not be able to receive these messages at all.


setAsync

public ConfigurationObserver setAsync(java.lang.Boolean Async)
Whether to send asynchronous messages, such as HIT or AIN. Note that if you turn this off you will not be able to receive these messages at all.


toString

public java.lang.String toString()
Overrides:
toString in class CommandMessage

toHtmlString

public java.lang.String toHtmlString()

toMessage

public java.lang.String toMessage()