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

Package class diagram package ConfigurationObserver
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.CommandMessage
      extended by cz.cuni.amis.pogamut.udk.communication.messages.gbcommands.ConfigurationObserver

public class ConfigurationObserver
extends CommandMessage

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 command is CONF.


Field Summary
protected  boolean All
          Toggles sending all messages with every update.
protected  boolean Async
          Whether to send asynchronous messages, such as HIT or AIN.
protected  boolean Game
          Whether to send game-related messages with every update.
protected  boolean See
          Whether to send messages about what the observed player sees with every update.
protected  boolean Self
          Whether to send messages about the observed player with every update.
protected  boolean Special
          Whether to send messages about special objects on the map with every update.
protected  double Update
          The frequency (in seconds) you will receive updates from the observer.
protected  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(double UpdateTime, double Update, boolean Game, boolean Self, boolean See, boolean Special, boolean All, boolean Async)
          Creates new instance of command ConfigurationObserver.
 
Method Summary
 double getUpdate()
          The frequency (in seconds) you will receive updates from the observer.
 double getUpdateTime()
          The frequency (in seconds) you will receive updates from the observer.
 boolean isAll()
          Toggles sending all messages with every update.
 boolean isAsync()
          Whether to send asynchronous messages, such as HIT or AIN.
 boolean isGame()
          Whether to send game-related messages with every update.
 boolean isSee()
          Whether to send messages about what the observed player sees with every update.
 boolean isSelf()
          Whether to send messages about the observed player with every update.
 boolean isSpecial()
          Whether to send messages about special objects on the map with every update.
 ConfigurationObserver setAll(boolean All)
          Toggles sending all messages with every update.
 ConfigurationObserver setAsync(boolean Async)
          Whether to send asynchronous messages, such as HIT or AIN.
 ConfigurationObserver setGame(boolean Game)
          Whether to send game-related messages with every update.
 ConfigurationObserver setSee(boolean See)
          Whether to send messages about what the observed player sees with every update.
 ConfigurationObserver setSelf(boolean Self)
          Whether to send messages about the observed player with every update.
 ConfigurationObserver setSpecial(boolean Special)
          Whether to send messages about special objects on the map with every update.
 ConfigurationObserver setUpdate(double Update)
          The frequency (in seconds) you will receive updates from the observer.
 ConfigurationObserver setUpdateTime(double UpdateTime)
          The frequency (in seconds) you will receive updates from the observer.
 String toHtmlString()
           
 String toMessage()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UpdateTime

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


Update

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


Game

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


Self

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


See

protected 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 boolean Special
Whether to send messages about special objects on the map with every update. Affects the following messages: FLG, BOM, DOM.


All

protected 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 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(double UpdateTime,
                             double Update,
                             boolean Game,
                             boolean Self,
                             boolean See,
                             boolean Special,
                             boolean All,
                             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!


ConfigurationObserver

public ConfigurationObserver(ConfigurationObserver original)
Cloning constructor.

Method Detail

getUpdateTime

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


setUpdateTime

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


getUpdate

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


setUpdate

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


isGame

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


setGame

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


isSelf

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


setSelf

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


isSee

public 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(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 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(boolean Special)
Whether to send messages about special objects on the map with every update. Affects the following messages: FLG, BOM, DOM.


isAll

public 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(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 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(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 String toString()
Overrides:
toString in class CommandMessage

toHtmlString

public String toHtmlString()

toMessage

public String toMessage()


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