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

Package class diagram package VehicleMessage
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Vehicle
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.VehicleMessage
All Implemented Interfaces:
cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent, cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent, cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEvent, cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject, cz.cuni.amis.pogamut.base3d.worldview.object.ILocated, cz.cuni.amis.pogamut.base3d.worldview.object.ILocomotive, cz.cuni.amis.pogamut.base3d.worldview.object.IRotable, cz.cuni.amis.pogamut.base3d.worldview.object.IViewable, cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent, cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObject, IGBViewable, cz.cuni.amis.utils.listener.Event

public class VehicleMessage
extends Vehicle
implements cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent, cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent

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

Complete message documentation: Synchronous message. Holds vehicles we see. Id for vehicles doesn't work, so this message is without Id. We can join vehicles by ENTER command if we are close enough - ussually 100 ut units or less. Note: Vehicle support is in aplha testing right now.


Nested Class Summary
 class VehicleMessage.VehicleLocalMessage
          Implementation of the local part of the GameBots2004 message VEH, used to facade VEHMessage.
 class VehicleMessage.VehicleSharedMessage
          Implementation of the shared part of the GameBots2004 message VEH, used to facade VEHMessage.
 class VehicleMessage.VehicleStaticMessage
          Implementation of the static part of the GameBots2004 message VEH, used to facade VEHMessage.
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Vehicle
Vehicle.ObjectDisappeared, Vehicle.VehicleUpdate
 
Field Summary
protected  Integer Armor
          How much the vehicle has left.
protected  boolean Armor_Set
          Whether property 'Armor' was received from GB2004.
protected  cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Driver
          Unique Id of the driver - if any.
protected  boolean Driver_Set
          Whether property 'Driver' was received from GB2004.
protected  Integer Health
          How much health the vehicle has left.
protected  boolean Health_Set
          Whether property 'Health' was received from GB2004.
protected  cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id
          Unique Id of the vehicle or vehicle part.
protected  boolean Id_Set
          Whether property 'Id' was received from GB2004.
protected  cz.cuni.amis.pogamut.base3d.worldview.object.Location Location
          An absolute location of the vehicle within the map.
protected  boolean Location_Set
          Whether property 'Location' was received from GB2004.
protected  cz.cuni.amis.pogamut.base3d.worldview.object.Rotation Rotation
          Which direction the vehicle is facing in absolute terms.
protected  boolean Rotation_Set
          Whether property 'Rotation' was received from GB2004.
protected  Integer Team
          What team the vehicle is on.
protected  boolean Team_Set
          Whether property 'Team' was received from GB2004.
protected  cz.cuni.amis.pogamut.multi.agent.ITeamId TeamId
           
protected  boolean TeamLocked
          If the vehicle is locked just for its current team.
protected  boolean TeamLocked_Set
          Whether property 'TeamLocked' was received from GB2004.
protected  String Type
          Class of the vehicle.
protected  boolean Type_Set
          Whether property 'Type' was received from GB2004.
protected  cz.cuni.amis.pogamut.base3d.worldview.object.Velocity Velocity
          Absolute velocity of the vehicle as a vector of movement per one game second.
protected  boolean Velocity_Set
          Whether property 'Velocity' was received from GB2004.
protected  boolean Visible
          If the vehicle is in the field of view of the bot.
protected  boolean Visible_Set
          Whether property 'Visible' was received from GB2004.
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Vehicle
PROTOTYPE, SimTime
 
Constructor Summary
VehicleMessage()
          Parameter-less contructor for the message.
VehicleMessage(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id, cz.cuni.amis.pogamut.base3d.worldview.object.Rotation Rotation, cz.cuni.amis.pogamut.base3d.worldview.object.Location Location, cz.cuni.amis.pogamut.base3d.worldview.object.Velocity Velocity, boolean Visible, Integer Team, Integer Health, Integer Armor, cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Driver, boolean TeamLocked, String Type)
          Creates new instance of the message Vehicle.
VehicleMessage(VehicleMessage original)
          Cloning constructor from the full message.
 
