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 MunitionDescriptor
descriptor
Describes the detonation represented, Section 7.3.3protected DetonationResult
detonationResult
result of the detonation, Section 7.3.3 uid 62protected EventIdentifier
eventID
ID of event, Section 7.3.3protected EntityID
explodingEntityID
ID of the expendable entity, Section 7.3.3protected Vector3Double
locationInWorldCoordinates
location of the munition detonation, the expendable detonation, Section 7.3.3protected Vector3Float
locationOfEntityCoordinates
Velocity of the ammunition, Section 7.3.3protected byte
numberOfVariableParameters
How many articulation parameters we have, Section 7.3.3protected short
pad
paddingprotected EntityID
sourceEntityID
ID of the entity that shotprotected EntityID
targetEntityID
ID of the entity that is being shot atprotected java.util.List<VariableParameter>
variableParameters
specify the parameter values for each Variable Parameter record, Section 7.3.3protected Vector3Float
velocity
velocity 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 boolean
equals(java.lang.Object obj)
boolean
equalsImpl(java.lang.Object obj)
Compare all fields that contribute to the state, ignoring transient and static fields, forthis
and the supplied objectMunitionDescriptor
getDescriptor()
Getter fordescriptor
DetonationResult
getDetonationResult()
Getter fordetonationResult
EventIdentifier
getEventID()
Getter foreventID
EntityID
getExplodingEntityID()
Getter forexplodingEntityID
Vector3Double
getLocationInWorldCoordinates()
Getter forlocationInWorldCoordinates
Vector3Float
getLocationOfEntityCoordinates()
Getter forlocationOfEntityCoordinates
int
getMarshalledSize()
Returns the size of this serialized object in bytesshort
getPad()
Getter forpad
EntityID
getSourceEntityID()
Getter forsourceEntityID
EntityID
getTargetEntityID()
Getter fortargetEntityID
java.util.List<VariableParameter>
getVariableParameters()
Getter forvariableParameters
Vector3Float
getVelocity()
Getter forvelocity
void
marshal(java.io.DataOutputStream dos)
Serializes an object to a DataOutputStream.void
marshal(java.nio.ByteBuffer buff)
Packs an object into the ByteBuffer.DetonationPdu
setDescriptor(MunitionDescriptor pDescriptor)
Setter fordescriptor
DetonationPdu
setDetonationResult(DetonationResult pDetonationResult)
Setter fordetonationResult
DetonationPdu
setEventID(EventIdentifier pEventID)
Setter foreventID
DetonationPdu
setExplodingEntityID(EntityID pExplodingEntityID)
Setter forexplodingEntityID
DetonationPdu
setLocationInWorldCoordinates(Vector3Double pLocationInWorldCoordinates)
Setter forlocationInWorldCoordinates
DetonationPdu
setLocationOfEntityCoordinates(Vector3Float pLocationOfEntityCoordinates)
Setter forlocationOfEntityCoordinates
DetonationPdu
setPad(short pPad)
Setter forpad
DetonationPdu
setSourceEntityID(EntityID pSourceEntityID)
Setter forsourceEntityID
DetonationPdu
setTargetEntityID(EntityID pTargetEntityID)
Setter fortargetEntityID
DetonationPdu
setVariableParameters(java.util.List<VariableParameter> pVariableParameters)
Setter forvariableParameters
DetonationPdu
setVelocity(Vector3Float pVelocity)
Setter forvelocity
java.lang.String
toString()
int
unmarshal(java.io.DataInputStream dis)
Unserializes an object from a DataInputStream.int
unmarshal(java.nio.ByteBuffer buff)
Unpacks a Pdu from the underlying data.Methods inherited from class edu.nps.moves.dis7.PduBase
getPadding, getPduStatus, setPadding, setPduStatus
Methods 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:
getMarshalledSize
in interfaceedu.nps.moves.dis7.Marshaller
- Overrides:
getMarshalledSize
in 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:
marshal
in interfaceedu.nps.moves.dis7.Marshaller
- Overrides:
marshal
in 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:
unmarshal
in interfaceedu.nps.moves.dis7.Marshaller
- Overrides:
unmarshal
in 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:
marshal
in interfaceedu.nps.moves.dis7.Marshaller
- Overrides:
marshal
in 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:
unmarshal
in interfaceedu.nps.moves.dis7.Marshaller
- Overrides:
unmarshal
in 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:
equals
in classWarfareFamilyPdu
-
equalsImpl
public boolean equalsImpl(java.lang.Object obj)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 classWarfareFamilyPdu
- Parameters:
obj
- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
public java.lang.String toString()- Overrides:
toString
in classWarfareFamilyPdu
-