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

Package class diagram package LocationUpdateCompositeImpl
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.LocationUpdateCompositeImpl
All Implemented Interfaces:
IWorldChangeEvent, IWorldEvent, IWorldObject, ICompositeWorldObject, cz.cuni.amis.utils.listener.Event

public class LocationUpdateCompositeImpl
extends LocationUpdate

Composite implementation of the UPD abstract message. It wraps Local/Shared/Static parts in single object allowing to presenting a nice facade for users.

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
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.LocationUpdate
LocationUpdate.LocationUpdateUpdate
 
Field Summary
protected  LocationUpdateLocalImpl partLocal
           
protected  LocationUpdateStaticImpl partStatic
           
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.LocationUpdate
PROTOTYPE, SimTime
 
Constructor Summary
LocationUpdateCompositeImpl()
          Parameter-less contructor for the message.
LocationUpdateCompositeImpl(LocationUpdateCompositeImpl original)
          Cloning constructor.
LocationUpdateCompositeImpl(LocationUpdateLocalImpl partLocal, LocationUpdateSharedImpl partShared, LocationUpdateStaticImpl partStatic)
          Composite-impl constructor.
 
Method Summary
 UnrealId getId()
          Unique Id of this update message instance.
 Location getLoc()
          An absolute location of the bot.
 LocationUpdateLocal getLocal()
           
 Rotation getRot()
          Which direction the bot is facing in absolute terms.
 LocationUpdateShared getShared()
           
 LocationUpdateStatic getStatic()
           
 Velocity getVel()
          Absolute velocity of the bot as a vector of movement per one game second.
 void setSimTime(long SimTime)
          Used by Yylex to slip correct time of the object or programmatically.
 String toHtmlString()
           
 String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.LocationUpdate
getSimTime, toJsonLiteral
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

partStatic

protected LocationUpdateStaticImpl partStatic

partLocal

protected LocationUpdateLocalImpl partLocal
Constructor Detail

LocationUpdateCompositeImpl

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


LocationUpdateCompositeImpl

public LocationUpdateCompositeImpl(LocationUpdateLocalImpl partLocal,
                                   LocationUpdateSharedImpl partShared,
                                   LocationUpdateStaticImpl partStatic)
Composite-impl constructor. It assembles the message from its three fragments - local/shared/static.

Parameters:
partLocal - local-part of the message
partShared - shared-part of the message
partStatic - static-part of the message

LocationUpdateCompositeImpl

public LocationUpdateCompositeImpl(LocationUpdateCompositeImpl original)
Cloning constructor.

Parameters:
original -
Method Detail

setSimTime

public void setSimTime(long SimTime)
Description copied from class: LocationUpdate
Used by Yylex to slip correct time of the object or programmatically.

Overrides:
setSimTime in class LocationUpdate

getStatic

public LocationUpdateStatic getStatic()

getLocal

public LocationUpdateLocal getLocal()

getShared

public LocationUpdateShared getShared()

getId

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

Specified by:
getId in interface IWorldObject
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

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.