Package edu.nps.moves.dis7.pdus
Class EntityStatePdu
java.lang.Object
edu.nps.moves.dis7.pdus.Pdu
edu.nps.moves.dis7.pdus.PduBase
edu.nps.moves.dis7.pdus.EntityInformationFamilyPdu
edu.nps.moves.dis7.pdus.EntityStatePdu
- All Implemented Interfaces:
Marshaller,Serializable
7.2.2. Represents the position and state of one entity in the world. See 5.3.2.
IEEE Std 1278.1-2012, IEEE Standard for Distributed Interactive Simulation - Application Protocols
- See Also:
- Serialized Form
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EntityTypealternativeEntityType is an undescribed parameter...protected EntityCapabilitiesa series of bit flags uid 55protected DeadReckoningParametersparameters used for dead reckoningprotected inta series of bit flags that are used to help draw the entity, such as smoking, on fire, etc.protected EntityIDUnique ID for an entity that is tied to this state informationprotected Vector3FloatDescribes the speed of the entity in the worldprotected Vector3Doubledescribes the location of the entity in the worldprotected EulerAnglesdescribes the orientation of the entity, in euler anglesprotected EntityTypeDescribes the type of entity in the worldprotected ForceIDWhat force this entity is affiliated with, eg red, blue, neutral, etc uid 6protected EntityMarkingcharacters that can be used for debugging, or to draw unique strings on the side of entities in the worldprotected byteHow many variable parameters are in the variable length list.protected List<VariableParameter>variable length list of variable parameters.Fields inherited from class edu.nps.moves.dis7.pdus.Pdu
exerciseID, length, pduType, protocolFamily, protocolVersion, timestamp -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanequalsImpl(Object obj)Compare all fields that contribute to the state, ignoring transient and static fields, forthisand the supplied objectGetter foralternativeEntityTypeGetter forcapabilitiesGetter fordeadReckoningParametersintGetter forentityAppearanceGetter forentityIDGetter forentityLinearVelocityGetter forentityLocationGetter forentityOrientationGetter forentityTypeGetter forforceIdGetter formarkingintReturns size of this serialized (marshalled) object in bytesGetter forvariableParametersvoidmarshal(DataOutputStream dos)Serializes an object to a DataOutputStream.voidmarshal(ByteBuffer byteBuffer)Packs an object into the ByteBuffer.setAlternativeEntityType(EntityType pAlternativeEntityType)Setter foralternativeEntityTypesetCapabilities(EntityCapabilities pCapabilities)Setter forcapabilitiessetDeadReckoningParameters(DeadReckoningParameters pDeadReckoningParameters)Setter fordeadReckoningParameterssetEntityAppearance(int pEntityAppearance)Setter forentityAppearancesetEntityID(EntityID pEntityID)Setter forentityIDsetEntityLinearVelocity(Vector3Float pEntityLinearVelocity)Setter forentityLinearVelocitysetEntityLocation(Vector3Double pEntityLocation)Setter forentityLocationsetEntityOrientation(EulerAngles pEntityOrientation)Setter forentityOrientationsetEntityType(EntityType pEntityType)Setter forentityTypesetForceId(ForceID pForceId)Setter forforceIdsetMarking(EntityMarking pMarking)Setter formarkingsetVariableParameters(List<VariableParameter> pVariableParameters)Setter forvariableParameterstoString()intunmarshal(DataInputStream dis)Deserializes an object from a DataInputStream.intunmarshal(ByteBuffer byteBuffer)Unpacks a Pdu from the underlying data.Methods inherited from class edu.nps.moves.dis7.pdus.PduBase
getPadding, getPduStatus, setPadding, setPadding, setPduStatusMethods inherited from class edu.nps.moves.dis7.pdus.Pdu
getExerciseID, getLength, getPduType, getProtocolFamily, getProtocolVersion, getTimestamp, marshal, setExerciseID, setExerciseID, setLength, setLength, setPduType, setProtocolFamily, setProtocolVersion, setTimestamp
-
Field Details
-
entityID
Unique ID for an entity that is tied to this state information -
forceId
What force this entity is affiliated with, eg red, blue, neutral, etc uid 6 -
numberOfVariableParameters
protected byte numberOfVariableParametersHow many variable parameters are in the variable length list. In earlier versions of DIS these were known as articulation parameters -
entityType
Describes the type of entity in the world -
alternativeEntityType
alternativeEntityType is an undescribed parameter... -
entityLinearVelocity
Describes the speed of the entity in the world -
entityLocation
describes the location of the entity in the world -
entityOrientation
describes the orientation of the entity, in euler angles -
entityAppearance
protected int entityAppearancea series of bit flags that are used to help draw the entity, such as smoking, on fire, etc. -
deadReckoningParameters
parameters used for dead reckoning -
marking
characters that can be used for debugging, or to draw unique strings on the side of entities in the world -
capabilities
a series of bit flags uid 55 -
variableParameters
variable length list of variable parameters. In earlier DIS versions this was articulation parameters.
-
-
Constructor Details
-
EntityStatePdu
public EntityStatePdu()Constructor
-
-
Method Details
-
getMarshalledSize
public int getMarshalledSize()Returns size of this serialized (marshalled) object in bytes- Specified by:
getMarshalledSizein interfaceMarshaller- Overrides:
getMarshalledSizein classEntityInformationFamilyPdu- Returns:
- serialized size in bytes
- See Also:
- https://en.wikipedia.org/wiki/Marshalling_(computer_science)
-
setEntityID
Setter forentityID- Parameters:
pEntityID- new value of interest- Returns:
- same object to permit progressive setters
-
getEntityID
Getter forentityID- Returns:
- value of interest
-
setForceId
Setter forforceId- Parameters:
pForceId- new value of interest- Returns:
- same object to permit progressive setters
-
getForceId
Getter forforceId- Returns:
- value of interest
-
setEntityType
Setter forentityType- Parameters:
pEntityType- new value of interest- Returns:
- same object to permit progressive setters
-
getEntityType
Getter forentityType- Returns:
- value of interest
-
setAlternativeEntityType
Setter foralternativeEntityType- Parameters:
pAlternativeEntityType- new value of interest- Returns:
- same object to permit progressive setters
-
getAlternativeEntityType
Getter foralternativeEntityType- Returns:
- value of interest
-
setEntityLinearVelocity
Setter forentityLinearVelocity- Parameters:
pEntityLinearVelocity- new value of interest- Returns:
- same object to permit progressive setters
-
getEntityLinearVelocity
Getter forentityLinearVelocity- Returns:
- value of interest
-
setEntityLocation
Setter forentityLocation- Parameters:
pEntityLocation- new value of interest- Returns:
- same object to permit progressive setters
-
getEntityLocation
Getter forentityLocation- Returns:
- value of interest
-
setEntityOrientation
Setter forentityOrientation- Parameters:
pEntityOrientation- new value of interest- Returns:
- same object to permit progressive setters
-
getEntityOrientation
Getter forentityOrientation- Returns:
- value of interest
-
setEntityAppearance
Setter forentityAppearance- Parameters:
pEntityAppearance- new value of interest- Returns:
- same object to permit progressive setters
-
getEntityAppearance
public int getEntityAppearance()Getter forentityAppearance- Returns:
- value of interest
-
setDeadReckoningParameters
Setter fordeadReckoningParameters- Parameters:
pDeadReckoningParameters- new value of interest- Returns:
- same object to permit progressive setters
-
getDeadReckoningParameters
Getter fordeadReckoningParameters- Returns:
- value of interest
-
setMarking
Setter formarking- Parameters:
pMarking- new value of interest- Returns:
- same object to permit progressive setters
-
getMarking
Getter formarking- Returns:
- value of interest
-
setCapabilities
Setter forcapabilities- Parameters:
pCapabilities- new value of interest- Returns:
- same object to permit progressive setters
-
getCapabilities
Getter forcapabilities- Returns:
- value of interest
-
setVariableParameters
Setter forvariableParameters- Parameters:
pVariableParameters- new value of interest- Returns:
- same object to permit progressive setters
-
getVariableParameters
Getter forvariableParameters- Returns:
- value of interest
-
marshal
Serializes an object to a DataOutputStream.- Specified by:
marshalin interfaceMarshaller- Overrides:
marshalin classEntityInformationFamilyPdu- Parameters:
dos- the OutputStream- Throws:
Exception- if something goes wrong- See Also:
DataOutputStream
-
unmarshal
Deserializes an object from a DataInputStream.- Specified by:
unmarshalin interfaceMarshaller- Overrides:
unmarshalin classEntityInformationFamilyPdu- 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
Packs an object into the ByteBuffer.- Specified by:
marshalin interfaceMarshaller- Overrides:
marshalin classEntityInformationFamilyPdu- Parameters:
byteBuffer- The ByteBuffer at the position to begin writing- Throws:
BufferOverflowException- if byteBuffer is too smallReadOnlyBufferException- if byteBuffer is read onlyException- ByteBuffer-generated exception- See Also:
ByteBuffer
-
unmarshal
Unpacks a Pdu from the underlying data.- Specified by:
unmarshalin interfaceMarshaller- Overrides:
unmarshalin classEntityInformationFamilyPdu- Parameters:
byteBuffer- The ByteBuffer at the position to begin reading- Returns:
- marshalled serialized size in bytes
- Throws:
BufferUnderflowException- if byteBuffer is too smallException- ByteBuffer-generated exception- See Also:
ByteBuffer, https://en.wikipedia.org/wiki/Marshalling_(computer_science)
-
equals
- Overrides:
equalsin classEntityInformationFamilyPdu
-
equalsImpl
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
- Overrides:
toStringin classEntityInformationFamilyPdu
-