mil.navy.nps.dis
Class SimulationManagementFamily

java.lang.Object
  extended bymil.navy.nps.dis.PduElement
      extended bymil.navy.nps.dis.ProtocolDataUnit
          extended bymil.navy.nps.dis.SimulationManagementFamily
All Implemented Interfaces:
java.lang.Cloneable, SerializationInterface
Direct Known Subclasses:
AcknowledgePdu, ActionRequestPdu, ActionResponsePdu, CommentPdu, CreateEntityPdu, DataPdu, DataQueryPdu, EventReportPdu, RemoveEntityPdu, SetDataPdu, StartResumePdu, StopFreezePdu

public abstract class SimulationManagementFamily
extends ProtocolDataUnit

Abstract (uninstantiated) parent class for Simulation Management PDU family.

Version:
1.0
Author:
Antonio Alexandre Rua (http://www.garfield.fe.up.pt/~alexrua)
Location:
Web: http://www.web3d.org/WorkingGroups/vrtp/mil/navy/nps/dis/SimulationManagementFamily.java
or locally: ~/mil/navy/nps/dis/SimulationManagementFamily.java
Hierarchy Diagram:
Summary:
The Simulation Management Family is an abstract class, inherited by all simulation management family PDUs.
Explanation:
It encapsulates the specific header for the simulation Management PDUs which includes the PDU header, the originating entity identity, and The advantage is that, we define methods to deal with this header, and all the classes inherit from it, avoiding rewriting them a lot of times.
History:
16Sep97 /Antonio Alexandre Rua /New
8Dec97 /Ronan Fauglas /changes for documentation templates + complements in documentation
11Dec97 /Ronan Fauglas /changed access methods: thisVariable() --> getThisVariable()
17July2000 /Don Brutzman and Dave Laflam /renamed SimulationManagementPdu -> SimulationManagementFamily
References:
DIS-Java-VRML Working Group: http://www.web3d.org/WorkingGroups/vrtp/dis-java-vrml/
DIS specification : IEEE 1278.1, Section 5.3.29, 4.4.5.1
See Also:
ProtocolDataUnit, PduElement, SerializationInterface

Field Summary
protected  EntityID originatingEntityID
          Identifier of the entity originating the PDU.
protected  EntityID receivingEntityID
          Identifier of the entity receiving the PDU.
static int sizeOf
          Constant value--size of a Simulation Management PDU without headder.
 
Fields inherited from class mil.navy.nps.dis.ProtocolDataUnit
DEBUG, exerciseID, pduType, protocolFamily, protocolVersion, timeReceived, timestamp
 
Constructor Summary
SimulationManagementFamily()
           
 
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.
 EntityID getOriginatingEntityID()
           
 EntityID getReceivingEntityID()
           
 int length()
          Returns the length of the PDU header.
abstract  java.lang.String pduName()
          Returns the name of this PDU
 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 setOriginatingEntityID(EntityID pEntityID)
           
 void setReceivingEntityID(EntityID pEntityID)
           
 
Methods inherited from class mil.navy.nps.dis.ProtocolDataUnit
byteArrayToPdu, datagramToPdu, debug, getExerciseID, getPaddingOfLength, getPduType, getProtocolFamily, getProtocolVersion, getRtpHeaderEnabled, getTimeReceived, getTimestamp, getVRMLTimestamp, makeTimestampCurrent, setExerciseID, setExerciseID, setPduType, setPduType, setProtocolFamily, setProtocolFamily, setProtocolVersion, setProtocolVersion, setRtpHeaderEnabled, setSimulationStartTime, setTimeReceived, setTimestamp, setTimestamp, stampTimeReceived, toString, trace
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

originatingEntityID

protected EntityID originatingEntityID
Identifier of the entity originating the PDU. The semantics depend on derived class type.


receivingEntityID

protected EntityID receivingEntityID
Identifier of the entity receiving the PDU. The semantics depend on derived class type.


sizeOf

public static final int sizeOf
Constant value--size of a Simulation Management PDU without headder. sizeOf = 12 bytes

See Also:
Constant Field Values
Constructor Detail

SimulationManagementFamily

public SimulationManagementFamily()
Method Detail

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
Overrides:
serialize in class ProtocolDataUnit

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
Overrides:
deSerialize in class ProtocolDataUnit

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 ProtocolDataUnit

length

public int length()
Description copied from class: ProtocolDataUnit
Returns the length of the PDU header.

Overrides:
length in class ProtocolDataUnit
Returns:
the length of the PDU header (currently 12 bytes). Note that this should NOT include the length of the RTP header.

pduName

public abstract java.lang.String pduName()
Returns the name of this PDU

Specified by:
pduName in class ProtocolDataUnit
Returns:
the name of this PDU

printValues

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

Overrides:
printValues in class ProtocolDataUnit

getOriginatingEntityID

public EntityID getOriginatingEntityID()

setOriginatingEntityID

public void setOriginatingEntityID(EntityID pEntityID)

getReceivingEntityID

public EntityID getReceivingEntityID()

setReceivingEntityID

public void setReceivingEntityID(EntityID pEntityID)