Class FastEntityStatePdu

All Implemented Interfaces:
Marshaller, Serializable

public class FastEntityStatePdu extends EntityInformationFamilyPdu implements Serializable
Represents the position and state of one entity in the world. This is identical in function to entity state pdu, but generates less garbage to collect in the Java world. Section 7.2.2. IEEE Std 1278.1-2012, IEEE Standard for Distributed Interactive Simulation - Application Protocols
See Also:
Serialized Form
  • Field Details

    • site

      protected short site
      The site ID
    • application

      protected short application
      The application ID
    • entity

      protected short entity
      the entity ID
    • forceId

      protected byte forceId
      what force this entity is affiliated with, eg red, blue, neutral, etc
    • numberOfVariableParameters

      protected byte numberOfVariableParameters
      How many variable (nee articulation) parameters are in the variable length list
    • entityKind

      protected byte entityKind
      Kind of entity
    • domain

      protected byte domain
      Domain of entity (air, surface, subsurface, space, etc.)
    • country

      protected short country
      country to which the design of the entity is attributed
    • category

      protected byte category
      category of entity
    • subcategory

      protected byte subcategory
      subcategory of entity
    • specific

      protected byte specific
      specific info based on subcategory field
    • extra

      protected byte extra
      extra is an undescribed parameter...
    • altEntityKind

      protected byte altEntityKind
      Kind of entity
    • altDomain

      protected byte altDomain
      Domain of entity (air, surface, subsurface, space, etc.)
    • altCountry

      protected short altCountry
      country to which the design of the entity is attributed
    • altCategory

      protected byte altCategory
      category of entity
    • altSubcategory

      protected byte altSubcategory
      subcategory of entity
    • altSpecific

      protected byte altSpecific
      specific info based on subcategory field
    • altExtra

      protected byte altExtra
      altExtra is an undescribed parameter...
    • xVelocity

      protected float xVelocity
      X velo
    • yVelocity

      protected float yVelocity
      y Value
    • zVelocity

      protected float zVelocity
      Z value
    • xLocation

      protected double xLocation
      X value
    • yLocation

      protected double yLocation
      y Value
    • zLocation

      protected double zLocation
      Z value
    • psi

      protected float psi
      psi is an undescribed parameter...
    • theta

      protected float theta
      theta is an undescribed parameter...
    • phi

      protected float phi
      phi is an undescribed parameter...
    • entityAppearance

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

      protected byte deadReckoningAlgorithm
      enumeration of what dead reckoning algorighm to use
    • otherParameters

      protected byte[] otherParameters
      other parameters to use in the dead reckoning algorithm
    • xAcceleration

      protected float xAcceleration
      X value
    • yAcceleration

      protected float yAcceleration
      y Value
    • zAcceleration

      protected float zAcceleration
      Z value
    • xAngularVelocity

      protected float xAngularVelocity
      X value
    • yAngularVelocity

      protected float yAngularVelocity
      y Value
    • zAngularVelocity

      protected float zAngularVelocity
      Z value
    • marking

      protected byte[] marking
      characters that can be used for debugging, or to draw unique strings on the side of entities in the world
    • capabilities

      protected short capabilities
      a series of bit flags
    • variableParameters

      protected List<VariableParameter> variableParameters
      variable length list of variable parameters. In earlier versions of DIS these were known as articulation parameters
  • Constructor Details

    • FastEntityStatePdu

      public FastEntityStatePdu()
      Constructor
  • Method Details

    • getMarshalledSize

      public int getMarshalledSize()
      Returns size of this serialized (marshalled) object in bytes
      Specified by:
      getMarshalledSize in interface Marshaller
      Overrides:
      getMarshalledSize in class EntityInformationFamilyPdu
      Returns:
      serialized size in bytes
      See Also:
      https://en.wikipedia.org/wiki/Marshalling_(computer_science)
    • setSite

      public FastEntityStatePdu setSite(short pSite)
      Setter for site
      Parameters:
      pSite - new value of interest
      Returns:
      same object to permit progressive setters
    • setSite

      public FastEntityStatePdu setSite(int pSite)
      Utility setter for site
      Parameters:
      pSite - new value of interest
      Returns:
      same object to permit progressive setters
    • getSite

      public short getSite()
      Getter for site
      Returns:
      value of interest
    • setApplication

      public FastEntityStatePdu setApplication(short pApplication)
      Setter for application
      Parameters:
      pApplication - new value of interest
      Returns:
      same object to permit progressive setters
    • setApplication

      public FastEntityStatePdu setApplication(int pApplication)
      Utility setter for application
      Parameters:
      pApplication - new value of interest
      Returns:
      same object to permit progressive setters
    • getApplication

      public short getApplication()
      Getter for application
      Returns:
      value of interest
    • setEntity

      public FastEntityStatePdu setEntity(short pEntity)
      Setter for entity
      Parameters:
      pEntity - new value of interest
      Returns:
      same object to permit progressive setters
    • setEntity

      public FastEntityStatePdu setEntity(int pEntity)
      Utility setter for entity
      Parameters:
      pEntity - new value of interest
      Returns:
      same object to permit progressive setters
    • getEntity

      public short getEntity()
      Getter for entity
      Returns:
      value of interest
    • setForceId

      public FastEntityStatePdu setForceId(byte pForceId)
      Setter for forceId
      Parameters:
      pForceId - new value of interest
      Returns:
      same object to permit progressive setters
    • setForceId

      public FastEntityStatePdu setForceId(int pForceId)
      Utility setter for forceId
      Parameters:
      pForceId - new value of interest
      Returns:
      same object to permit progressive setters
    • getForceId

      public byte getForceId()
      Getter for forceId
      Returns:
      value of interest
    • setEntityKind

      public FastEntityStatePdu setEntityKind(byte pEntityKind)
      Setter for entityKind
      Parameters:
      pEntityKind - new value of interest
      Returns:
      same object to permit progressive setters
    • setEntityKind

      public FastEntityStatePdu setEntityKind(int pEntityKind)
      Utility setter for entityKind
      Parameters:
      pEntityKind - new value of interest
      Returns:
      same object to permit progressive setters
    • getEntityKind

      public byte getEntityKind()
      Getter for entityKind
      Returns:
      value of interest
    • setDomain

      public FastEntityStatePdu setDomain(byte pDomain)
      Setter for domain
      Parameters:
      pDomain - new value of interest
      Returns:
      same object to permit progressive setters
    • setDomain

      public FastEntityStatePdu setDomain(int pDomain)
      Utility setter for domain
      Parameters:
      pDomain - new value of interest
      Returns:
      same object to permit progressive setters
    • getDomain

      public byte getDomain()
      Getter for domain
      Returns:
      value of interest
    • setCountry

      public FastEntityStatePdu setCountry(short pCountry)
      Setter for country
      Parameters:
      pCountry - new value of interest
      Returns:
      same object to permit progressive setters
    • setCountry

      public FastEntityStatePdu setCountry(int pCountry)
      Utility setter for country
      Parameters:
      pCountry - new value of interest
      Returns:
      same object to permit progressive setters
    • getCountry

      public short getCountry()
      Getter for country
      Returns:
      value of interest
    • setCategory

      public FastEntityStatePdu setCategory(byte pCategory)
      Setter for category
      Parameters:
      pCategory - new value of interest
      Returns:
      same object to permit progressive setters
    • setCategory

      public FastEntityStatePdu setCategory(int pCategory)
      Utility setter for category
      Parameters:
      pCategory - new value of interest
      Returns:
      same object to permit progressive setters
    • getCategory

      public byte getCategory()
      Getter for category
      Returns:
      value of interest
    • setSubcategory

      public FastEntityStatePdu setSubcategory(byte pSubcategory)
      Setter for subcategory
      Parameters:
      pSubcategory - new value of interest
      Returns:
      same object to permit progressive setters
    • setSubcategory

      public FastEntityStatePdu setSubcategory(int pSubcategory)
      Utility setter for subcategory
      Parameters:
      pSubcategory - new value of interest
      Returns:
      same object to permit progressive setters
    • getSubcategory

      public byte getSubcategory()
      Getter for subcategory
      Returns:
      value of interest
    • setSpecific

      public FastEntityStatePdu setSpecific(byte pSpecific)
      Setter for specific
      Parameters:
      pSpecific - new value of interest
      Returns:
      same object to permit progressive setters
    • setSpecific

      public FastEntityStatePdu setSpecific(int pSpecific)
      Utility setter for specific
      Parameters:
      pSpecific - new value of interest
      Returns:
      same object to permit progressive setters
    • getSpecific

      public byte getSpecific()
      Getter for specific
      Returns:
      value of interest
    • setExtra

      public FastEntityStatePdu setExtra(byte pExtra)
      Setter for extra
      Parameters:
      pExtra - new value of interest
      Returns:
      same object to permit progressive setters
    • setExtra

      public FastEntityStatePdu setExtra(int pExtra)
      Utility setter for extra
      Parameters:
      pExtra - new value of interest
      Returns:
      same object to permit progressive setters
    • getExtra

      public byte getExtra()
      Getter for extra
      Returns:
      value of interest
    • setAltEntityKind

      public FastEntityStatePdu setAltEntityKind(byte pAltEntityKind)
      Setter for altEntityKind
      Parameters:
      pAltEntityKind - new value of interest
      Returns:
      same object to permit progressive setters
    • setAltEntityKind

      public FastEntityStatePdu setAltEntityKind(int pAltEntityKind)
      Utility setter for altEntityKind
      Parameters:
      pAltEntityKind - new value of interest
      Returns:
      same object to permit progressive setters
    • getAltEntityKind

      public byte getAltEntityKind()
      Getter for altEntityKind
      Returns:
      value of interest
    • setAltDomain

      public FastEntityStatePdu setAltDomain(byte pAltDomain)
      Setter for altDomain
      Parameters:
      pAltDomain - new value of interest
      Returns:
      same object to permit progressive setters
    • setAltDomain

      public FastEntityStatePdu setAltDomain(int pAltDomain)
      Utility setter for altDomain
      Parameters:
      pAltDomain - new value of interest
      Returns:
      same object to permit progressive setters
    • getAltDomain

      public byte getAltDomain()
      Getter for altDomain
      Returns:
      value of interest
    • setAltCountry

      public FastEntityStatePdu setAltCountry(short pAltCountry)
      Setter for altCountry
      Parameters:
      pAltCountry - new value of interest
      Returns:
      same object to permit progressive setters
    • setAltCountry

      public FastEntityStatePdu setAltCountry(int pAltCountry)
      Utility setter for altCountry
      Parameters:
      pAltCountry - new value of interest
      Returns:
      same object to permit progressive setters
    • getAltCountry

      public short getAltCountry()
      Getter for altCountry
      Returns:
      value of interest
    • setAltCategory

      public FastEntityStatePdu setAltCategory(byte pAltCategory)
      Setter for altCategory
      Parameters:
      pAltCategory - new value of interest
      Returns:
      same object to permit progressive setters
    • setAltCategory

      public FastEntityStatePdu setAltCategory(int pAltCategory)
      Utility setter for altCategory
      Parameters:
      pAltCategory - new value of interest
      Returns:
      same object to permit progressive setters
    • getAltCategory

      public byte getAltCategory()
      Getter for altCategory
      Returns:
      value of interest
    • setAltSubcategory

      public FastEntityStatePdu setAltSubcategory(byte pAltSubcategory)
      Setter for altSubcategory
      Parameters:
      pAltSubcategory - new value of interest
      Returns:
      same object to permit progressive setters
    • setAltSubcategory

      public FastEntityStatePdu setAltSubcategory(int pAltSubcategory)
      Utility setter for altSubcategory
      Parameters:
      pAltSubcategory - new value of interest
      Returns:
      same object to permit progressive setters
    • getAltSubcategory

      public byte getAltSubcategory()
      Getter for altSubcategory
      Returns:
      value of interest
    • setAltSpecific

      public FastEntityStatePdu setAltSpecific(byte pAltSpecific)
      Setter for altSpecific
      Parameters:
      pAltSpecific - new value of interest
      Returns:
      same object to permit progressive setters
    • setAltSpecific

      public FastEntityStatePdu setAltSpecific(int pAltSpecific)
      Utility setter for altSpecific
      Parameters:
      pAltSpecific - new value of interest
      Returns:
      same object to permit progressive setters
    • getAltSpecific

      public byte getAltSpecific()
      Getter for altSpecific
      Returns:
      value of interest
    • setAltExtra

      public FastEntityStatePdu setAltExtra(byte pAltExtra)
      Setter for altExtra
      Parameters:
      pAltExtra - new value of interest
      Returns:
      same object to permit progressive setters
    • setAltExtra

      public FastEntityStatePdu setAltExtra(int pAltExtra)
      Utility setter for altExtra
      Parameters:
      pAltExtra - new value of interest
      Returns:
      same object to permit progressive setters
    • getAltExtra

      public byte getAltExtra()
      Getter for altExtra
      Returns:
      value of interest
    • setXVelocity

      public FastEntityStatePdu setXVelocity(float pXVelocity)
      Setter for xVelocity
      Parameters:
      pXVelocity - new value of interest
      Returns:
      same object to permit progressive setters
    • getXVelocity

      public float getXVelocity()
      Getter for xVelocity
      Returns:
      value of interest
    • setYVelocity

      public FastEntityStatePdu setYVelocity(float pYVelocity)
      Setter for yVelocity
      Parameters:
      pYVelocity - new value of interest
      Returns:
      same object to permit progressive setters
    • getYVelocity

      public float getYVelocity()
      Getter for yVelocity
      Returns:
      value of interest
    • setZVelocity

      public FastEntityStatePdu setZVelocity(float pZVelocity)
      Setter for zVelocity
      Parameters:
      pZVelocity - new value of interest
      Returns:
      same object to permit progressive setters
    • getZVelocity

      public float getZVelocity()
      Getter for zVelocity
      Returns:
      value of interest
    • setXLocation

      public FastEntityStatePdu setXLocation(double pXLocation)
      Setter for xLocation
      Parameters:
      pXLocation - new value of interest
      Returns:
      same object to permit progressive setters
    • getXLocation

      public double getXLocation()
      Getter for xLocation
      Returns:
      value of interest
    • setYLocation

      public FastEntityStatePdu setYLocation(double pYLocation)
      Setter for yLocation
      Parameters:
      pYLocation - new value of interest
      Returns:
      same object to permit progressive setters
    • getYLocation

      public double getYLocation()
      Getter for yLocation
      Returns:
      value of interest
    • setZLocation

      public FastEntityStatePdu setZLocation(double pZLocation)
      Setter for zLocation
      Parameters:
      pZLocation - new value of interest
      Returns:
      same object to permit progressive setters
    • getZLocation

      public double getZLocation()
      Getter for zLocation
      Returns:
      value of interest
    • setPsi

      public FastEntityStatePdu setPsi(float pPsi)
      Setter for psi
      Parameters:
      pPsi - new value of interest
      Returns:
      same object to permit progressive setters
    • getPsi

      public float getPsi()
      Getter for psi
      Returns:
      value of interest
    • setTheta

      public FastEntityStatePdu setTheta(float pTheta)
      Setter for theta
      Parameters:
      pTheta - new value of interest
      Returns:
      same object to permit progressive setters
    • getTheta

      public float getTheta()
      Getter for theta
      Returns:
      value of interest
    • setPhi

      public FastEntityStatePdu setPhi(float pPhi)
      Setter for phi
      Parameters:
      pPhi - new value of interest
      Returns:
      same object to permit progressive setters
    • getPhi

      public float getPhi()
      Getter for phi
      Returns:
      value of interest
    • setEntityAppearance

      public FastEntityStatePdu setEntityAppearance(int pEntityAppearance)
      Setter for entityAppearance
      Parameters:
      pEntityAppearance - new value of interest
      Returns:
      same object to permit progressive setters
    • getEntityAppearance

      public int getEntityAppearance()
      Getter for entityAppearance
      Returns:
      value of interest
    • setDeadReckoningAlgorithm

      public FastEntityStatePdu setDeadReckoningAlgorithm(byte pDeadReckoningAlgorithm)
      Parameters:
      pDeadReckoningAlgorithm - new value of interest
      Returns:
      same object to permit progressive setters
    • setDeadReckoningAlgorithm

      public FastEntityStatePdu setDeadReckoningAlgorithm(int pDeadReckoningAlgorithm)
      Utility setter for deadReckoningAlgorithm
      Parameters:
      pDeadReckoningAlgorithm - new value of interest
      Returns:
      same object to permit progressive setters
    • getDeadReckoningAlgorithm

      public byte getDeadReckoningAlgorithm()
      Returns:
      value of interest
    • setOtherParameters

      public FastEntityStatePdu setOtherParameters(byte[] pOtherParameters)
      Setter for otherParameters
      Parameters:
      pOtherParameters - new value of interest
      Returns:
      same object to permit progressive setters
    • getOtherParameters

      public byte[] getOtherParameters()
      Getter for otherParameters
      Returns:
      value of interest
    • setXAcceleration

      public FastEntityStatePdu setXAcceleration(float pXAcceleration)
      Setter for xAcceleration
      Parameters:
      pXAcceleration - new value of interest
      Returns:
      same object to permit progressive setters
    • getXAcceleration

      public float getXAcceleration()
      Getter for xAcceleration
      Returns:
      value of interest
    • setYAcceleration

      public FastEntityStatePdu setYAcceleration(float pYAcceleration)
      Setter for yAcceleration
      Parameters:
      pYAcceleration - new value of interest
      Returns:
      same object to permit progressive setters
    • getYAcceleration

      public float getYAcceleration()
      Getter for yAcceleration
      Returns:
      value of interest
    • setZAcceleration

      public FastEntityStatePdu setZAcceleration(float pZAcceleration)
      Setter for zAcceleration
      Parameters:
      pZAcceleration - new value of interest
      Returns:
      same object to permit progressive setters
    • getZAcceleration

      public float getZAcceleration()
      Getter for zAcceleration
      Returns:
      value of interest
    • setXAngularVelocity

      public FastEntityStatePdu setXAngularVelocity(float pXAngularVelocity)
      Setter for xAngularVelocity
      Parameters:
      pXAngularVelocity - new value of interest
      Returns:
      same object to permit progressive setters
    • getXAngularVelocity

      public float getXAngularVelocity()
      Getter for xAngularVelocity
      Returns:
      value of interest
    • setYAngularVelocity

      public FastEntityStatePdu setYAngularVelocity(float pYAngularVelocity)
      Setter for yAngularVelocity
      Parameters:
      pYAngularVelocity - new value of interest
      Returns:
      same object to permit progressive setters
    • getYAngularVelocity

      public float getYAngularVelocity()
      Getter for yAngularVelocity
      Returns:
      value of interest
    • setZAngularVelocity

      public FastEntityStatePdu setZAngularVelocity(float pZAngularVelocity)
      Setter for zAngularVelocity
      Parameters:
      pZAngularVelocity - new value of interest
      Returns:
      same object to permit progressive setters
    • getZAngularVelocity

      public float getZAngularVelocity()
      Getter for zAngularVelocity
      Returns:
      value of interest
    • setMarking

      public FastEntityStatePdu setMarking(byte[] pMarking)
      Setter for marking
      Parameters:
      pMarking - new value of interest
      Returns:
      same object to permit progressive setters
    • getMarking

      public byte[] getMarking()
      Getter for marking
      Returns:
      value of interest
    • setCapabilities

      public FastEntityStatePdu setCapabilities(short pCapabilities)
      Setter for capabilities
      Parameters:
      pCapabilities - new value of interest
      Returns:
      same object to permit progressive setters
    • setCapabilities

      public FastEntityStatePdu setCapabilities(int pCapabilities)
      Utility setter for capabilities
      Parameters:
      pCapabilities - new value of interest
      Returns:
      same object to permit progressive setters
    • getCapabilities

      public short getCapabilities()
      Getter for capabilities
      Returns:
      value of interest
    • setVariableParameters

      public FastEntityStatePdu setVariableParameters(List<VariableParameter> pVariableParameters)
      Parameters:
      pVariableParameters - new value of interest
      Returns:
      same object to permit progressive setters
    • getVariableParameters

      public List<VariableParameter> getVariableParameters()
      Returns:
      value of interest
    • marshal

      public void marshal(DataOutputStream dos) throws Exception
      Serializes an object to a DataOutputStream.
      Specified by:
      marshal in interface Marshaller
      Overrides:
      marshal in class EntityInformationFamilyPdu
      Parameters:
      dos - the OutputStream
      Throws:
      Exception - if something goes wrong
      See Also:
      DataOutputStream
    • unmarshal

      public int unmarshal(DataInputStream dis) throws Exception
      Deserializes an object from a DataInputStream.
      Specified by:
      unmarshal in interface Marshaller
      Overrides:
      unmarshal in class EntityInformationFamilyPdu
      Parameters:
      dis - the InputStream
      Returns:
      marshalled serialized size in bytes
      Throws:
      Exception - if something goes wrong
      See Also:
      DataInputStream, https://en.wikipedia.org/wiki/Marshalling_(computer_science)
    • marshal

      public void marshal(ByteBuffer byteBuffer) throws Exception
      Packs an object into the ByteBuffer.
      Specified by:
      marshal in interface Marshaller
      Overrides:
      marshal in class EntityInformationFamilyPdu
      Parameters:
      byteBuffer - The ByteBuffer at the position to begin writing
      Throws:
      BufferOverflowException - if byteBuffer is too small
      ReadOnlyBufferException - if byteBuffer is read only
      Exception - ByteBuffer-generated exception
      See Also:
      ByteBuffer
    • unmarshal

      public int unmarshal(ByteBuffer byteBuffer) throws Exception
      Unpacks a Pdu from the underlying data.
      Specified by:
      unmarshal in interface Marshaller
      Overrides:
      unmarshal in class EntityInformationFamilyPdu
      Parameters:
      byteBuffer - The ByteBuffer at the position to begin reading
      Returns:
      marshalled serialized size in bytes
      Throws:
      BufferUnderflowException - if byteBuffer is too small
      Exception - ByteBuffer-generated exception
      See Also:
      ByteBuffer, https://en.wikipedia.org/wiki/Marshalling_(computer_science)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class EntityInformationFamilyPdu
    • equalsImpl

      public boolean equalsImpl(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.
    • toString

      public String toString()
      Overrides:
      toString in class EntityInformationFamilyPdu