edu.nps.moves.dis7mobile
Class FirePdu

java.lang.Object
  extended by edu.nps.moves.dis7mobile.PduSuperclass
      extended by edu.nps.moves.dis7mobile.Pdu
          extended by edu.nps.moves.dis7mobile.WarfareFamilyPdu
              extended by edu.nps.moves.dis7mobile.FirePdu
All Implemented Interfaces:
java.io.Serializable

public class FirePdu
extends WarfareFamilyPdu
implements java.io.Serializable

The firing of a weapon or expendable shall be communicated by issuing a Fire PDU. Sectioin 7.3.2. COMPLETE Copyright (c) 2008-2010, MOVES Institute, Naval Postgraduate School. All rights reserved. This work is licensed under the BSD open source license, available at https://www.movesinstitute.org/licenses/bsd.html

Author:
DMcG
See Also:
Serialized Form

Field Summary
protected  MunitionDescriptor 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).
protected  EventIdentifier eventID
          This field shall contain an identification generated by the firing entity to associate related firing and detonation events.
protected  long fireMissionIndex
          This field shall identify the fire mission (see 5.4.3.3).
protected  Vector3Double 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).
protected  EntityID munitionExpendibleID
          This field shall specify the entity identification of the fired munition or expendable.
protected  float range
          This field shall specify the range that an entitys fire control system has assumed in computing the fire control solution.
protected  Vector3Float 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.
 
Fields inherited from class edu.nps.moves.dis7mobile.WarfareFamilyPdu
firingEntityID, targetEntityID
 
Fields inherited from class edu.nps.moves.dis7mobile.Pdu
padding, pduStatus
 
Fields inherited from class edu.nps.moves.dis7mobile.PduSuperclass
exerciseID, length, pduType, protocolFamily, protocolVersion, timestamp
 
Constructor Summary
FirePdu()
          Constructor
 
Method Summary
 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, for this and the supplied object
 MunitionDescriptor getDescriptor()
           
 EventIdentifier getEventID()
           
 long getFireMissionIndex()
           
 Vector3Double getLocationInWorldCoordinates()
           
 int getMarshalledSize()
           
 EntityID getMunitionExpendibleID()
           
 float getRange()
           
 Vector3Float getVelocity()
           
 void marshal(java.nio.ByteBuffer buff)
          Packs a Pdu into the ByteBuffer.
 void marshal(java.io.DataOutputStream dos)
           
 void setDescriptor(MunitionDescriptor pDescriptor)
           
 void setEventID(EventIdentifier pEventID)
           
 void setFireMissionIndex(long pFireMissionIndex)
           
 void setLocationInWorldCoordinates(Vector3Double pLocationInWorldCoordinates)
           
 void setMunitionExpendibleID(EntityID pMunitionExpendibleID)
           
 void setRange(float pRange)
           
 void setVelocity(Vector3Float pVelocity)
           
 void unmarshal(java.nio.ByteBuffer buff)
          Unpacks a Pdu from the underlying data.
 void unmarshal(java.io.DataInputStream dis)
           
 
Methods inherited from class edu.nps.moves.dis7mobile.WarfareFamilyPdu
getFiringEntityID, getTargetEntityID, setFiringEntityID, setTargetEntityID
 
Methods inherited from class edu.nps.moves.dis7mobile.Pdu
getPadding, getPduStatus, marshal, setPadding, setPduStatus
 
Methods inherited from class edu.nps.moves.dis7mobile.PduSuperclass
getExerciseID, getLength, getPduType, getProtocolFamily, getProtocolVersion, getTimestamp, setExerciseID, setLength, setPduType, setProtocolFamily, setProtocolVersion, setTimestamp
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

munitionExpendibleID

protected EntityID 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

protected EventIdentifier 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 long fireMissionIndex
This field shall identify the fire mission (see 5.4.3.3). This field shall be representedby a 32-bit unsigned integer.


locationInWorldCoordinates

protected Vector3Double 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

protected MunitionDescriptor 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

protected Vector3Float 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 range
This field shall specify the range that an entitys 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 Detail

FirePdu

public FirePdu()
Constructor

Method Detail

getMarshalledSize

public int getMarshalledSize()
Overrides:
getMarshalledSize in class WarfareFamilyPdu

setMunitionExpendibleID

public void setMunitionExpendibleID(EntityID pMunitionExpendibleID)

getMunitionExpendibleID

public EntityID getMunitionExpendibleID()

setEventID

public void setEventID(EventIdentifier pEventID)

getEventID

public EventIdentifier getEventID()

setFireMissionIndex

public void setFireMissionIndex(long pFireMissionIndex)

getFireMissionIndex

public long getFireMissionIndex()

setLocationInWorldCoordinates

public void setLocationInWorldCoordinates(Vector3Double pLocationInWorldCoordinates)

getLocationInWorldCoordinates

public Vector3Double getLocationInWorldCoordinates()

setDescriptor

public void setDescriptor(MunitionDescriptor pDescriptor)

getDescriptor

public MunitionDescriptor getDescriptor()

setVelocity

public void setVelocity(Vector3Float pVelocity)

getVelocity

public Vector3Float getVelocity()

setRange

public void setRange(float pRange)

getRange

public float getRange()

marshal

public void marshal(java.io.DataOutputStream dos)
Overrides:
marshal in class WarfareFamilyPdu

unmarshal

public void unmarshal(java.io.DataInputStream dis)
Overrides:
unmarshal in class WarfareFamilyPdu

marshal

public void marshal(java.nio.ByteBuffer buff)
Packs a Pdu into the ByteBuffer.

Overrides:
marshal in class WarfareFamilyPdu
Parameters:
buff - The ByteBuffer at the position to begin writing
Throws:
java.nio.BufferOverflowException - if buff is too small
java.nio.ReadOnlyBufferException - if buff is read only
Since:
??
See Also:
ByteBuffer

unmarshal

public void unmarshal(java.nio.ByteBuffer buff)
Unpacks a Pdu from the underlying data.

Overrides:
unmarshal in class WarfareFamilyPdu
Parameters:
buff - The ByteBuffer at the position to begin reading
Throws:
java.nio.BufferUnderflowException - if buff is too small
Since:
??
See Also:
ByteBuffer

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class WarfareFamilyPdu

equalsImpl

public boolean equalsImpl(java.lang.Object obj)
Description copied from class: PduSuperclass
Compare all fields that contribute to the state, ignoring transient and static fields, for this and the supplied object

Overrides:
equalsImpl in class WarfareFamilyPdu
Parameters:
obj - the object to compare to
Returns:
true if the objects are equal, false otherwise.