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 bytealtCategorycategory of entityprotected shortaltCountrycountry to which the design of the entity is attributedprotected bytealtDomainDomain of entity (air, surface, subsurface, space, etc)protected bytealtEntityKindKind of entityprotected bytealtExtraprotected bytealtSpecificspecific info based on subcategory fieldprotected bytealtSubcategorysubcategory of entityprotected shortapplicationThe application IDprotected shortcapabilitiesa series of bit flagsprotected bytecategorycategory of entityprotected shortcountrycountry to which the design of the entity is attributedprotected bytedeadReckoningAlgorithmenumeration of what dead reckoning algorighm to useprotected bytedomainDomain of entity (air, surface, subsurface, space, etc)protected shortentitythe entity IDprotected intentityAppearancea series of bit flags that are used to help draw the entity, such as smoking, on fire, etc.protected byteentityKindKind of entityprotected byteextraprotected byteforceIdwhat force this entity is affiliated with, eg red, blue, neutral, etcprotected byte[]markingcharacters that can be used for debugging, or to draw unique strings on the side of entities in the worldprotected bytenumberOfVariableParametersHow many variable (nee articulation) parameters are in the variable length listprotected byte[]otherParametersother parameters to use in the dead reckoning algorithmprotected floatphiprotected floatpsiprotected shortsiteThe site IDprotected bytespecificspecific info based on subcategory fieldprotected bytesubcategorysubcategory of entityprotected floatthetaprotected java.util.List<VariableParameter>variableParametersvariable length list of variable parameters.protected floatxAccelerationX valueprotected floatxAngularVelocityX valueprotected doublexLocationX valueprotected floatxVelocityX veloprotected floatyAccelerationy Valueprotected floatyAngularVelocityy Valueprotected doubleyLocationy Valueprotected floatyVelocityy Valueprotected floatzAccelerationZ valueprotected floatzAngularVelocityZ valueprotected doublezLocationZ valueprotected floatzVelocityZ 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 booleanequals(java.lang.Object obj)booleanequalsImpl(java.lang.Object obj)Compare all fields that contribute to the state, ignoring transient and static fields, forthisand the supplied objectbytegetAltCategory()Getter foraltCategoryshortgetAltCountry()Getter foraltCountrybytegetAltDomain()Getter foraltDomainbytegetAltEntityKind()Getter foraltEntityKindbytegetAltExtra()Getter foraltExtrabytegetAltSpecific()Getter foraltSpecificbytegetAltSubcategory()Getter foraltSubcategoryshortgetApplication()Getter forapplicationshortgetCapabilities()Getter forcapabilitiesbytegetCategory()Getter forcategoryshortgetCountry()Getter forcountrybytegetDeadReckoningAlgorithm()Getter fordeadReckoningAlgorithmbytegetDomain()Getter fordomainshortgetEntity()Getter forentityintgetEntityAppearance()Getter forentityAppearancebytegetEntityKind()Getter forentityKindbytegetExtra()Getter forextrabytegetForceId()Getter forforceIdbyte[]getMarking()Getter formarkingintgetMarshalledSize()Returns the size of this serialized object in bytesbyte[]getOtherParameters()Getter forotherParametersfloatgetPhi()Getter forphifloatgetPsi()Getter forpsishortgetSite()Getter forsitebytegetSpecific()Getter forspecificbytegetSubcategory()Getter forsubcategoryfloatgetTheta()Getter forthetajava.util.List<VariableParameter>getVariableParameters()Getter forvariableParametersfloatgetXAcceleration()Getter forxAccelerationfloatgetXAngularVelocity()Getter forxAngularVelocitydoublegetXLocation()Getter forxLocationfloatgetXVelocity()Getter forxVelocityfloatgetYAcceleration()Getter foryAccelerationfloatgetYAngularVelocity()Getter foryAngularVelocitydoublegetYLocation()Getter foryLocationfloatgetYVelocity()Getter foryVelocityfloatgetZAcceleration()Getter forzAccelerationfloatgetZAngularVelocity()Getter forzAngularVelocitydoublegetZLocation()Getter forzLocationfloatgetZVelocity()Getter forzVelocityvoidmarshal(java.io.DataOutputStream dos)Serializes an object to a DataOutputStream.voidmarshal(java.nio.ByteBuffer buff)Packs an object into the ByteBuffer.FastEntityStatePdusetAltCategory(byte pAltCategory)Setter foraltCategoryFastEntityStatePdusetAltCountry(short pAltCountry)Setter foraltCountryFastEntityStatePdusetAltDomain(byte pAltDomain)Setter foraltDomainFastEntityStatePdusetAltEntityKind(byte pAltEntityKind)Setter foraltEntityKindFastEntityStatePdusetAltExtra(byte pAltExtra)Setter foraltExtraFastEntityStatePdusetAltSpecific(byte pAltSpecific)Setter foraltSpecificFastEntityStatePdusetAltSubcategory(byte pAltSubcategory)Setter foraltSubcategoryFastEntityStatePdusetApplication(short pApplication)Setter forapplicationFastEntityStatePdusetCapabilities(short pCapabilities)Setter forcapabilitiesFastEntityStatePdusetCategory(byte pCategory)Setter forcategoryFastEntityStatePdusetCountry(short pCountry)Setter forcountryFastEntityStatePdusetDeadReckoningAlgorithm(byte pDeadReckoningAlgorithm)Setter fordeadReckoningAlgorithmFastEntityStatePdusetDomain(byte pDomain)Setter fordomainFastEntityStatePdusetEntity(short pEntity)Setter forentityFastEntityStatePdusetEntityAppearance(int pEntityAppearance)Setter forentityAppearanceFastEntityStatePdusetEntityKind(byte pEntityKind)Setter forentityKindFastEntityStatePdusetExtra(byte pExtra)Setter forextraFastEntityStatePdusetForceId(byte pForceId)Setter forforceIdFastEntityStatePdusetMarking(byte[] pMarking)Setter formarkingFastEntityStatePdusetOtherParameters(byte[] pOtherParameters)Setter forotherParametersFastEntityStatePdusetPhi(float pPhi)Setter forphiFastEntityStatePdusetPsi(float pPsi)Setter forpsiFastEntityStatePdusetSite(short pSite)Setter forsiteFastEntityStatePdusetSpecific(byte pSpecific)Setter forspecificFastEntityStatePdusetSubcategory(byte pSubcategory)Setter forsubcategoryFastEntityStatePdusetTheta(float pTheta)Setter forthetaFastEntityStatePdusetVariableParameters(java.util.List<VariableParameter> pVariableParameters)Setter forvariableParametersFastEntityStatePdusetXAcceleration(float pXAcceleration)Setter forxAccelerationFastEntityStatePdusetXAngularVelocity(float pXAngularVelocity)Setter forxAngularVelocityFastEntityStatePdusetXLocation(double pXLocation)Setter forxLocationFastEntityStatePdusetXVelocity(float pXVelocity)Setter forxVelocityFastEntityStatePdusetYAcceleration(float pYAcceleration)Setter foryAccelerationFastEntityStatePdusetYAngularVelocity(float pYAngularVelocity)Setter foryAngularVelocityFastEntityStatePdusetYLocation(double pYLocation)Setter foryLocationFastEntityStatePdusetYVelocity(float pYVelocity)Setter foryVelocityFastEntityStatePdusetZAcceleration(float pZAcceleration)Setter forzAccelerationFastEntityStatePdusetZAngularVelocity(float pZAngularVelocity)Setter forzAngularVelocityFastEntityStatePdusetZLocation(double pZLocation)Setter forzLocationFastEntityStatePdusetZVelocity(float pZVelocity)Setter forzVelocityjava.lang.StringtoString()intunmarshal(java.io.DataInputStream dis)Unserializes an object from a DataInputStream.intunmarshal(java.nio.ByteBuffer buff)Unpacks a Pdu from the underlying data.Methods inherited from class edu.nps.moves.dis7.PduBase
getPadding, getPduStatus, setPadding, setPduStatusMethods 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:
getMarshalledSizein interfaceedu.nps.moves.dis7.Marshaller- Overrides:
getMarshalledSizein 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:
marshalin interfaceedu.nps.moves.dis7.Marshaller- Overrides:
marshalin 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:
unmarshalin interfaceedu.nps.moves.dis7.Marshaller- Overrides:
unmarshalin 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:
marshalin interfaceedu.nps.moves.dis7.Marshaller- Overrides:
marshalin 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:
unmarshalin interfaceedu.nps.moves.dis7.Marshaller- Overrides:
unmarshalin 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:
equalsin classEntityInformationFamilyPdu
-
equalsImpl
public boolean equalsImpl(java.lang.Object obj)Description copied from class:PduCompare all fields that contribute to the state, ignoring transient and static fields, forthisand the supplied object- Overrides:
equalsImplin classEntityInformationFamilyPdu- Parameters:
obj- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
public java.lang.String toString()- Overrides:
toStringin classEntityInformationFamilyPdu
-