Class mil.navy.nps.dis.FirePdu
java.lang.Object
|
+----mil.navy.nps.dis.PduElement
|
+----mil.navy.nps.dis.ProtocolDataUnit
|
+----mil.navy.nps.dis.FirePdu
- public class FirePdu
- extends ProtocolDataUnit
- Version:
- 1.0
- Author:
- Don McGregor (http://www.stl.nps.navy.mil/~mcgredo)
- Location:
-
http://www.stl.nps.navy.mil/dis-java-vrml/mil/navy/nps/dis/FirePdu.java
- Hierarchy Diagram:
- Summary:
- The firing of a weapon shall be communicated by issuing a Fire PDU.
- Explanation:
- The fire pdu denotes the firing of a weapon. It inherits the header
information from ProtocolDataUnit, an abstract class that contains
assorted protocol information. It implements the IDs of what's
firing, what's being shot at, the munition, the event, and where
the munition is headed.
As with other PDUs, it knows how to serialize and deserialize itself
from the wire. It also knows how to clone itself, and knows how to
calculate its size when sent to the wire.
- History:
- 11Dec96 /Don McGregor /New
- 10Mar97 /Don McGregor /changes for javadoc compliance
- 16Apr97 /Don McGregor /PrintStream passed to printValues
- 8Dec97 /Ronan Fauglas /changes for documentation templates + complements in documentation
- 11Dec97 /Ronan Fauglas /changed access methods: thisVariable() --> getThisVariable()
- 14jan97 /Ronan Fauglas /changed position to locationInWorldCoordinate
- References:
- DIS Data Dictionary :
Fire PDU
- DIS-Java-VRML Working Group:
http://www.stl.nps.navy.mil/dis-java-vrml/
- DIS specification : IEEE 1278.1, Section 5.4.4.1, 4.4.3.2
- Note:
- No accessor methods to nested records is provided.
- See Also:
- ProtocolDataUnit, PduElement, mil.navy.nps.util.SerializationInterface, DetonationPdu
Field Summary
|
BurstDescriptor
|
burstDescriptor
Burst Descriptor - This field shall describe the type of munition fired, the warhead, the fuse,
the quantity, and the rate.
|
EventID
|
eventID
Event Identification - This field shall contain an identification generated by the firing entity
to associate related firing and detonation events.
|
mil.navy.nps.util.UnsignedInt
|
fireMissionIndex
Fire Mission Index - This field shall identify the fire mission.
|
EntityID
|
firingEntityID
Firing Entity Identification - This field shall identify the firing entity.
|
WorldCoordinate
|
locationInWorldCoordinate
Location in World Coordinate - This field shall specify the location, in world coordinates, from which the munition was launched.
|
EntityID
|
munitionID
Munition Identification - This field shall specify the entity ID of the fired munition
if tracking data is required.
|
float
|
range
This field shall specify the range that an entity's fire control system
has assumed in computing the fire control solution.
|
static int
|
sizeOf
Constant value--size of Fire PDU with header.
|
EntityID
|
targetEntityID
Target Entity Identification - This field shall identify the intended target.
|
LinearVelocity
|
velocity
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.
|
Constructor Summary
|
FirePdu()
Default constructor--fills with zeros for all values.
|
Methods inherited from class mil.navy.nps.dis.ProtocolDataUnit
|
, clone, datagramToPdu, deSerialize, getExerciseID, getPduType, getProtocolFamily, getProtocolVersion, getTimestamp, getVRMLTimestamp, length, makeTimestampCurrent, PDUName, printValues, serialize, setExerciseID, setExerciseID, setPduType, setPduType, setProtocolFamily, setProtocolFamily, setProtocolVersion, setProtocolVersion, setSimulationStartTime, setTimestamp, setTimestamp |
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
firingEntityID
protected EntityID firingEntityID
- Firing Entity Identification - This field shall identify the firing entity.
targetEntityID
protected EntityID targetEntityID
- Target Entity Identification - This field shall identify the intended target.
- Value:
- If the intended target is unknown, this field shall contain TARGET_ID_ UNKNOWN.
munitionID
protected EntityID munitionID
- Munition Identification - This field shall specify the entity ID of the fired munition
if tracking data is required.
- Value:
- A munition ID shall have a value of MUNITION _NOT_TRACKED if tracking data for the munition
is not required.
eventID
protected EventID eventID
- Event Identification - This field shall contain an identification generated by the firing entity
to associate related firing and detonation events.
fireMissionIndex
protected mil.navy.nps.util.UnsignedInt fireMissionIndex
- Fire Mission Index - This field shall identify the fire mission.
- Value:
- If the fire mission is unknown this field shall contain NO_FIRE_MISSION.
locationInWorldCoordinate
protected WorldCoordinate locationInWorldCoordinate
- Location in World Coordinate - This field shall specify the location, in world coordinates, from which the munition was launched.
burstDescriptor
protected BurstDescriptor burstDescriptor
- Burst Descriptor - This field shall describe the type of munition fired, the warhead, the fuse,
the quantity, and the rate.
velocity
protected LinearVelocity velocity
- 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.
range
protected float range
- This field shall specify the range that an entity's fire control system
has assumed in computing the fire control solution.
- Value:
- 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.
- References:
- DIS Data Dictionary:
Range Field
sizeOf
public static final int sizeOf
- Constant value--size of Fire PDU with header. Here:
sizeOf = 96 bytes
FirePdu
public FirePdu()
- Default constructor--fills with zeros for all values.
clone
public java.lang.Object clone()
- Overrides:
- clone in class ProtocolDataUnit
serialize
public void serialize(java.io.DataOutputStream outputStream)
- Throws:
- java.lang.RuntimeException - when IO error occurs.
- Overrides:
- serialize in class ProtocolDataUnit
deSerialize
public void deSerialize(java.io.DataInputStream inputStream)
- Throws:
- java.lang.RuntimeException - when IO error occurs.
- Overrides:
- deSerialize in class ProtocolDataUnit
length
public int length()
- Overrides:
- length in class ProtocolDataUnit
PDUName
public java.lang.String PDUName()
- Overrides:
- PDUName in class ProtocolDataUnit
printValues
public void printValues(int indentLevel,
java.io.PrintStream printStream)
- Overrides:
- printValues in class ProtocolDataUnit
getFiringEntityID
public EntityID getFiringEntityID()
setFiringEntityID
public void setFiringEntityID(EntityID pFiringEntityID)
getTargetEntityID
public EntityID getTargetEntityID()
setTargetEntityID
public void setTargetEntityID(EntityID pTargetEntityID)
getMunitionID
public EntityID getMunitionID()
setMunitionID
public void setMunitionID(EntityID pMunitionID)
getEventID
public EventID getEventID()
setEventID
public void setEventID(EventID pEventID)
getFireMissionIndex
public mil.navy.nps.util.UnsignedInt getFireMissionIndex()
setFireMissionIndex
public void setFireMissionIndex(mil.navy.nps.util.UnsignedInt pFireMissionIndex)
setFireMissionIndex
public void setFireMissionIndex(int pFireMissionIndex)
getLocationInWorldCoordinate
public WorldCoordinate getLocationInWorldCoordinate()
setLocationInWorldCoordinate
public void setLocationInWorldCoordinate(WorldCoordinate pWorldCoordinate)
setLocationInWorldCoordinate
public void setLocationInWorldCoordinate(double pX,
double pY,
double pZ)
getBurstDescriptor
public BurstDescriptor getBurstDescriptor()
setBurstDescriptor
public void setBurstDescriptor(BurstDescriptor pBurstDescriptor)
getVelocity
public LinearVelocity getVelocity()
setVelocity
public void setVelocity(LinearVelocity pVelocity)
setVelocity
public void setVelocity(float pX,
float pY,
float pZ)
getRange
public float getRange()
setRange
public void setRange(float pRange)