edu.nps.moves.dismobile
Class EntityStatePdu

java.lang.Object
  extended by edu.nps.moves.dismobile.Pdu
      extended by edu.nps.moves.dismobile.EntityInformationFamilyPdu
          extended by edu.nps.moves.dismobile.EntityStatePdu
All Implemented Interfaces:
java.io.Serializable

public class EntityStatePdu
extends EntityInformationFamilyPdu
implements java.io.Serializable

Section 5.3.3.1. Represents the postion and state of one entity in the world. COMPLETE Copyright (c) 2008-2010, MOVES Institute, Naval Postgraduate School. All rights reserved. This work is licensed under the BSD open source license, available at https://www.movesinstitute.org/licenses/bsd.html

Author:
DMcG
See Also:
Serialized Form

Field Summary
protected  EntityType alternativeEntityType
           
protected  java.util.List<ArticulationParameter> articulationParameters
          variable length list of articulation parameters
protected  int capabilities
          a series of bit flags
protected  DeadReckoningParameter deadReckoningParameters
          parameters used for dead reckoning
protected  int entityAppearance
          a series of bit flags that are used to help draw the entity, such as smoking, on fire, etc.
protected  EntityID entityID
          Unique ID for an entity that is tied to this state information
protected  Vector3Float entityLinearVelocity
          Describes the speed of the entity in the world
protected  Vector3Double entityLocation
          describes the location of the entity in the world
protected  Orientation entityOrientation
          describes the orientation of the entity, in euler angles
protected  EntityType entityType
          Describes the type of entity in the world
protected  short forceId
          What force this entity is affiliated with, eg red, blue, neutral, etc
protected  Marking marking
          characters that can be used for debugging, or to draw unique strings on the side of entities in the world
protected  byte numberOfArticulationParameters
          How many articulation parameters are in the variable length list
 
Fields inherited from class edu.nps.moves.dismobile.Pdu
exerciseID, padding, pduLength, pduType, protocolFamily, protocolVersion, timestamp
 
Constructor Summary
EntityStatePdu()
          Constructor
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 boolean equalsImpl(java.lang.Object obj)
          Compare all fields that contribute to the state, ignoring transient and static fields, for this and the supplied object
 EntityType getAlternativeEntityType()
           
 java.util.List<ArticulationParameter> getArticulationParameters()
           
 int getCapabilities()
           
 DeadReckoningParameter getDeadReckoningParameters()
           
 int getEntityAppearance()
           
 EntityID getEntityID()
           
 Vector3Float getEntityLinearVelocity()
           
 Vector3Double getEntityLocation()
           
 Orientation getEntityOrientation()
           
 EntityType getEntityType()
           
 short getForceId()
           
 Marking getMarking()
           
 int getMarshalledSize()
           
 byte getNumberOfArticulationParameters()
           
 void marshal(java.nio.ByteBuffer buff)
          Packs a Pdu into the ByteBuffer.
 void marshal(java.io.DataOutputStream dos)
           
 void setAlternativeEntityType(EntityType pAlternativeEntityType)
           
 void setArticulationParameters(java.util.List<ArticulationParameter> pArticulationParameters)
           
 void setCapabilities(int pCapabilities)
           
 void setDeadReckoningParameters(DeadReckoningParameter pDeadReckoningParameters)
           
 void setEntityAppearance(int pEntityAppearance)
           
 void setEntityID(EntityID pEntityID)
           
 void setEntityLinearVelocity(Vector3Float pEntityLinearVelocity)
           
 void setEntityLocation(Vector3Double pEntityLocation)
           
 void setEntityOrientation(Orientation pEntityOrientation)
           
 void setEntityType(EntityType pEntityType)
           
 void setForceId(short pForceId)
           
 void setMarking(Marking pMarking)
           
 void setNumberOfArticulationParameters(byte pNumberOfArticulationParameters)
          Note that setting this value will not change the marshalled value.
 void unmarshal(java.nio.ByteBuffer buff)
          Unpacks a Pdu from the underlying data.
 void unmarshal(java.io.DataInputStream dis)
           
 
Methods inherited from class edu.nps.moves.dismobile.Pdu
getExerciseID, getLength, getPadding, getPduLength, getPduType, getProtocolFamily, getProtocolVersion, getTimestamp, marshal, marshalWithDisAbsoluteTimestamp, marshalWithDisAbsoluteTimestamp, marshalWithDisRelativeTimestamp, marshalWithDisRelativeTimestamp, marshalWithNpsTimestamp, marshalWithNpsTimestamp, marshalWithUnixTimestamp, marshalWithUnixTimestamp, readUnsignedInt, readUnsignedInt, setExerciseID, setPadding, setPduLength, setPduType, setProtocolFamily, setProtocolVersion, setTimestamp
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entityID

protected EntityID entityID
Unique ID for an entity that is tied to this state information


