edu.nps.moves.dis7mobile
Class EntityStatePdu

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

public class EntityStatePdu
extends EntityInformationFamilyPdu
implements java.io.Serializable

Represents the postion and state of one entity in the world. Section 7.2.2. 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  long capabilities
          a series of bit flags
protected  DeadReckoningParameters deadReckoningParameters
          parameters used for dead reckoning
protected  long 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  EulerAngles 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  EntityMarking marking
          characters that can be used for debugging, or to draw unique strings on the side of entities in the world
protected  short numberOfVariableParameters
          How many variable parameters are in the variable length list.
protected  java.util.List<VariableParameter> variableParameters
          variable length list of variable parameters.
 
Fields inherited from class edu.nps.moves.dis7mobile.Pdu
padding, pduStatus
 
Fields inherited from class edu.nps.moves.dis7mobile.PduSuperclass
exerciseID, length, 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()
           
 long getCapabilities()
           
 DeadReckoningParameters getDeadReckoningParameters()
           
 long getEntityAppearance()
           
 EntityID getEntityID()
           
 Vector3Float getEntityLinearVelocity()
           
 Vector3Double getEntityLocation()
           
 EulerAngles getEntityOrientation()
           
 EntityType getEntityType()
           
 short getForceId()
           
 EntityMarking getMarking()
           
 int getMarshalledSize()
           
 short getNumberOfVariableParameters()
           
 java.util.List<VariableParameter> getVariableParameters()
           
 void marshal(java.nio.ByteBuffer buff)
          Packs a Pdu into the ByteBuffer.
 void marshal(java.io.DataOutputStream dos)
           
 void setAlternativeEntityType(EntityType pAlternativeEntityType)
           
 void setCapabilities(long pCapabilities)
           
 void setDeadReckoningParameters(DeadReckoningParameters pDeadReckoningParameters)
           
 void setEntityAppearance(long pEntityAppearance)
           
 void setEntityID(EntityID pEntityID)
           
 void setEntityLinearVelocity(Vector3Float pEntityLinearVelocity)
           
 void setEntityLocation(Vector3Double pEntityLocation)
           
 void setEntityOrientation(EulerAngles pEntityOrientation)
           
 void setEntityType(EntityType pEntityType)
           
 void setForceId(short pForceId)
           
 void setMarking(EntityMarking pMarking)
           
 void setNumberOfVariableParameters(short pNumberOfVariableParameters)
          Note that setting this value will not change the marshalled value.
 void setVariableParameters(java.util.List<VariableParameter> pVariableParameters)
           
 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.dis7mobile.Pdu
getPadding, getPduStatus, marshal, setPadding, setPduStatus
 
Methods inherited from class edu.nps.moves.dis7mobile.PduSuperclass
getExerciseID, getLength, getPduType, getProtocolFamily, getProtocolVersion, getTimestamp, setExerciseID, setLength, 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


numberOfVariableParameters

protected short numberOfVariableParameters
How many variable parameters are in the variable length list. In earlier versions of DIS these were known as articulation parameters


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 EulerAngles entityOrientation
describes the orientation of the entity, in euler angles


entityAppearance

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


deadReckoningParameters

protected DeadReckoningParameters deadReckoningParameters
parameters used for dead reckoning


marking

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


capabilities

protected long capabilities
a series of bit flags


variableParameters

protected java.util.List<VariableParameter> variableParameters
variable length list of variable parameters. In earlier DIS versions this was 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()

getNumberOfVariableParameters

public short getNumberOfVariableParameters()

setNumberOfVariableParameters

public void setNumberOfVariableParameters(short pNumberOfVariableParameters)
Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose. The getnumberOfVariableParameters 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(EulerAngles pEntityOrientation)

getEntityOrientation

public EulerAngles getEntityOrientation()

setEntityAppearance

public void setEntityAppearance(long pEntityAppearance)

getEntityAppearance

public long getEntityAppearance()

setDeadReckoningParameters

public void setDeadReckoningParameters(DeadReckoningParameters pDeadReckoningParameters)

getDeadReckoningParameters

public DeadReckoningParameters getDeadReckoningParameters()

setMarking

public void setMarking(EntityMarking pMarking)

getMarking

public EntityMarking getMarking()

setCapabilities

public void setCapabilities(long pCapabilities)

getCapabilities

public long getCapabilities()

setVariableParameters

public void setVariableParameters(java.util.List<VariableParameter> pVariableParameters)

getVariableParameters

public java.util.List<VariableParameter> getVariableParameters()

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: PduSuperclass
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.