mil.navy.nps.dis
Class RadioCommunicationsFamily

java.lang.Object
  extended bymil.navy.nps.dis.PduElement
      extended bymil.navy.nps.dis.ProtocolDataUnit
          extended bymil.navy.nps.dis.RadioCommunicationsFamily
All Implemented Interfaces:
java.lang.Cloneable, SerializationInterface
Direct Known Subclasses:
ReceiverPdu, SignalPdu, TransmitterPdu

public class RadioCommunicationsFamily
extends ProtocolDataUnit

Abstract (uninstantiated) parent class for RadioCommunicationsFamily.

Version:
1.0
Author:
David W. Laflam (http://www.web3d.org/WorkingGroups/vrtp/dis-java-vrml/), Don Brutzman (http://www.web3d.org/WorkingGroups/vrtp/dis-java-vrml/), Don McGregor (http://www.web3d.org/WorkingGroups/vrtp/dis-java-vrml/)
Location:
Web: http://www.web3d.org/WorkingGroups/vrtp/mil/navy/nps/dis/RadioCommunicationsFamily.java
or locally: ~/mil/navy/nps/dis/RadioCommunicationsFamily.java
Hierarchy Diagram:
Summary:
The RadioCommunicationsFamily is an abstract class, for all Radio Communications Protocol Family PDUs ( TransmitterPDU.java, ReceiverPDU.Java, and SignaPDU.java).
Explanation:
It encapsulates the specific header for the RadioCommunicationsFamily 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:
6 AUG 2000 David W. Laflam /New
References:
DIS-Java-VRML Working Group: http://www.web3d.org/WorkingGroups/vrtp/dis-java-vrml/
DIS specification : IEEE 1278.1, Section 5.3.8 Radio Communications protocol (RCP) family (page 112) IEEE 1278.1-1995 paragraph 5.2.2.4 page 69, PDU Header Record IEEE 1278.1-1995 paragraph 5.3.8.1 page 112, Transmitter PDU IEEE 1278.1-1995 paragraph 5.3.8.2 page 115, Signal PDU IEEE 1278.1-1995 paragraph 5.3.8.3 page 117, Receiver PDU
See Also:
ProtocolDataUnit, PduElement, SerializationInterface, TransmitterPdu, ReceiverPdu, SignalPdu

Field Summary
protected  EntityID entityID
           
protected  UnsignedShort radioID
           
static int sizeOf
          Constant value--size of RadioCommunicationsFamily with header.
 
Fields inherited from class mil.navy.nps.dis.ProtocolDataUnit
DEBUG, exerciseID, pduType, protocolFamily, protocolVersion, timeReceived, timestamp
 
Constructor Summary
RadioCommunicationsFamily()
          Default constructor - creates entityID, radioID - fills with zeros for all values of the following parameters: entityID, radioID.
 
Method Summary
 java.lang.Object clone()
          Make a copy of the object.
 void deSerialize(java.io.DataInputStream inputStream)
          Deserialize the input stream, and order is important here, since we need to read in the same order as specified by the DIS standard
 EntityID getEntityID()
          Gets RadioCommunicationProtocolFamily entity ID.
 UnsignedShort getRadioID()
          Gets RadioCommunicationProtocolFamily entity ID.
 int length()
          Returns the length of the entity
 java.lang.String pduName()
          Returns the PDU name - RadioCommunicationsFamily
 void printValues(int indentLevel, java.io.PrintStream printStream)
          Print the values of the following object out, with correct level of indentation on the page for entityID and radioID.
 void serialize(java.io.DataOutputStream outputStream)
          Serialize and write out the output stream, order is important here since it needs to conform to the DIS standard
 void setEntityID(EntityID pEntityID)
          Sets RadioCommunicationProtocolFamily entity ID Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.
 void setRadioID(UnsignedShort pRadioID)
          Sets RadioID.
 
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

entityID

protected EntityID entityID

radioID

protected UnsignedShort radioID

sizeOf

public static final int sizeOf
Constant value--size of RadioCommunicationsFamily with header. Here: sizeOf = 288 ????????????????? bytes

See Also:
Constant Field Values
Constructor Detail

RadioCommunicationsFamily

public RadioCommunicationsFamily()
Default constructor - creates entityID, radioID - fills with zeros for all values of the following parameters: entityID, radioID.

Method Detail

clone

public java.lang.Object clone()
Make a copy of the object. This requires a deep copy, so we don't have two objects sharing pointers to the same data.

Overrides:
clone in class ProtocolDataUnit
Returns:
a new RadioCommunicationsFamily PDU entity

serialize

public void serialize(java.io.DataOutputStream outputStream)
Serialize and write out the output stream, order is important here since it needs to conform to the DIS standard

Specified by:
serialize in interface SerializationInterface
Overrides:
serialize in class ProtocolDataUnit
Throws:
java.lang.RuntimeException - when IO error occurs.

deSerialize

public void deSerialize(java.io.DataInputStream inputStream)
Deserialize the input stream, and order is important here, since we need to read in the same order as specified by the DIS standard

Specified by:
deSerialize in interface SerializationInterface
Overrides:
deSerialize in class ProtocolDataUnit
Throws:
java.lang.RuntimeException - when IO error occurs.

length

public int length()
Returns the length of the entity

Overrides:
length in class ProtocolDataUnit
Returns:
an integer length of the entity

pduName

public java.lang.String pduName()
Returns the PDU name - RadioCommunicationsFamily

Specified by:
pduName in class ProtocolDataUnit
Returns:
a string "RadioCommunicationsFamily"

printValues

public void printValues(int indentLevel,
                        java.io.PrintStream printStream)
Print the values of the following object out, with correct level of indentation on the page for entityID and radioID.

Overrides:
printValues in class ProtocolDataUnit

getEntityID

public EntityID getEntityID()
Gets RadioCommunicationProtocolFamily entity ID. Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.

Returns:
a clone of the firing entity ID

setEntityID

public void setEntityID(EntityID pEntityID)
Sets RadioCommunicationProtocolFamily entity ID Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.

Parameters:
pEntityID - the firing entity ID

getRadioID

public UnsignedShort getRadioID()
Gets RadioCommunicationProtocolFamily entity ID. Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.

Returns:
a clone of the radioID entity ID

setRadioID

public void setRadioID(UnsignedShort pRadioID)
Sets RadioID. Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.