Method Summary
 Integer getArmor()
          How much the vehicle has left.
 cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getDriver()
          Unique Id of the driver - if any.
 Integer getHealth()
          How much health the vehicle has left.
 cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getId()
          Unique Id of the vehicle or vehicle part.
 VehicleLocal getLocal()
           
 cz.cuni.amis.pogamut.multi.communication.translator.event.ILocalWorldObjectUpdatedEvent getLocalEvent()
           
 cz.cuni.amis.pogamut.base3d.worldview.object.Location getLocation()
          An absolute location of the vehicle within the map.
 cz.cuni.amis.pogamut.base3d.worldview.object.Rotation getRotation()
          Which direction the vehicle is facing in absolute terms.
 VehicleShared getShared()
           
 cz.cuni.amis.pogamut.multi.communication.translator.event.ISharedWorldObjectUpdatedEvent getSharedEvent()
           
 VehicleStatic getStatic()
           
 cz.cuni.amis.pogamut.multi.communication.translator.event.IStaticWorldObjectUpdatedEvent getStaticEvent()
           
 Integer getTeam()
          What team the vehicle is on.
 cz.cuni.amis.pogamut.multi.agent.ITeamId getTeamId()
           
 String getType()
          Class of the vehicle.
 cz.cuni.amis.pogamut.base3d.worldview.object.Velocity getVelocity()
          Absolute velocity of the vehicle as a vector of movement per one game second.
 boolean isTeamLocked()
          If the vehicle is locked just for its current team.
 boolean isVisible()
          If the vehicle is in the field of view of the bot.
protected  void setTeamId(cz.cuni.amis.pogamut.multi.agent.ITeamId TeamId)
          Used by Yylex to slip corretn TeamId.
 String toHtmlString()
           
 String toString()
           
 cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult<cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject> update(cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject object)
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Vehicle
createDisappearEvent, getSimTime, setSimTime
 
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 cz.cuni.amis.pogamut.multi.agent.ITeamId TeamId

Id

protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id
Unique Id of the vehicle or vehicle part.


Id_Set

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


Rotation

protected cz.cuni.amis.pogamut.base3d.worldview.object.Rotation Rotation
Which direction the vehicle is facing in absolute terms.


Rotation_Set

protected boolean Rotation_Set
Whether property 'Rotation' was received from GB2004.


Location

protected cz.cuni.amis.pogamut.base3d.worldview.object.Location Location
An absolute location of the vehicle within the map.


Location_Set

protected boolean Location_Set
Whether property 'Location' was received from GB2004.


Velocity

protected cz.cuni.amis.pogamut.base3d.worldview.object.Velocity Velocity
Absolute velocity of the vehicle as a vector of movement per one game second.


Velocity_Set

protected boolean Velocity_Set
Whether property 'Velocity' was received from GB2004.


Visible

protected boolean Visible
If the vehicle is in the field of view of the bot.


Visible_Set

protected boolean Visible_Set
Whether property 'Visible' was received from GB2004.


Team

protected Integer Team
What team the vehicle is on. 255 is no team. 0-3 are red, blue, green, gold in that order.


Team_Set

protected boolean Team_Set
Whether property 'Team' was received from GB2004.


Health

protected Integer Health
How much health the vehicle has left. Ranges from 0 to x, depending on the vehicle type.


Health_Set

protected boolean Health_Set
Whether property 'Health' was received from GB2004.


Armor

protected Integer Armor
How much the vehicle has left. Note: This may be 0 all the time. Maybe the vehicles are not supporting armor.


Armor_Set

protected boolean Armor_Set
Whether property 'Armor' was received from GB2004.


Driver

protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Driver
Unique Id of the driver - if any.


Driver_Set

protected boolean Driver_Set
Whether property 'Driver' was received from GB2004.


TeamLocked

protected boolean TeamLocked
If the vehicle is locked just for its current team.


TeamLocked_Set

protected boolean TeamLocked_Set
Whether property 'TeamLocked' was received from GB2004.


Type

protected String Type
Class of the vehicle. If it is a car, turret etc.


Type_Set

protected boolean Type_Set
Whether property 'Type' was received from GB2004.

Constructor Detail

VehicleMessage

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


VehicleMessage

public VehicleMessage(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id,
                      cz.cuni.amis.pogamut.base3d.worldview.object.Rotation Rotation,
                      cz.cuni.amis.pogamut.base3d.worldview.object.Location Location,
                      cz.cuni.amis.pogamut.base3d.worldview.object.Velocity Velocity,
                      boolean Visible,
                      Integer Team,
                      Integer Health,
                      Integer Armor,
                      cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Driver,
                      boolean TeamLocked,
                      String Type)
Creates new instance of the message Vehicle. Synchronous message. Holds vehicles we see. Id for vehicles doesn't work, so this message is without Id. We can join vehicles by ENTER command if we are close enough - ussually 100 ut units or less. Note: Vehicle support is in aplha testing right now. Corresponding GameBots message is VEH.

