cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages
Class FastTraceResponse

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.FastTraceResponse
All Implemented Interfaces:
IWorldChangeEvent, IWorldEvent, Event

public class FastTraceResponse
extends InfoMessage
implements IWorldEvent, IWorldChangeEvent

Definition of the event FTR.

Complete message documentation: Asynchronous message. Response of the FASTTRACE command. Note that trace commands are computationally expensive.


Field Summary
protected  Location From
          Location from which the ray is emitted.
protected  java.lang.String Id
          An Id matching the one sent by client.
static java.lang.String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  boolean Result
          True if it hit something, false if not.
protected  long SimTime
           
protected  Location To
          Location to which the ray is sent.
 
Constructor Summary
FastTraceResponse()
          Parameter-less contructor for the message.
FastTraceResponse(FastTraceResponse original)
          Cloning constructor from the full message.
FastTraceResponse(java.lang.String Id, Location From, Location To, boolean Result)
          Creates new instance of the message FastTraceResponse.
 
Method Summary
 Location getFrom()
          Location from which the ray is emitted.
 java.lang.String getId()
          An Id matching the one sent by client.
 long getSimTime()
          Returns the simulation time when the event has occurred.
 Location getTo()
          Location to which the ray is sent.
 boolean isResult()
          True if it hit something, false if not.
protected  void setSimTime(long SimTime)
          Used by Yylex to slip correct time of the object or programmatically.
 java.lang.String toHtmlString()
           
 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

SimTime

protected long SimTime

Id

protected java.lang.String Id
An Id matching the one sent by client. Allows bot to match answer with right query.


From

protected Location From
Location from which the ray is emitted.


To

protected Location To
Location to which the ray is sent.


Result

protected boolean Result
True if it hit something, false if not.

Constructor Detail

FastTraceResponse

public FastTraceResponse()
Parameter-less contructor for the message.


FastTraceResponse

public FastTraceResponse(java.lang.String Id,
                         Location From,
                         Location To,
                         boolean Result)
Creates new instance of the message FastTraceResponse. Asynchronous message. Response of the FASTTRACE command. Note that trace commands are computationally expensive. Corresponding GameBots message is FTR.

Parameters:
Id - An Id matching the one sent by client. Allows bot to match answer with right query.
From - Location from which the ray is emitted.
To - Location to which the ray is sent.
Result - True if it hit something, false if not.

FastTraceResponse

public FastTraceResponse(FastTraceResponse original)
Cloning constructor from the full message.

Parameters:
original -
Method Detail

getSimTime

public long getSimTime()
Description copied from interface: IWorldEvent
Returns the simulation time when the event has occurred.

Specified by:
getSimTime in interface IWorldChangeEvent
Specified by:
getSimTime in interface IWorldEvent
Returns:
timestamp

setSimTime

protected void setSimTime(long SimTime)
Used by Yylex to slip correct time of the object or programmatically.


getId

public java.lang.String getId()
An Id matching the one sent by client. Allows bot to match answer with right query.


getFrom

public Location getFrom()
Location from which the ray is emitted.


getTo

public Location getTo()
Location to which the ray is sent.


isResult

public boolean isResult()
True if it hit something, false if not.


toString

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

toHtmlString

public java.lang.String toHtmlString()