Package edu.nps.moves.dis7
Class FastEntityStatePdu
java.lang.Object
edu.nps.moves.dis7.Pdu
edu.nps.moves.dis7.PduBase
edu.nps.moves.dis7.EntityInformationFamilyPdu
edu.nps.moves.dis7.FastEntityStatePdu
- All Implemented Interfaces:
edu.nps.moves.dis7.Marshaller
,java.io.Serializable
public class FastEntityStatePdu extends EntityInformationFamilyPdu implements java.io.Serializable
Represents the postion 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 Summary
Fields Modifier and Type Field Description protected byte
altCategory
category of entityprotected short
altCountry
country to which the design of the entity is attributedprotected byte
altDomain
Domain of entity (air, surface, subsurface, space, etc)protected byte
altEntityKind
Kind of entityprotected byte
altExtra
protected byte
altSpecific
specific info based on subcategory fieldprotected byte
altSubcategory
subcategory of entityprotected short
application
The application IDprotected short
capabilities
a series of bit flagsprotected byte
category
category of entityprotected short
country
country to which the design of the entity is attributedprotected byte
deadReckoningAlgorithm
enumeration of what dead reckoning algorighm to useprotected byte
domain
Domain of entity (air, surface, subsurface, space, etc)protected short
entity
the entity IDprotected int
entityAppearance
a series of bit flags that are used to help draw the entity, such as smoking, on fire, etc.protected byte
entityKind
Kind of entityprotected byte
extra
protected byte
forceId
what force this entity is affiliated with, eg red, blue, neutral, etcprotected byte[]
marking
characters that can be used for debugging, or to draw unique strings on the side of entities in the worldprotected byte
numberOfVariableParameters
How many variable (nee articulation) parameters are in the variable length listprotected byte[]
otherParameters
other parameters to use in the dead reckoning algorithmprotected float
phi
protected float
psi
protected short
site
The site IDprotected byte
specific
specific info based on subcategory fieldprotected byte
subcategory
subcategory of entityprotected float
theta
protected java.util.List<VariableParameter>
variableParameters
variable length list of variable parameters.protected float
xAcceleration
X valueprotected float
xAngularVelocity
X valueprotected double
xLocation
X valueprotected float
xVelocity
X veloprotected float
yAcceleration
y Valueprotected float
yAngularVelocity
y Valueprotected double
yLocation
y Valueprotected float
yVelocity
y Valueprotected float
zAcceleration
Z valueprotected float
zAngularVelocity
Z valueprotected double
zLocation
Z valueprotected float
zVelocity
Z valueFields inherited from class edu.nps.moves.dis7.Pdu
exerciseID, length, pduType, protocolFamily, protocolVersion, timestamp
-
Constructor Summary
Constructors Constructor Description FastEntityStatePdu()
Constructor -
Method Summary
Modifier and Type Method Description 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, forthis
and the supplied objectbyte
getAltCategory()
Getter foraltCategory
short
getAltCountry()
Getter foraltCountry
byte
getAltDomain()
Getter foraltDomain
byte
getAltEntityKind()
Getter foraltEntityKind
byte
getAltExtra()
Getter foraltExtra
byte
getAltSpecific()
Getter foraltSpecific
byte
getAltSubcategory()
Getter foraltSubcategory
short
getApplication()
Getter forapplication
short
getCapabilities()
Getter forcapabilities
byte
getCategory()
Getter forcategory
short
getCountry()
Getter forcountry
byte
getDeadReckoningAlgorithm()
Getter fordeadReckoningAlgorithm
byte
getDomain()
Getter fordomain
short
getEntity()
Getter forentity
int
getEntityAppearance()
Getter forentityAppearance
byte
getEntityKind()
Getter forentityKind
byte
getExtra()
Getter forextra
byte
getForceId()
Getter forforceId
byte[]
getMarking()
Getter formarking
int
getMarshalledSize()
Returns the size of this serialized object in bytesbyte[]
getOtherParameters()
Getter forotherParameters
float
getPhi()
Getter forphi
float
getPsi()
Getter forpsi
short
getSite()
Getter forsite
byte
getSpecific()
Getter forspecific
byte
getSubcategory()
Getter forsubcategory
float
getTheta()
Getter fortheta
java.util.List<VariableParameter>
getVariableParameters()
Getter forvariableParameters
float
getXAcceleration()
Getter forxAcceleration
float
getXAngularVelocity()
Getter forxAngularVelocity
double
getXLocation()
Getter forxLocation
float
getXVelocity()
Getter forxVelocity
float
getYAcceleration()
Getter foryAcceleration
float
getYAngularVelocity()
Getter foryAngularVelocity
double
getYLocation()
Getter foryLocation
float
getYVelocity()
Getter foryVelocity
float
getZAcceleration()
Getter forzAcceleration
float
getZAngularVelocity()
Getter forzAngularVelocity
double
getZLocation()
Getter forzLocation
float
getZVelocity()
Getter forzVelocity
void
marshal(java.io.DataOutputStream dos)
Serializes an object to a DataOutputStream.void
marshal(java.nio.ByteBuffer buff)
Packs an object into the ByteBuffer.FastEntityStatePdu
setAltCategory(byte pAltCategory)
Setter foraltCategory
FastEntityStatePdu
setAltCountry(short pAltCountry)
Setter foraltCountry
FastEntityStatePdu
setAltDomain(byte pAltDomain)
Setter foraltDomain
FastEntityStatePdu
setAltEntityKind(byte pAltEntityKind)
Setter foraltEntityKind
FastEntityStatePdu
setAltExtra(byte pAltExtra)
Setter foraltExtra
FastEntityStatePdu
setAltSpecific(byte pAltSpecific)
Setter foraltSpecific
FastEntityStatePdu
setAltSubcategory(byte pAltSubcategory)
Setter foraltSubcategory
FastEntityStatePdu
setApplication(short pApplication)
Setter forapplication
FastEntityStatePdu
setCapabilities(short pCapabilities)
Setter forcapabilities
FastEntityStatePdu
setCategory(byte pCategory)
Setter forcategory
FastEntityStatePdu
setCountry(short pCountry)
Setter forcountry
FastEntityStatePdu
setDeadReckoningAlgorithm(byte pDeadReckoningAlgorithm)
Setter fordeadReckoningAlgorithm
FastEntityStatePdu
setDomain(byte pDomain)
Setter fordomain
FastEntityStatePdu
setEntity(short pEntity)
Setter forentity
FastEntityStatePdu
setEntityAppearance(int pEntityAppearance)
Setter forentityAppearance
FastEntityStatePdu
setEntityKind(byte pEntityKind)
Setter forentityKind
FastEntityStatePdu
setExtra(byte pExtra)
Setter forextra
FastEntityStatePdu
setForceId(byte pForceId)
Setter forforceId
FastEntityStatePdu
setMarking(byte[] pMarking)
Setter formarking
FastEntityStatePdu
setOtherParameters(byte[] pOtherParameters)
Setter forotherParameters
FastEntityStatePdu
setPhi(float pPhi)
Setter forphi
FastEntityStatePdu
setPsi(float pPsi)
Setter forpsi
FastEntityStatePdu
setSite(short pSite)
Setter forsite
FastEntityStatePdu
setSpecific(byte pSpecific)
Setter forspecific
FastEntityStatePdu
setSubcategory(byte pSubcategory)
Setter forsubcategory
FastEntityStatePdu
setTheta(float pTheta)
Setter fortheta
FastEntityStatePdu
setVariableParameters(java.util.List<VariableParameter> pVariableParameters)
Setter forvariableParameters
FastEntityStatePdu
setXAcceleration(float pXAcceleration)
Setter forxAcceleration
FastEntityStatePdu
setXAngularVelocity(float pXAngularVelocity)
Setter forxAngularVelocity
FastEntityStatePdu
setXLocation(double pXLocation)
Setter forxLocation
FastEntityStatePdu
setXVelocity(float pXVelocity)
Setter forxVelocity
FastEntityStatePdu
setYAcceleration(float pYAcceleration)
Setter foryAcceleration
FastEntityStatePdu
setYAngularVelocity(float pYAngularVelocity)
Setter foryAngularVelocity
FastEntityStatePdu
setYLocation(double pYLocation)
Setter foryLocation
FastEntityStatePdu
setYVelocity(float pYVelocity)
Setter foryVelocity
FastEntityStatePdu
setZAcceleration(float pZAcceleration)
Setter forzAcceleration
FastEntityStatePdu
setZAngularVelocity(float pZAngularVelocity)
Setter forzAngularVelocity
FastEntityStatePdu
setZLocation(double pZLocation)
Setter forzLocation
FastEntityStatePdu
setZVelocity(float pZVelocity)
Setter forzVelocity
java.lang.String
toString()
int
unmarshal(java.io.DataInputStream dis)
Unserializes an object from a DataInputStream.int
unmarshal(java.nio.ByteBuffer buff)
Unpacks a Pdu from the underlying data.Methods inherited from class edu.nps.moves.dis7.PduBase
getPadding, getPduStatus, setPadding, setPduStatus
Methods inherited from class edu.nps.moves.dis7.Pdu
getExerciseID, getLength, getPduType, getProtocolFamily, getProtocolVersion, getTimestamp, marshal, setExerciseID, setLength, setPduType, setProtocolFamily, setProtocolVersion, setTimestamp
-
Field Details
-
site
protected short siteThe site ID -
application
protected short applicationThe application ID -
entity
protected short entitythe entity ID -
forceId
protected byte forceIdwhat force this entity is affiliated with, eg red, blue, neutral, etc -
numberOfVariableParameters
protected byte numberOfVariableParametersHow many variable (nee articulation) parameters are in the variable length list -
entityKind
protected byte entityKindKind of entity -
domain
protected byte domainDomain of entity (air, surface, subsurface, space, etc) -
country
protected short countrycountry to which the design of the entity is attributed -
category
protected byte categorycategory of entity -
subcategory
protected byte subcategorysubcategory of entity -
specific
protected byte specificspecific info based on subcategory field -
extra
protected byte extra -
altEntityKind
protected byte altEntityKindKind of entity -
altDomain
protected byte altDomainDomain of entity (air, surface, subsurface, space, etc) -
altCountry
protected short altCountrycountry to which the design of the entity is attributed -
altCategory
protected byte altCategorycategory of entity -
altSubcategory
protected byte altSubcategorysubcategory of entity -
altSpecific
protected byte altSpecificspecific info based on subcategory field -
altExtra
protected byte altExtra -
xVelocity
protected float xVelocityX velo -
yVelocity
protected float yVelocityy Value -
zVelocity
protected float zVelocityZ value -
xLocation
protected double xLocationX value -
yLocation
protected double yLocationy Value -
zLocation
protected double zLocationZ value -
psi
protected float psi -
theta
protected float theta -
phi
protected float phi -
entityAppearance
protected int entityAppearancea series of bit flags that are used to help draw the entity, such as smoking, on fire, etc. -
deadReckoningAlgorithm
protected byte deadReckoningAlgorithmenumeration of what dead reckoning algorighm to use -
otherParameters
protected byte[] otherParametersother parameters to use in the dead reckoning algorithm -
xAcceleration
protected float xAccelerationX value -
yAcceleration
protected float yAccelerationy Value -
zAcceleration
protected float zAccelerationZ value -
xAngularVelocity
protected float xAngularVelocityX value -
yAngularVelocity
protected float yAngularVelocityy Value -
zAngularVelocity
protected float zAngularVelocityZ value -
marking
protected byte[] markingcharacters that can be used for debugging, or to draw unique strings on the side of entities in the world -
capabilities
protected short capabilitiesa series of bit flags -
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 the size of this serialized object in bytes- Specified by:
getMarshalledSize
in interfaceedu.nps.moves.dis7.Marshaller
- Overrides:
getMarshalledSize
in classEntityInformationFamilyPdu
-
setSite
Setter forsite
-
getSite
public short getSite()Getter forsite
-
setApplication
Setter forapplication
-
getApplication
public short getApplication()Getter forapplication
-
setEntity
Setter forentity
-
getEntity
public short getEntity()Getter forentity
-
setForceId
Setter forforceId
-
getForceId
public byte getForceId()Getter forforceId
-
setEntityKind
Setter forentityKind
-
getEntityKind
public byte getEntityKind()Getter forentityKind
-
setDomain
Setter fordomain
-
getDomain
public byte getDomain()Getter fordomain
-
setCountry
Setter forcountry
-
getCountry
public short getCountry()Getter forcountry
-
setCategory
Setter forcategory
-
getCategory
public byte getCategory()Getter forcategory
-
setSubcategory
Setter forsubcategory
-
getSubcategory
public byte getSubcategory()Getter forsubcategory
-
setSpecific
Setter forspecific
-
getSpecific
public byte getSpecific()Getter forspecific
-
setExtra
Setter forextra
-
getExtra
public byte getExtra()Getter forextra
-
setAltEntityKind
Setter foraltEntityKind
-
getAltEntityKind
public byte getAltEntityKind()Getter foraltEntityKind
-
setAltDomain
Setter foraltDomain
-
getAltDomain
public byte getAltDomain()Getter foraltDomain
-
setAltCountry
Setter foraltCountry
-
getAltCountry
public short getAltCountry()Getter foraltCountry
-
setAltCategory
Setter foraltCategory
-
getAltCategory
public byte getAltCategory()Getter foraltCategory
-
setAltSubcategory
Setter foraltSubcategory
-
getAltSubcategory
public byte getAltSubcategory()Getter foraltSubcategory
-
setAltSpecific
Setter foraltSpecific
-
getAltSpecific
public byte getAltSpecific()Getter foraltSpecific
-
setAltExtra
Setter foraltExtra
-
getAltExtra
public byte getAltExtra()Getter foraltExtra
-
setXVelocity
Setter forxVelocity
-
getXVelocity
public float getXVelocity()Getter forxVelocity
-
setYVelocity
Setter foryVelocity
-
getYVelocity
public float getYVelocity()Getter foryVelocity
-
setZVelocity
Setter forzVelocity
-
getZVelocity
public float getZVelocity()Getter forzVelocity
-
setXLocation
Setter forxLocation
-
getXLocation
public double getXLocation()Getter forxLocation
-
setYLocation
Setter foryLocation
-
getYLocation
public double getYLocation()Getter foryLocation
-
setZLocation
Setter forzLocation
-
getZLocation
public double getZLocation()Getter forzLocation
-
setPsi
Setter forpsi
-
getPsi
public float getPsi()Getter forpsi
-
setTheta
Setter fortheta
-
getTheta
public float getTheta()Getter fortheta
-
setPhi
Setter forphi
-
getPhi
public float getPhi()Getter forphi
-
setEntityAppearance
Setter forentityAppearance
-
getEntityAppearance
public int getEntityAppearance()Getter forentityAppearance
-
setDeadReckoningAlgorithm
Setter fordeadReckoningAlgorithm
-
getDeadReckoningAlgorithm
public byte getDeadReckoningAlgorithm()Getter fordeadReckoningAlgorithm
-
setOtherParameters
Setter forotherParameters
-
getOtherParameters
public byte[] getOtherParameters()Getter forotherParameters
-
setXAcceleration
Setter forxAcceleration
-
getXAcceleration
public float getXAcceleration()Getter forxAcceleration
-
setYAcceleration
Setter foryAcceleration
-
getYAcceleration
public float getYAcceleration()Getter foryAcceleration
-
setZAcceleration
Setter forzAcceleration
-
getZAcceleration
public float getZAcceleration()Getter forzAcceleration
-
setXAngularVelocity
Setter forxAngularVelocity
-
getXAngularVelocity
public float getXAngularVelocity()Getter forxAngularVelocity
-
setYAngularVelocity
Setter foryAngularVelocity
-
getYAngularVelocity
public float getYAngularVelocity()Getter foryAngularVelocity
-
setZAngularVelocity
Setter forzAngularVelocity
-
getZAngularVelocity
public float getZAngularVelocity()Getter forzAngularVelocity
-
setMarking
Setter formarking
-
getMarking
public byte[] getMarking()Getter formarking
-
setCapabilities
Setter forcapabilities
-
getCapabilities
public short getCapabilities()Getter forcapabilities
-
setVariableParameters
public FastEntityStatePdu setVariableParameters(java.util.List<VariableParameter> pVariableParameters)Setter forvariableParameters
-
getVariableParameters
Getter forvariableParameters
-
marshal
public void marshal(java.io.DataOutputStream dos) throws java.lang.ExceptionSerializes an object to a DataOutputStream.- Specified by:
marshal
in interfaceedu.nps.moves.dis7.Marshaller
- Overrides:
marshal
in classEntityInformationFamilyPdu
- Parameters:
dos
- the OutputStream- Throws:
java.lang.Exception
- if something goes wrong- See Also:
DataOutputStream
-
unmarshal
public int unmarshal(java.io.DataInputStream dis) throws java.lang.ExceptionUnserializes an object from a DataInputStream.- Specified by:
unmarshal
in interfaceedu.nps.moves.dis7.Marshaller
- Overrides:
unmarshal
in classEntityInformationFamilyPdu
- Parameters:
dis
- the InputStream- Returns:
- unmarshalled size
- Throws:
java.lang.Exception
- if something goes wrong- See Also:
DataInputStream
-
marshal
public void marshal(java.nio.ByteBuffer buff) throws java.lang.ExceptionPacks an object into the ByteBuffer.- Specified by:
marshal
in interfaceedu.nps.moves.dis7.Marshaller
- Overrides:
marshal
in classEntityInformationFamilyPdu
- Parameters:
buff
- The ByteBuffer at the position to begin writing- Throws:
java.nio.BufferOverflowException
- if buff is too smalljava.nio.ReadOnlyBufferException
- if buff is read onlyjava.lang.Exception
- ByteBuffer-generated exception- See Also:
ByteBuffer
-
unmarshal
public int unmarshal(java.nio.ByteBuffer buff) throws java.lang.ExceptionUnpacks a Pdu from the underlying data.- Specified by:
unmarshal
in interfaceedu.nps.moves.dis7.Marshaller
- Overrides:
unmarshal
in classEntityInformationFamilyPdu
- Parameters:
buff
- The ByteBuffer at the position to begin reading- Returns:
- marshalled size
- Throws:
java.nio.BufferUnderflowException
- if buff is too smalljava.lang.Exception
- ByteBuffer-generated exception- See Also:
ByteBuffer
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classEntityInformationFamilyPdu
-
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, forthis
and the supplied object- Overrides:
equalsImpl
in classEntityInformationFamilyPdu
- Parameters:
obj
- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
public java.lang.String toString()- Overrides:
toString
in classEntityInformationFamilyPdu
-