forceId

protected short forceId
What force this entity is affiliated with, eg red, blue, neutral, etc


numberOfArticulationParameters

protected byte numberOfArticulationParameters
How many articulation parameters are in the variable length list


entityType

protected EntityType entityType
Describes the type of entity in the world


alternativeEntityType

protected EntityType alternativeEntityType

entityLinearVelocity

protected Vector3Float entityLinearVelocity
Describes the speed of the entity in the world


entityLocation

protected Vector3Double entityLocation
describes the location of the entity in the world


entityOrientation

protected Orientation entityOrientation
describes the orientation of the entity, in euler angles


entityAppearance

protected int entityAppearance
a series of bit flags that are used to help draw the entity, such as smoking, on fire, etc.


deadReckoningParameters

protected DeadReckoningParameter deadReckoningParameters
parameters used for dead reckoning


marking

protected Marking marking
characters that can be used for debugging, or to draw unique strings on the side of entities in the world


capabilities

protected int capabilities
a series of bit flags


articulationParameters

protected java.util.List<ArticulationParameter> articulationParameters
variable length list of articulation parameters

Constructor Detail

EntityStatePdu

public EntityStatePdu()
Constructor

Method Detail

getMarshalledSize

public int getMarshalledSize()
Overrides:
getMarshalledSize in class EntityInformationFamilyPdu

setEntityID

public void setEntityID(EntityID pEntityID)

getEntityID

public EntityID getEntityID()

setForceId

public void setForceId(short pForceId)

getForceId

public short getForceId()

getNumberOfArticulationParameters

public byte getNumberOfArticulationParameters()

setNumberOfArticulationParameters

public void setNumberOfArticulationParameters(byte pNumberOfArticulationParameters)
Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose. The getnumberOfArticulationParameters method will also be based on the actual list length rather than this value. The method is simply here for java bean completeness.


setEntityType

public void setEntityType(EntityType pEntityType)

getEntityType

public EntityType getEntityType()

setAlternativeEntityType

public void setAlternativeEntityType(EntityType pAlternativeEntityType)

getAlternativeEntityType

public EntityType getAlternativeEntityType()

setEntityLinearVelocity

public void setEntityLinearVelocity(Vector3Float pEntityLinearVelocity)

getEntityLinearVelocity

public Vector3Float getEntityLinearVelocity()

setEntityLocation

public void setEntityLocation(Vector3Double pEntityLocation)

getEntityLocation

public Vector3Double getEntityLocation()

setEntityOrientation

public void setEntityOrientation(Orientation pEntityOrientation)

getEntityOrientation

public Orientation getEntityOrientation()

setEntityAppearance

public void setEntityAppearance(int pEntityAppearance)

getEntityAppearance

public int getEntityAppearance()

setDeadReckoningParameters

public void setDeadReckoningParameters(DeadReckoningParameter pDeadReckoningParameters)

getDeadReckoningParameters

public DeadReckoningParameter getDeadReckoningParameters()

setMarking

public void setMarking(Marking pMarking)

getMarking

public Marking getMarking()

setCapabilities

public void setCapabilities(int pCapabilities)

getCapabilities

public int getCapabilities()

setArticulationParameters

public void setArticulationParameters(java.util.List<ArticulationParameter> pArticulationParameters)

getArticulationParameters

public java.util.List<ArticulationParameter> getArticulationParameters()

marshal

public void marshal(java.io.DataOutputStream dos)
Overrides:
marshal in class EntityInformationFamilyPdu

unmarshal

public void unmarshal(java.io.DataInputStream dis)
Overrides:
unmarshal in class EntityInformationFamilyPdu

marshal

public void marshal(java.nio.ByteBuffer buff)
Packs a Pdu into the ByteBuffer.

Overrides:
marshal in class EntityInformationFamilyPdu
Parameters:
buff - The ByteBuffer at the position to begin writing
Throws:
java.nio.BufferOverflowException - if buff is too small
java.nio.ReadOnlyBufferException - if buff is read only
Since:
??
See Also:
ByteBuffer

unmarshal

public void unmarshal(java.nio.ByteBuffer buff)
Unpacks a Pdu from the underlying data.

Overrides:
unmarshal in class EntityInformationFamilyPdu
Parameters:
buff - The ByteBuffer at the position to begin reading
Throws:
java.nio.BufferUnderflowException - if buff is too small
Since:
??
See Also:
ByteBuffer

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class EntityInformationFamilyPdu

equalsImpl

public boolean equalsImpl(java.lang.Object obj)
Description copied from class: Pdu
Compare all fields that contribute to the state, ignoring transient and static fields, for this and the supplied object

Overrides:
equalsImpl in class EntityInformationFamilyPdu
Parameters:
obj - the object to compare to
Returns:
true if the objects are equal, false otherwise.