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.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 ByteArrayOutputStreambyteArrayOutputStream (baos) is used for marshal/unmarshal serializationprotected DataOutputStreamdataOutputStream (dos) is used for marshal/unmarshal serializationprotected 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 with units of radians and shall be represented by an Euler Angles record (see 6.2.33).static final StringThe name of this PDU typeprotected 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.EntityInformationInteractionFamilyPdu
FAMILY_NAMEFields 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.booleanbooleanequalsImpl(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 forvariableParametersinthashCode()voidmarshal(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
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:
getMarshalledSizein interfaceMarshaller- Overrides:
getMarshalledSizein 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:
marshalin interfaceMarshaller- Overrides:
marshalin classEntityInformationInteractionFamilyPdu- Parameters:
dos- the OutputStream- Throws:
Exception- if something goes wrong- See Also:
-
unmarshal
Deserializes an object from a DataInputStream.- Specified by:
unmarshalin interfaceMarshaller- Overrides:
unmarshalin 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:
marshalin interfaceMarshaller- Overrides:
marshalin 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:
unmarshalin interfaceMarshaller- Overrides:
unmarshalin 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:
equalsin classEntityInformationInteractionFamilyPdu
-
equalsImpl
Description copied from class:PduCompare all fields that contribute to the state, ignoring transient and static fields, forthisand the supplied object- Overrides:
equalsImplin classEntityInformationInteractionFamilyPdu- Parameters:
obj- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
- Overrides:
toStringin classEntityInformationInteractionFamilyPdu
-
hashCode
-