Class EntityStateUpdatePdu
java.lang.Object
edu.nps.moves.dis7.pdus.Pdu
edu.nps.moves.dis7.pdus.PduBase
edu.nps.moves.dis7.pdus.EntityInformationInteractionFamilyPdu
edu.nps.moves.dis7.pdus.EntityStateUpdatePdu
- All Implemented Interfaces:
Marshaller
,Serializable
public class EntityStateUpdatePdu
extends EntityInformationInteractionFamilyPdu
implements Serializable
7.2.5. Nonstatic information about a particular entity may be communicated by issuing an Entity State Update PDU. 5.3.5.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ByteArrayOutputStream
byteArrayOutputStream (baos) is used for marshal/unmarshal serializationprotected DataOutputStream
dataOutputStream (dos) is used for marshal/unmarshal serializationprotected int
This field shall specify the dynamic changes to the entity's appearance attributes.protected EntityID
This field shall identify the entity issuing the PDU, and shall be represented by an Entity Identifier record (see 6.2.28).protected Vector3Float
This field shall specify an entity's linear velocity.protected Vector3Double
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).protected EulerAngles
This field shall specify an entity's orientation with units of radians and shall be represented by an Euler Angles record (see 6.2.33).static final String
The name of this PDU typeprotected byte
This field shall specify the number of variable parameters present.protected byte
Paddingprotected 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.EntityInformationInteractionFamilyPdu
FAMILY_NAME
Fields inherited from class edu.nps.moves.dis7.pdus.Pdu
exerciseID, length, pduType, protocolFamily, protocolVersion, timestamp
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor creates and configures a new instance object -
Method Summary
Modifier and TypeMethodDescriptioncopy()
copy method creates a deep copy of current object using preferred marshalling methodCreates a "deep copy" of current object using ByteBuffer methods.copy method creates a deep copy of current object using DataOutputStream methods.boolean
boolean
equalsImpl
(Object obj) Compare all fields that contribute to the state, ignoring transient and static fields, forthis
and the supplied objectint
Getter forentityAppearance
Getter forentityID
Getter forentityLinearVelocity
Getter forentityLocation
Getter forentityOrientation
int
Returns size of this serialized (marshalled) object in bytesbyte
Getter forpadding1
Getter forvariableParameters
int
hashCode()
void
marshal
(DataOutputStream dos) Serializes an object to a DataOutputStream.void
marshal
(ByteBuffer byteBuffer) Packs an object into the ByteBuffer.setEntityAppearance
(int pEntityAppearance) Setter forentityAppearance
setEntityID
(EntityID pEntityID) Setter forentityID
setEntityLinearVelocity
(Vector3Float pEntityLinearVelocity) Setter forentityLinearVelocity
setEntityLocation
(Vector3Double pEntityLocation) Setter forentityLocation
setEntityOrientation
(EulerAngles pEntityOrientation) Setter forentityOrientation
setPadding1
(byte pPadding1) Setter forpadding1
setPadding1
(int pPadding1) Utility setter forpadding1
setVariableParameters
(List<VariableParameter> pVariableParameters) Setter forvariableParameters
toString()
int
unmarshal
(DataInputStream dis) Deserializes an object from a DataInputStream.int
unmarshal
(ByteBuffer byteBuffer) Unpacks a Pdu from the underlying data.Methods inherited from class edu.nps.moves.dis7.pdus.PduBase
getPadding, getPduStatus, setPadding, setPadding, setPduStatus
Methods inherited from class edu.nps.moves.dis7.pdus.Pdu
copyByPduFactory, getExerciseID, getLength, getPduType, getProtocolFamily, getProtocolVersion, getTimestamp, getTimestampSeconds, isAcknowledgeRPdu, isActionRequestPdu, isActionRequestRPdu, isActionResponsePdu, isActionResponseRPdu, isAggregateStatePdu, isAppearancePdu, isArealObjectStatePdu, isArticulatedPartsPdu, isAttributePdu, isCollisionElasticPdu, isCollisionPdu, isCommentPdu, isCommentRPdu, isCreateEntityPdu, isCreateEntityRPdu, isDataPdu, isDataQueryPdu, isDataQueryRPdu, isDataRPdu, isDesignatorPdu, isDetonationPdu, isDirectedEnergyFirePdu, isDistributedEmissionsRegenerationFamilyPdu, isElectromagneticEmissionPdu, isEntityDamageStatusPdu, isEntityInformationInteractionFamilyPdu, isEntityManagementFamilyPdu, isEntityStatePdu, isEntityStateUpdatePdu, isEnvironmentalProcessPdu, isEventReportPdu, isEventReportRPdu, isFirePdu, isGriddedDataPdu, isIFFPdu, isInformationOperationsActionPdu, isInformationOperationsFamilyPdu, isInformationOperationsReportPdu, isIntercomControlPdu, isIntercomSignalPdu, isIsGroupOfPdu, isIsPartOfPdu, isLEDetonationPdu, isLEFirePdu, isLinearObjectStatePdu, isLiveEntityDetonationPdu, isLiveEntityFirePdu, isLogisticsFamilyPdu, isMinefieldDataPdu, isMinefieldFamilyPdu, isMinefieldQueryPdu, isMinefieldResponseNACKPdu, isMinefieldStatePdu, isPointObjectStatePdu, isRadioCommunicationsFamilyPdu, isReceiverPdu, isRecordQueryRPdu, isRecordRPdu, isReliablePdu, isRemoveEntityPdu, isRemoveEntityRPdu, isRepairCompletePdu, isRepairResponsePdu, isResupplyCancelPdu, isResupplyOfferPdu, isResupplyReceivedPdu, isSEESPdu, isSetDataPdu, isSetDataRPdu, isSetRecordRPdu, isSignalPdu, isSimulationManagementFamilyPdu, isSimulationManagementWithReliabilityFamilyPdu, isStartResumePdu, isStartResumeRPdu, isStopFreezePdu, isStopFreezeRPdu, isSupplementalEmissionEntityStatePdu, isSyntheticEnvironmentFamilyPdu, isTransferOwnershipPdu, isTransmitterPdu, isTSPIPdu, isUnderwaterAcousticPdu, isWarfareFamilyPdu, marshal, occursAfter, occursBefore, occursSameTime, setExerciseID, setExerciseID, setLength, setLength, setPduType, setProtocolFamily, setProtocolVersion, setTimestamp, setTimestampSeconds
-
Field Details
-
NAME
-
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 with units of radians 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). -
byteArrayOutputStream
byteArrayOutputStream (baos) is used for marshal/unmarshal serialization- See Also:
-
dataOutputStream
dataOutputStream (dos) is used for marshal/unmarshal serialization- See Also:
-
-
Constructor Details
-
EntityStateUpdatePdu
public EntityStateUpdatePdu()Constructor creates and configures a new instance object
-
-
Method Details
-
copy
copy method creates a deep copy of current object using preferred marshalling method- Returns:
- deep copy of PDU
-
copyByteBuffer
Creates a "deep copy" of current object using ByteBuffer methods.- Returns:
- deep copy of PDU
-
copyDataOutputStream
copy method creates a deep copy of current object using DataOutputStream methods.- Returns:
- deep copy of PDU
-
getMarshalledSize
public int getMarshalledSize()Returns size of this serialized (marshalled) object in bytes- Specified by:
getMarshalledSize
in interfaceMarshaller
- Overrides:
getMarshalledSize
in classEntityInformationInteractionFamilyPdu
- Returns:
- serialized size in bytes
- See Also:
-
setEntityID
Setter forentityID
- Parameters:
pEntityID
- new value of interest- Returns:
- same object to permit progressive setters
-
getEntityID
-
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
-
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
-
setEntityOrientation
Setter forentityOrientation
- Parameters:
pEntityOrientation
- new value of interest- Returns:
- same object to permit progressive setters
-
getEntityOrientation
-
setEntityAppearance
Setter forentityAppearance
- Parameters:
pEntityAppearance
- new value of interest- Returns:
- same object to permit progressive setters
-
getEntityAppearance
-
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:
marshal
in interfaceMarshaller
- Overrides:
marshal
in classEntityInformationInteractionFamilyPdu
- Parameters:
dos
- the OutputStream- Throws:
Exception
- if something goes wrong- See Also:
-
unmarshal
Deserializes an object from a DataInputStream.- Specified by:
unmarshal
in interfaceMarshaller
- Overrides:
unmarshal
in classEntityInformationInteractionFamilyPdu
- Parameters:
dis
- the InputStream- Returns:
- marshalled serialized size in bytes
- Throws:
Exception
- if something goes wrong- See Also:
-
marshal
Packs an object into the ByteBuffer.- Specified by:
marshal
in interfaceMarshaller
- Overrides:
marshal
in classEntityInformationInteractionFamilyPdu
- 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:
-
unmarshal
Unpacks a Pdu from the underlying data.- Specified by:
unmarshal
in interfaceMarshaller
- Overrides:
unmarshal
in classEntityInformationInteractionFamilyPdu
- 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:
-
equals
- Overrides:
equals
in classEntityInformationInteractionFamilyPdu
-
equalsImpl
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 classEntityInformationInteractionFamilyPdu
- Parameters:
obj
- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
- Overrides:
toString
in classEntityInformationInteractionFamilyPdu
-
hashCode
-