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

Package class diagram package LocationUpdateMessage
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.LocationUpdate
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.LocationUpdateMessage
All Implemented Interfaces:
IWorldChangeEvent, IWorldObjectUpdatedEvent, IWorldEvent, IWorldObject, ICompositeWorldObjectUpdatedEvent, ICompositeWorldObject, cz.cuni.amis.utils.listener.Event

public class LocationUpdateMessage
extends LocationUpdate
implements IWorldObjectUpdatedEvent, ICompositeWorldObjectUpdatedEvent

Implementation of the GameBots2004 message UPD contains also its Local/Shared/Static subpart class definitions..

Complete message documentation: "Synchronous" message. Arrives outside sync. batch. The frequency of this message is configured through locUpdateMultiplier variable in GameBots2004.ini file. It gets exported N times faster than regular sync. batch where N equals locUpdateMultiplier. Holds information about Location, Velocity and Rotation of the bot and should help us to create more robust navigation.


Nested Class Summary
 class LocationUpdateMessage.LocationUpdateLocalMessage
          Implementation of the local part of the GameBots2004 message UPD, used to facade UPDMessage.
 class LocationUpdateMessage.LocationUpdateSharedMessage
          Implementation of the shared part of the GameBots2004 message UPD, used to facade UPDMessage.
 class LocationUpdateMessage.LocationUpdateStaticMessage
          Implementation of the static part of the GameBots2004 message UPD, used to facade UPDMessage.
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.LocationUpdate
LocationUpdate.LocationUpdateUpdate
 
Nested classes/interfaces inherited from interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent
IWorldObjectUpdatedEvent.DestroyWorldObject
 
Field Summary
protected  UnrealId Id
          Unique Id of this update message instance.
protected  boolean Id_Set
          Whether property 'Id' was received from GB2004.
protected  Location Loc
          An absolute location of the bot.
protected  boolean Loc_Set
          Whether property 'Loc' was received from GB2004.
protected  Rotation Rot
          Which direction the bot is facing in absolute terms.
protected  boolean Rot_Set
          Whether property 'Rot' was received from GB2004.
protected  ITeamId TeamId
           
protected  Velocity Vel
          Absolute velocity of the bot as a vector of movement per one game second.
protected  boolean Vel_Set
          Whether property 'Vel' was received from GB2004.
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.LocationUpdate
PROTOTYPE, SimTime
 
Constructor Summary
LocationUpdateMessage()
          Parameter-less contructor for the message.
LocationUpdateMessage(LocationUpdateMessage original)
          Cloning constructor from the full message.
LocationUpdateMessage(UnrealId Id, Location Loc, Velocity Vel, Rotation Rot)
          Creates new instance of the message LocationUpdate.
 
Method Summary
 UnrealId getId()
          Unique Id of this update message instance.
 Location getLoc()
          An absolute location of the bot.
 LocationUpdateLocal getLocal()
           
 ILocalWorldObjectUpdatedEvent getLocalEvent()
           
 Rotation getRot()
          Which direction the bot is facing in absolute terms.
 LocationUpdateShared getShared()
           
 ISharedWorldObjectUpdatedEvent getSharedEvent()
           
 LocationUpdateStatic getStatic()
           
 IStaticWorldObjectUpdatedEvent getStaticEvent()
           
 ITeamId getTeamId()
           
 Velocity getVel()
          Absolute velocity of the bot as a vector of movement per one game second.
protected  void setTeamId(ITeamId TeamId)
          Used by Yylex to slip corretn TeamId.
 String toHtmlString()
           
 String toString()
           
 IWorldObjectUpdateResult<IWorldObject> update(IWorldObject object)
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.LocationUpdate
getSimTime, setSimTime, toJsonLiteral
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent
getSimTime
 

Field Detail

TeamId

protected ITeamId TeamId

Id

protected UnrealId Id
Unique Id of this update message instance.


Id_Set

protected boolean Id_Set
Whether property 'Id' was received from GB2004.


Loc

protected Location Loc
An absolute location of the bot.


Loc_Set

protected boolean Loc_Set
Whether property 'Loc' was received from GB2004.


Vel

protected Velocity Vel
Absolute velocity of the bot as a vector of movement per one game second.


Vel_Set

protected boolean Vel_Set
Whether property 'Vel' was received from GB2004.


Rot

protected Rotation Rot
Which direction the bot is facing in absolute terms.


Rot_Set

protected boolean Rot_Set
Whether property 'Rot' was received from GB2004.

Constructor Detail

LocationUpdateMessage

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


LocationUpdateMessage

public LocationUpdateMessage(UnrealId Id,
                             Location Loc,
                             Velocity Vel,
                             Rotation Rot)
Creates new instance of the message LocationUpdate. "Synchronous" message. Arrives outside sync. batch. The frequency of this message is configured through locUpdateMultiplier variable in GameBots2004.ini file. It gets exported N times faster than regular sync. batch where N equals locUpdateMultiplier. Holds information about Location, Velocity and Rotation of the bot and should help us to create more robust navigation. Corresponding GameBots message is UPD.

Parameters:
Id - Unique Id of this update message instance.
Loc - An absolute location of the bot.
Vel - Absolute velocity of the bot as a vector of movement per one game second.
Rot - Which direction the bot is facing in absolute terms.

LocationUpdateMessage

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

Parameters:
original -
Method Detail

setTeamId

protected void setTeamId(ITeamId TeamId)
Used by Yylex to slip corretn TeamId.


getTeamId

public ITeamId getTeamId()

getId

public UnrealId getId()
Description copied from class: LocationUpdate
Unique Id of this update message instance.

Specified by:
getId in interface IWorldObjectUpdatedEvent
Specified by:
getId in interface IWorldObject
Specified by:
getId in interface ICompositeWorldObjectUpdatedEvent
Specified by:
getId in class LocationUpdate

getLoc

public Location getLoc()
Description copied from class: LocationUpdate
An absolute location of the bot.

Specified by:
getLoc in class LocationUpdate

getVel

public Velocity getVel()
Description copied from class: LocationUpdate
Absolute velocity of the bot as a vector of movement per one game second.

Specified by:
getVel in class LocationUpdate

getRot

public Rotation getRot()
Description copied from class: LocationUpdate
Which direction the bot is facing in absolute terms.

Specified by:
getRot in class LocationUpdate

getLocal

public LocationUpdateLocal getLocal()
Specified by:
getLocal in interface ICompositeWorldObject

getShared

public LocationUpdateShared getShared()
Specified by:
getShared in interface ICompositeWorldObject

getStatic

public LocationUpdateStatic getStatic()
Specified by:
getStatic in interface ICompositeWorldObject

update

public IWorldObjectUpdateResult<IWorldObject> update(IWorldObject object)
Specified by:
update in interface IWorldObjectUpdatedEvent

getLocalEvent

public ILocalWorldObjectUpdatedEvent getLocalEvent()
Specified by:
getLocalEvent in interface ICompositeWorldObjectUpdatedEvent

getSharedEvent

public ISharedWorldObjectUpdatedEvent getSharedEvent()
Specified by:
getSharedEvent in interface ICompositeWorldObjectUpdatedEvent

getStaticEvent

public IStaticWorldObjectUpdatedEvent getStaticEvent()
Specified by:
getStaticEvent in interface ICompositeWorldObjectUpdatedEvent

toString

public String toString()
Overrides:
toString in class LocationUpdate

toHtmlString

public String toHtmlString()
Overrides:
toHtmlString in class LocationUpdate


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