Parameters:
Id - Unique Id of the vehicle or vehicle part.
Rotation - Which direction the vehicle is facing in absolute terms.
Location - An absolute location of the vehicle within the map.
Velocity - Absolute velocity of the vehicle as a vector of movement per one game second.
Visible - If the vehicle is in the field of view of the bot.
Team - What team the vehicle is on. 255 is no team. 0-3 are red, blue, green, gold in that order.
Health - How much health the vehicle has left. Ranges from 0 to x, depending on the vehicle type.
Armor - How much the vehicle has left. Note: This may be 0 all the time. Maybe the vehicles are not supporting armor.
Driver - Unique Id of the driver - if any.
TeamLocked - If the vehicle is locked just for its current team.
Type - Class of the vehicle. If it is a car, turret etc.

VehicleMessage

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

Parameters:
original -
Method Detail

setTeamId

protected void setTeamId(cz.cuni.amis.pogamut.multi.agent.ITeamId TeamId)
Used by Yylex to slip corretn TeamId.


getTeamId

public cz.cuni.amis.pogamut.multi.agent.ITeamId getTeamId()

getId

public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getId()
Description copied from class: Vehicle
Unique Id of the vehicle or vehicle part.

Specified by:
getId in interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent
Specified by:
getId in interface cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject
Specified by:
getId in interface cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent
Specified by:
getId in class Vehicle

getRotation

public cz.cuni.amis.pogamut.base3d.worldview.object.Rotation getRotation()
Description copied from class: Vehicle
Which direction the vehicle is facing in absolute terms.

Specified by:
getRotation in interface cz.cuni.amis.pogamut.base3d.worldview.object.IRotable
Specified by:
getRotation in class Vehicle

getLocation

public cz.cuni.amis.pogamut.base3d.worldview.object.Location getLocation()
Description copied from class: Vehicle
An absolute location of the vehicle within the map.

Specified by:
getLocation in interface cz.cuni.amis.pogamut.base3d.worldview.object.ILocated
Specified by:
getLocation in class Vehicle

getVelocity

public cz.cuni.amis.pogamut.base3d.worldview.object.Velocity getVelocity()
Description copied from class: Vehicle
Absolute velocity of the vehicle as a vector of movement per one game second.

Specified by:
getVelocity in interface cz.cuni.amis.pogamut.base3d.worldview.object.ILocomotive
Specified by:
getVelocity in class Vehicle

isVisible

public boolean isVisible()
Description copied from class: Vehicle
If the vehicle is in the field of view of the bot.

Specified by:
isVisible in interface cz.cuni.amis.pogamut.base3d.worldview.object.IViewable
Specified by:
isVisible in class Vehicle

getTeam

public Integer getTeam()
Description copied from class: Vehicle
What team the vehicle is on. 255 is no team. 0-3 are red, blue, green, gold in that order.

Specified by:
getTeam in class Vehicle

getHealth

public Integer getHealth()
Description copied from class: Vehicle
How much health the vehicle has left. Ranges from 0 to x, depending on the vehicle type.

Specified by:
getHealth in class Vehicle

getArmor

public Integer getArmor()
Description copied from class: Vehicle
How much the vehicle has left. Note: This may be 0 all the time. Maybe the vehicles are not supporting armor.

Specified by:
getArmor in class Vehicle

getDriver

public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getDriver()
Description copied from class: Vehicle
Unique Id of the driver - if any.

Specified by:
getDriver in class Vehicle

isTeamLocked

public boolean isTeamLocked()
Description copied from class: Vehicle
If the vehicle is locked just for its current team.

Specified by:
isTeamLocked in class Vehicle

getType

public String getType()
Description copied from class: Vehicle
Class of the vehicle. If it is a car, turret etc.

Specified by:
getType in class Vehicle

getLocal

public VehicleLocal getLocal()
Specified by:
getLocal in interface cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObject

getShared

public VehicleShared getShared()
Specified by:
getShared in interface cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObject

getStatic

public VehicleStatic getStatic()
Specified by:
getStatic in interface cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObject

update

public cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult<cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject> update(cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject object)
Specified by:
update in interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent

getLocalEvent

public cz.cuni.amis.pogamut.multi.communication.translator.event.ILocalWorldObjectUpdatedEvent getLocalEvent()
Specified by:
getLocalEvent in interface cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent

getSharedEvent

public cz.cuni.amis.pogamut.multi.communication.translator.event.ISharedWorldObjectUpdatedEvent getSharedEvent()
Specified by:
getSharedEvent in interface cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent

getStaticEvent

public cz.cuni.amis.pogamut.multi.communication.translator.event.IStaticWorldObjectUpdatedEvent getStaticEvent()
Specified by:
getStaticEvent in interface cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent

toString

public String toString()
Overrides:
toString in class Vehicle

toHtmlString

public String toHtmlString()
Overrides:
toHtmlString in class Vehicle


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