Package edu.nps.moves.dis7.pdus
Class EntityStateUpdatePdu
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.EntityStateUpdatePdu
- All Implemented Interfaces:
Marshaller,Serializable
7.2.5. Nonstatic information about a particular entity may be communicated by issuing an Entity State Update PDU. 5.3.5.
IEEE Std 1278.1-2012, IEEE Standard for Distributed Interactive Simulation - Application Protocols
- See Also:
- Serialized Form
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThis field shall specify the dynamic changes to the entity's appearance attributes.protected EntityIDThis field shall identify the entity issuing the PDU, and shall be represented by an Entity Identifier record (see 6.2.28).protected Vector3FloatThis field shall specify an entity's linear velocity.protected Vector3DoubleThis field shall specify an entity's physical location in the simulated world and shall be represented by a World Coordinates record (see 6.2.97).protected EulerAnglesThis field shall specify an entity's orientation and shall be represented by an Euler Angles record (see 6.2.33).protected byteThis field shall specify the number of variable parameters present.protected bytePaddingprotected List<VariableParameter>This field shall specify the parameter values for each Variable Parameter record that is included (see 6.2.93 and Annex I).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 objectintGetter forentityAppearanceGetter forentityIDGetter forentityLinearVelocityGetter forentityLocationGetter forentityOrientationintReturns size of this serialized (marshalled) object in bytesbyteGetter forpadding1Getter forvariableParametersvoidmarshal(DataOutputStream dos)Serializes an object to a DataOutputStream.voidmarshal(ByteBuffer byteBuffer)Packs an object into the ByteBuffer.setEntityAppearance(int pEntityAppearance)Setter forentityAppearancesetEntityID(EntityID pEntityID)Setter forentityIDsetEntityLinearVelocity(Vector3Float pEntityLinearVelocity)Setter forentityLinearVelocitysetEntityLocation(Vector3Double pEntityLocation)Setter forentityLocationsetEntityOrientation(EulerAngles pEntityOrientation)Setter forentityOrientationsetPadding1(byte pPadding1)Setter forpadding1setPadding1(int pPadding1)Utility setter forpadding1setVariableParameters(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
This field shall identify the entity issuing the PDU, and shall be represented by an Entity Identifier record (see 6.2.28). -
padding1
protected byte padding1Padding -
numberOfVariableParameters
protected byte numberOfVariableParametersThis field shall specify the number of variable parameters present. This field shall be represented by an 8-bit unsigned integer (see Annex I). -
entityLinearVelocity
This field shall specify an entity's linear velocity. The coordinate system for an entity's linear velocity depends on the dead reckoning algorithm used. This field shall be represented by a Linear Velocity Vector record [see 6.2.95 item c)]). -
entityLocation
This field shall specify an entity's physical location in the simulated world and shall be represented by a World Coordinates record (see 6.2.97). -
entityOrientation
This field shall specify an entity's orientation and shall be represented by an Euler Angles record (see 6.2.33). -
entityAppearance
protected int entityAppearanceThis field shall specify the dynamic changes to the entity's appearance attributes. This field shall be represented by an Entity Appearance record (see 6.2.26). -
variableParameters
This field shall specify the parameter values for each Variable Parameter record that is included (see 6.2.93 and Annex I).
-
-
Constructor Details
-
EntityStateUpdatePdu
public EntityStateUpdatePdu()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
-
setPadding1
Setter forpadding1- Parameters:
pPadding1- new value of interest- Returns:
- same object to permit progressive setters
-
setPadding1
Utility setter forpadding1- Parameters:
pPadding1- new value of interest- Returns:
- same object to permit progressive setters
-
getPadding1
public byte getPadding1()Getter forpadding1- 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
-
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
-