Package edu.nps.moves.dis7
Class FirePdu
java.lang.Object
edu.nps.moves.dis7.Pdu
edu.nps.moves.dis7.PduBase
edu.nps.moves.dis7.WarfareFamilyPdu
edu.nps.moves.dis7.FirePdu
- All Implemented Interfaces:
edu.nps.moves.dis7.Marshaller,java.io.Serializable
public class FirePdu extends WarfareFamilyPdu implements java.io.Serializable
7.3.2 Used to communicate the firing of a weapon or expendable.
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 MunitionDescriptordescriptorThis field shall describe the firing or launch of a munition or expendable represented by one of the following types of Descriptor records: Munition Descriptor (6.2.20.2) or Expendable Descriptor (6.2.20.4).protected EventIdentifiereventIDThis field shall contain an identification generated by the firing entity to associate related firing and detonation events.protected intfireMissionIndexThis field shall identify the fire mission (see 5.4.3.3).protected EntityIDfiringEntityIDID of the entity that shotprotected Vector3DoublelocationInWorldCoordinatesThis field shall specify the location, in world coordinates, from which the munition was launched, and shall be represented by a World Coordinates record (see 6.2.97).protected EntityIDmunitionExpendibleIDThis field shall specify the entity identification of the fired munition or expendable.protected floatrangeThis field shall specify the range that an entity's fire control system has assumed in computing the fire control solution.protected EntityIDtargetEntityIDID of the entity that is being shot atprotected Vector3FloatvelocityThis field shall specify the velocity of the fired munition at the point when the issuing simulation application intends the externally visible effects of the launch (e.g.Fields inherited from class edu.nps.moves.dis7.Pdu
exerciseID, length, pduType, protocolFamily, protocolVersion, timestamp -
Constructor Summary
Constructors Constructor Description FirePdu()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 fordescriptorEventIdentifiergetEventID()Getter foreventIDintgetFireMissionIndex()Getter forfireMissionIndexEntityIDgetFiringEntityID()Getter forfiringEntityIDVector3DoublegetLocationInWorldCoordinates()Getter forlocationInWorldCoordinatesintgetMarshalledSize()Returns the size of this serialized object in bytesEntityIDgetMunitionExpendibleID()Getter formunitionExpendibleIDfloatgetRange()Getter forrangeEntityIDgetTargetEntityID()Getter fortargetEntityIDVector3FloatgetVelocity()Getter forvelocityvoidmarshal(java.io.DataOutputStream dos)Serializes an object to a DataOutputStream.voidmarshal(java.nio.ByteBuffer buff)Packs an object into the ByteBuffer.FirePdusetDescriptor(MunitionDescriptor pDescriptor)Setter fordescriptorFirePdusetEventID(EventIdentifier pEventID)Setter foreventIDFirePdusetFireMissionIndex(int pFireMissionIndex)Setter forfireMissionIndexFirePdusetFiringEntityID(EntityID pFiringEntityID)Setter forfiringEntityIDFirePdusetLocationInWorldCoordinates(Vector3Double pLocationInWorldCoordinates)Setter forlocationInWorldCoordinatesFirePdusetMunitionExpendibleID(EntityID pMunitionExpendibleID)Setter formunitionExpendibleIDFirePdusetRange(float pRange)Setter forrangeFirePdusetTargetEntityID(EntityID pTargetEntityID)Setter fortargetEntityIDFirePdusetVelocity(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
-
firingEntityID
ID of the entity that shot -
targetEntityID
ID of the entity that is being shot at -
munitionExpendibleID
This field shall specify the entity identification of the fired munition or expendable. This field shall be represented by an Entity Identifier record (see 6.2.28). -
eventID
This field shall contain an identification generated by the firing entity to associate related firing and detonation events. This field shall be represented by an Event Identifier record (see 6.2.34). -
fireMissionIndex
protected int fireMissionIndexThis field shall identify the fire mission (see 5.4.3.3). This field shall be represented by a 32-bit unsigned integer. -
locationInWorldCoordinates
This field shall specify the location, in world coordinates, from which the munition was launched, and shall be represented by a World Coordinates record (see 6.2.97). -
descriptor
This field shall describe the firing or launch of a munition or expendable represented by one of the following types of Descriptor records: Munition Descriptor (6.2.20.2) or Expendable Descriptor (6.2.20.4). -
velocity
This field shall specify the velocity of the fired munition at the point when the issuing simulation application intends the externally visible effects of the launch (e.g. exhaust plume or muzzle blast) to first become apparent. The velocity shall be represented in world coordinates. This field shall be represented by a Linear Velocity Vector record [see 6.2.95 item c)]. -
range
protected float rangeThis field shall specify the range that an entity's fire control system has assumed in computing the fire control solution. This field shall be represented by a 32-bit floating point number in meters. For systems where range is unknown or unavailable, this field shall contain a value of zero.
-
-
Constructor Details
-
FirePdu
public FirePdu()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
-
setFiringEntityID
Setter forfiringEntityID -
getFiringEntityID
Getter forfiringEntityID -
setTargetEntityID
Setter fortargetEntityID -
getTargetEntityID
Getter fortargetEntityID -
setMunitionExpendibleID
Setter formunitionExpendibleID -
getMunitionExpendibleID
Getter formunitionExpendibleID -
setEventID
Setter foreventID -
getEventID
Getter foreventID -
setFireMissionIndex
Setter forfireMissionIndex -
getFireMissionIndex
public int getFireMissionIndex()Getter forfireMissionIndex -
setLocationInWorldCoordinates
Setter forlocationInWorldCoordinates -
getLocationInWorldCoordinates
Getter forlocationInWorldCoordinates -
setDescriptor
Setter fordescriptor -
getDescriptor
Getter fordescriptor -
setVelocity
Setter forvelocity -
getVelocity
Getter forvelocity -
setRange
Setter forrange -
getRange
public float getRange()Getter forrange -
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
-