Package edu.nps.moves.dis7
Class DetonationPdu
java.lang.Object
edu.nps.moves.dis7.Pdu
edu.nps.moves.dis7.PduBase
edu.nps.moves.dis7.WarfareFamilyPdu
edu.nps.moves.dis7.DetonationPdu
- All Implemented Interfaces:
edu.nps.moves.dis7.Marshaller,java.io.Serializable
public class DetonationPdu extends WarfareFamilyPdu implements java.io.Serializable
7.3.3 Used to communicate the detonation or impact of munitions, as well as non-munition explosions, the burst or initial bloom of chaff, and the ignition of a flare.
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 MunitionDescriptordescriptorDescribes the detonation represented, Section 7.3.3protected DetonationResultdetonationResultresult of the detonation, Section 7.3.3 uid 62protected EventIdentifiereventIDID of event, Section 7.3.3protected EntityIDexplodingEntityIDID of the expendable entity, Section 7.3.3protected Vector3DoublelocationInWorldCoordinateslocation of the munition detonation, the expendable detonation, Section 7.3.3protected Vector3FloatlocationOfEntityCoordinatesVelocity of the ammunition, Section 7.3.3protected bytenumberOfVariableParametersHow many articulation parameters we have, Section 7.3.3protected shortpadpaddingprotected EntityIDsourceEntityIDID of the entity that shotprotected EntityIDtargetEntityIDID of the entity that is being shot atprotected java.util.List<VariableParameter>variableParametersspecify the parameter values for each Variable Parameter record, Section 7.3.3protected Vector3Floatvelocityvelocity of the munition immediately before detonation/impact, Section 7.3.3Fields inherited from class edu.nps.moves.dis7.Pdu
exerciseID, length, pduType, protocolFamily, protocolVersion, timestamp -
Constructor Summary
Constructors Constructor Description DetonationPdu()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 objectMunitionDescriptorgetDescriptor()Getter fordescriptorDetonationResultgetDetonationResult()Getter fordetonationResultEventIdentifiergetEventID()Getter foreventIDEntityIDgetExplodingEntityID()Getter forexplodingEntityIDVector3DoublegetLocationInWorldCoordinates()Getter forlocationInWorldCoordinatesVector3FloatgetLocationOfEntityCoordinates()Getter forlocationOfEntityCoordinatesintgetMarshalledSize()Returns the size of this serialized object in bytesshortgetPad()Getter forpadEntityIDgetSourceEntityID()Getter forsourceEntityIDEntityIDgetTargetEntityID()Getter fortargetEntityIDjava.util.List<VariableParameter>getVariableParameters()Getter forvariableParametersVector3FloatgetVelocity()Getter forvelocityvoidmarshal(java.io.DataOutputStream dos)Serializes an object to a DataOutputStream.voidmarshal(java.nio.ByteBuffer buff)Packs an object into the ByteBuffer.DetonationPdusetDescriptor(MunitionDescriptor pDescriptor)Setter fordescriptorDetonationPdusetDetonationResult(DetonationResult pDetonationResult)Setter fordetonationResultDetonationPdusetEventID(EventIdentifier pEventID)Setter foreventIDDetonationPdusetExplodingEntityID(EntityID pExplodingEntityID)Setter forexplodingEntityIDDetonationPdusetLocationInWorldCoordinates(Vector3Double pLocationInWorldCoordinates)Setter forlocationInWorldCoordinatesDetonationPdusetLocationOfEntityCoordinates(Vector3Float pLocationOfEntityCoordinates)Setter forlocationOfEntityCoordinatesDetonationPdusetPad(short pPad)Setter forpadDetonationPdusetSourceEntityID(EntityID pSourceEntityID)Setter forsourceEntityIDDetonationPdusetTargetEntityID(EntityID pTargetEntityID)Setter fortargetEntityIDDetonationPdusetVariableParameters(java.util.List<VariableParameter> pVariableParameters)Setter forvariableParametersDetonationPdusetVelocity(Vector3Float pVelocity)Setter forvelocityjava.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
-
sourceEntityID
ID of the entity that shot -
targetEntityID
ID of the entity that is being shot at -
explodingEntityID
ID of the expendable entity, Section 7.3.3 -
eventID
ID of event, Section 7.3.3 -
velocity
velocity of the munition immediately before detonation/impact, Section 7.3.3 -
locationInWorldCoordinates
location of the munition detonation, the expendable detonation, Section 7.3.3 -
descriptor
Describes the detonation represented, Section 7.3.3 -
locationOfEntityCoordinates
Velocity of the ammunition, Section 7.3.3 -
detonationResult
result of the detonation, Section 7.3.3 uid 62 -
numberOfVariableParameters
protected byte numberOfVariableParametersHow many articulation parameters we have, Section 7.3.3 -
pad
protected short padpadding -
variableParameters
specify the parameter values for each Variable Parameter record, Section 7.3.3
-
-
Constructor Details
-
DetonationPdu
public DetonationPdu()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 classWarfareFamilyPdu
-
setSourceEntityID
Setter forsourceEntityID -
getSourceEntityID
Getter forsourceEntityID -
setTargetEntityID
Setter fortargetEntityID -
getTargetEntityID
Getter fortargetEntityID -
setExplodingEntityID
Setter forexplodingEntityID -
getExplodingEntityID
Getter forexplodingEntityID -
setEventID
Setter foreventID -
getEventID
Getter foreventID -
setVelocity
Setter forvelocity -
getVelocity
Getter forvelocity -
setLocationInWorldCoordinates
Setter forlocationInWorldCoordinates -
getLocationInWorldCoordinates
Getter forlocationInWorldCoordinates -
setDescriptor
Setter fordescriptor -
getDescriptor
Getter fordescriptor -
setLocationOfEntityCoordinates
Setter forlocationOfEntityCoordinates -
getLocationOfEntityCoordinates
Getter forlocationOfEntityCoordinates -
setDetonationResult
Setter fordetonationResult -
getDetonationResult
Getter fordetonationResult -
setPad
Setter forpad -
getPad
public short getPad()Getter forpad -
setVariableParameters
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 classWarfareFamilyPdu- 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 classWarfareFamilyPdu- 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 classWarfareFamilyPdu- 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 classWarfareFamilyPdu- 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 classWarfareFamilyPdu
-
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 classWarfareFamilyPdu- Parameters:
obj- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
public java.lang.String toString()- Overrides:
toStringin classWarfareFamilyPdu
-