mil.navy.nps.dis
Class BurstDescriptor

java.lang.Object
  extended bymil.navy.nps.dis.PduElement
      extended bymil.navy.nps.dis.BurstDescriptor
All Implemented Interfaces:
java.lang.Cloneable, SerializationInterface

public class BurstDescriptor
extends PduElement

Weapons burst (firing) description record.

Version:
1.0
Author:
Don McGregor (http://www.npsnet.org/~mcgredo)
Location:
Web: http://www.web3d.org/WorkingGroups/vrtp/mil/navy/nps/dis/BurstDescriptor.java
or locally: ~/mil/navy/nps/dis/BurstDescriptor.java
Hierarchy Diagram:
Summary:
The firing of a round or a burst of ammunition shall be represented by a Burst Descriptor Record.
Explanation
Describes information about a weapons burst fired by some entity, such as the warhead type, the fuze, and how much was fired.

Includes the EntityType record, which describes the country and assorted other geeky information.

History:
13Dec96 /Don McGregor /New
05Mar97 /Don McGregor /Cleaned up for javadoc
16Apr97 /Don McGregor /PrintStream passed to printValues
8Dec97 /Ronan Fauglas /changes for documentation templates + complements in documentation
11Dec97 /Ronan Fauglas /changes access methods names from "variable()" to "getVariable()"
References:
DIS Data Dictionary: Burst Descriptor Record
DIS specification : IEEE 1278.1, 5.3.7
See Also:
PduElement, SerializationInterface, FirePdu, DetonationPdu

Field Summary
protected  UnsignedShort fuse
          Type of fuse.
protected  EntityType munition
          Munition Record.
protected  UnsignedShort quantity
          Quantity shall represent the number of rounds fired in the burst for the munition specified.
protected  UnsignedShort rate
          The Rate shall represent the rounds per minute for the munition specified.
static int sizeOf
          Constant value--size of a Burst Desciptor Record; here :sizeOf = 16 bytes.
protected  UnsignedShort warhead
          This filed shall describe the kind of explosive.
 
Constructor Summary
BurstDescriptor()
          Default constructor.
 
Method Summary
 java.lang.Object clone()
          Makes deep copies of all the instance variables, so we don't have two objects pointing to the same data.
 void deSerialize(java.io.DataInputStream inputStream)
          Deserialize our data from the input stream.
 UnsignedShort getFuse()
           
 EntityType getMunition()
           
 UnsignedShort getQuantity()
           
 UnsignedShort getRate()
           
 UnsignedShort getWarhead()
           
 int length()
          Returns the length of the object when serialized in a stream.
 void printValues(int indentLevel, java.io.PrintStream printStream)
          Prints the generated serialized object for debugging.
 void serialize(java.io.DataOutputStream outputStream)
          Serialize our data out to the stream.
 void setFuse(int pFuse)
           
 void setFuse(UnsignedShort pFuse)
           
 void setMunition(EntityType pMunition)
           
 void setQuantity(int pQuantity)
           
 void setQuantity(UnsignedShort pQuantity)
           
 void setRate(int pRate)
           
 void setRate(UnsignedShort pRate)
           
 void setWarhead(int pWarhead)
           
 void setWarhead(UnsignedShort pWarhead)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

munition

protected EntityType munition
Munition Record.


warhead

protected UnsignedShort warhead
This filed shall describe the kind of explosive.
Value:
Enumeration, see references below for values.
References:
DIS Data Dictionary :Warhead Field
see Section 5 in EBV-DOC.


fuse

protected UnsignedShort fuse
Type of fuse.
Value:
Enumeration, see references below for values.
References:
DIS Data Dictionary :Fuse Field
see Section 5 in EBV-DOC.


quantity

protected UnsignedShort quantity
Quantity shall represent the number of rounds fired in the burst for the munition specified.
References:
DIS Data Dictionary :Quantity Field


rate

protected UnsignedShort rate
The Rate shall represent the rounds per minute for the munition specified.
References:
DIS Data Dictionary :Rate Field


sizeOf

public static final int sizeOf
Constant value--size of a Burst Desciptor Record; here :sizeOf = 16 bytes.

See Also:
Constant Field Values
Constructor Detail

BurstDescriptor

public BurstDescriptor()
Default constructor. Initializes everything to zero, basically.

Method Detail

clone

public java.lang.Object clone()
Description copied from class: PduElement
Makes deep copies of all the instance variables, so we don't have two objects pointing to the same data. The accessor methods make copies of the objects, rather than returning the objects themselves. The runtime provides the right object type with the call to super.clone(), and we cast it to our type. Subclasses should do the same thing, and all these ivars will be taken care of automatically.

Overrides:
clone in class PduElement
Returns:
a clone of this instance
See Also:
Object

serialize

public void serialize(java.io.DataOutputStream outputStream)
Description copied from class: PduElement
Serialize our data out to the stream. Subclasses of us should call super.Serialize() to make sure the superclasse's data is serialized out. The order in which instance variables are serialized is significant. They must be serialized in the same order they appear in the DIS spec. Prints out some information during execution if debugging flag is set.

Specified by:
serialize in interface SerializationInterface
Specified by:
serialize in class PduElement
Parameters:
outputStream - the stream to which this object is serialized

deSerialize

public void deSerialize(java.io.DataInputStream inputStream)
Description copied from class: PduElement
Deserialize our data from the input stream. Subclasses of us should call super.deSerialize to make sure the superclass's data are properly affected. The order in which instance variables are serialized is significant. They must be deSerialized in the same order as they have been serialized as specified by the DIS spec.

Specified by:
deSerialize in interface SerializationInterface
Specified by:
deSerialize in class PduElement
Parameters:
inputStream - the stream from which this object is initialized

length

public int length()
Description copied from class: PduElement
Returns the length of the object when serialized in a stream.

Specified by:
length in class PduElement
Returns:
the length of the object when serialized in a stream

printValues

public void printValues(int indentLevel,
                        java.io.PrintStream printStream)
Description copied from class: PduElement
Prints the generated serialized object for debugging.

Specified by:
printValues in class PduElement
Parameters:
indentLevel - number of spaces to indent for visibility

getMunition

public EntityType getMunition()

setMunition

public void setMunition(EntityType pMunition)

getWarhead

public UnsignedShort getWarhead()

setWarhead

public void setWarhead(UnsignedShort pWarhead)

setWarhead

public void setWarhead(int pWarhead)

getFuse

public UnsignedShort getFuse()

setFuse

public void setFuse(UnsignedShort pFuse)

setFuse

public void setFuse(int pFuse)

getQuantity

public UnsignedShort getQuantity()

setQuantity

public void setQuantity(UnsignedShort pQuantity)

setQuantity

public void setQuantity(int pQuantity)

getRate

public UnsignedShort getRate()

setRate

public void setRate(UnsignedShort pRate)

setRate

public void setRate(int pRate)