mil.navy.nps.dis
Class TransmitterPdu

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

public class TransmitterPdu
extends RadioCommunicationsFamily

Transmitter PDU for DIS .

Version:
1.0
Author:
David W. Laflam (http://www.web3d.org/WorkingGroups/vrtp/dis-java-vrml/)
, Don Brutzman (http://web.nps.navy.mil/~brutzman)
Location:
Web: http://www.web3d.org/WorkingGroups/vrtp/mil/navy/nps/dis/FirePdu.java
or locally: ~/mil/navy/nps/dis/TransmitterPdu.java
Hierarchy Diagram:
Summary:
Detailed information about a radio transmitter shall be communicated by issuing a Transmitter PDU.
Explanation:
The TransmitterPdu denotes the reciving of a transmission from a radio. It inherits the header information from ProtocolDataUnit, an abstract class that contains assorted protocol information. It implements the IDs of what's transmitting a signal,

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:
15 May 2000 /Dave Laflam /New
17 August 2000 /Dave Laflam /Added toString method
17 September 2000 /Dave Laflam, Don Brutzman /Improved Javadoc, integration/testing with other Radio PDUs
References:
DIS Data Dictionary: CollisionTypeField PDU (local) and Transmitter PDU (SISO)
DIS-Java-VRML Working Group: http://www.web3d.org/WorkingGroups/vrtp/dis-java-vrml/
DIS specification : IEEE 1278.1-1995, Section 5.3.8.3
Note:
Accessor methods to nested records are provided.
See Also:
EntityCoordinate, EntityID, ModulationType, PduElement, ProtocolDataUnit, RadioCommunicationsFamily, RadioCommunicationsPduScriptNode, RadioEntityType, ReceiverPdu, SerializationInterface, SignalPdu, WorldCoordinate, AntennaPatternTypefield, BeamFunctionField, CryptoSystemfield, EmitterNameField, MajorModulationTypefield, ModulationParameterfield, SpreadSpectrumfield, TransmitStatefield

Field Summary
protected  WorldCoordinate antennaLocation
           
protected  UnsignedShort antennaPatternLength
           
protected  UnsignedShort antennaPatternType
           
protected  UnsignedShort cryptoKeyId
           
protected  UnsignedShort cryptoSytem
           
protected  EntityID entityID
           
protected  UnsignedLong frequency
           
protected  UnsignedByte inputSource
           
protected  UnsignedByte lengthOfModulationParameters
           
protected  ModulationType modulationType
           
protected  UnsignedShort padding1
           
protected  UnsignedShort padding2
           
protected  UnsignedByte padding3
           
protected  UnsignedInt power
           
protected  RadioEntityType radioEntityType
           
protected  UnsignedShort radioID
           
protected  EntityCoordinate relativeAntennaLocation
           
static int sizeOf
          Constant value--size of TransmitterPDU with header.
protected  UnsignedInt transmitFrequencyBandwidth
           
protected  UnsignedByte transmitState
           
 
Fields inherited from class mil.navy.nps.dis.ProtocolDataUnit
DEBUG, exerciseID, pduType, protocolFamily, protocolVersion, timeReceived, timestamp
 
Constructor Summary
TransmitterPdu()
           
 
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
 WorldCoordinate getAntennaLocation()
          Gets AntennaLocation.
 UnsignedShort getAntennaPatternLength()
          Gets AntennaPatternLength.
 UnsignedShort getAntennaPatternType()
          Gets AntennaPatternType.
 UnsignedShort getCryptoKeyId()
          Gets CryptoKeyId.
 UnsignedShort getCryptoSytem()
          Gets CryptoSytem.
 EntityID getEntityID()
          Gets entity ID.
 UnsignedLong getFrequency()
          Gets Frequency.
 UnsignedByte getInputSource()
          Gets InputSource.
 UnsignedByte getLengthOfModulationParameters()
          Gets LengthOfModulationParameters.
 ModulationType getModulationType()
          Gets ModulationType.
 UnsignedInt getPower()
          Gets Power.
 RadioEntityType getRadioEntityType()
          Gets RadioID.
 UnsignedShort getRadioID()
          Gets RadioID.
 EntityCoordinate getRelativeAntennaLocation()
          Gets RelativeAntennaLocation.
 UnsignedInt getTransmitFrequencyBandwidth()
          Gets TransmitFrequencyBandwidth.
 UnsignedByte getTransmitState()
          Gets TransmitState.
 int length()
          Returns the length of the entity
 java.lang.String pduName()
          Returns the PDU name - Transmitter PDU
 void printValues(int indentLevel, java.io.PrintStream printStream)
          Print the values of the following object out, with correct level of indentation on the page.
 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 setAntennaLocation(double pX, double pY, double pZ)
          Sets AntennaLocation
 void setAntennaLocation(WorldCoordinate pAntennaLocation)
          Sets AntennaLocation Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.
 void setAntennaPatternLength(UnsignedShort pAntennaPatternLength)
          Sets AntennaPatternLength Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.
 void setAntennaPatternType(UnsignedShort pAntennaPatternType)
          Sets AntennaPatternType Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.
 void setCryptoKeyId(UnsignedShort pCryptoKeyId)
          Sets CryptoKeyId Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.
 void setCryptoSytem(UnsignedShort pCryptoSytem)
          Sets CryptoSytem Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.
 void setEntityID(EntityID pEntityID)
          Sets 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 setEntityID(short pSiteID, short pApplicationID, short pEntityID)
          Sets setEntityID(short pSiteID, short pApplicationID, short pEntityID),accessor method.
 void setFrequency(UnsignedLong pFrequency)
          Sets Frequency Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.
 void setInputSource(UnsignedByte pInputSource)
          Sets InputSource Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.
 void setLengthOfModulationParameters(UnsignedByte pLengthOfModulationParameters)
          Sets LengthOfModulationParameters Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.
 void setModulationType(ModulationType pModulationType)
          Sets ModulationType Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.
 void setPower(UnsignedInt pPower)
          Sets Power Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.
 void setRadioEntityType(RadioEntityType pRadioEntityType)
          Sets RadioEntityType 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.
 void setRelativeAntennaLocation(EntityCoordinate pRelativeAntennaLocation)
          Sets RelativeAntennaLocation Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.
 void setTransmitFrequencyBandwidth(UnsignedInt pTransmitFrequencyBandwidth)
          Sets TransmitFrequencyBandwidth Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.
 void setTransmitState(UnsignedByte pTransmitState)
          Sets TransmitState Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.
 java.lang.String toString()
          String toString Used for debuging System.out.println("Transmitter Object.
 
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, 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

radioEntityType

protected RadioEntityType radioEntityType

transmitState

protected UnsignedByte transmitState

inputSource

protected UnsignedByte inputSource

padding1

protected UnsignedShort padding1

antennaLocation

protected WorldCoordinate antennaLocation

relativeAntennaLocation

protected EntityCoordinate relativeAntennaLocation

antennaPatternType

protected UnsignedShort antennaPatternType

antennaPatternLength

protected UnsignedShort antennaPatternLength

frequency

protected UnsignedLong frequency

transmitFrequencyBandwidth

protected UnsignedInt transmitFrequencyBandwidth

power

protected UnsignedInt power

modulationType

protected ModulationType modulationType

cryptoSytem

protected UnsignedShort cryptoSytem

cryptoKeyId

protected UnsignedShort cryptoKeyId

lengthOfModulationParameters

protected UnsignedByte lengthOfModulationParameters

padding2

protected UnsignedShort padding2

padding3

protected UnsignedByte padding3

sizeOf

public static final int sizeOf
Constant value--size of TransmitterPDU with header. Here: sizeOf = 832 bytes

See Also:
Constant Field Values
Constructor Detail

TransmitterPdu

public TransmitterPdu()
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 RadioCommunicationsFamily
Returns:
a new Fire 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 RadioCommunicationsFamily
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 RadioCommunicationsFamily
Throws:
java.lang.RuntimeException - when IO error occurs.

length

public int length()
Returns the length of the entity

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

pduName

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

Overrides:
pduName in class RadioCommunicationsFamily
Returns:
a string "Transmitter PDU"

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. firingEntityID, targetEntityID, munitionID, fireMissionIndex, locationInWorldCoordinate, burstDescriptor, velocity, and range.

Overrides:
printValues in class RadioCommunicationsFamily

getEntityID

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

Overrides:
getEntityID in class RadioCommunicationsFamily
Returns:
a clone of the firing entity ID

setEntityID

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

Overrides:
setEntityID in class RadioCommunicationsFamily
Parameters:
pEntityID - the firing entity ID

setEntityID

public void setEntityID(short pSiteID,
                        short pApplicationID,
                        short pEntityID)
Sets setEntityID(short pSiteID, short pApplicationID, short pEntityID),accessor method. will create an new EntityID = entityID This field shall identify the entity issuing the PDU, and shall be represented by the PDU Header Record (see 5.2.24)


getRadioID

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

Overrides:
getRadioID in class RadioCommunicationsFamily
Returns:
a clone of the radioID

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.

Overrides:
setRadioID in class RadioCommunicationsFamily
Parameters:
pRadioID - of radioID

getRadioEntityType

public RadioEntityType getRadioEntityType()
Gets RadioID. 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

setRadioEntityType

public void setRadioEntityType(RadioEntityType pRadioEntityType)
Sets RadioEntityType Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.

Parameters:
pRadioEntityType - of RadioEntityType.

getTransmitState

public UnsignedByte getTransmitState()
Gets TransmitState. 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 transmitState

setTransmitState

public void setTransmitState(UnsignedByte pTransmitState)
Sets TransmitState Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.

Parameters:
pTransmitState - of TransmitState.

getInputSource

public UnsignedByte getInputSource()
Gets InputSource. 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 inputSource

setInputSource

public void setInputSource(UnsignedByte pInputSource)
Sets InputSource Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.

Parameters:
pInputSource - of InputSource.

getAntennaLocation

public WorldCoordinate getAntennaLocation()
Gets AntennaLocation. 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 antennaLocation

setAntennaLocation

public void setAntennaLocation(WorldCoordinate pAntennaLocation)
Sets AntennaLocation Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.

Parameters:
pAntennaLocation - of AntennaLocation.

setAntennaLocation

public void setAntennaLocation(double pX,
                               double pY,
                               double pZ)
Sets AntennaLocation


getRelativeAntennaLocation

public EntityCoordinate getRelativeAntennaLocation()
Gets RelativeAntennaLocation. 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 relativeAntennaLocation

setRelativeAntennaLocation

public void setRelativeAntennaLocation(EntityCoordinate pRelativeAntennaLocation)
Sets RelativeAntennaLocation Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.

Parameters:
pRelativeAntennaLocation - of RelativeAntennaLocation.

getAntennaPatternType

public UnsignedShort getAntennaPatternType()
Gets AntennaPatternType. 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 antennaPatternType.

setAntennaPatternType

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

Parameters:
pAntennaPatternType - of AntennaPatternType.

getAntennaPatternLength

public UnsignedShort getAntennaPatternLength()
Gets AntennaPatternLength. 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 antennaPatternLength

setAntennaPatternLength

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

Parameters:
pAntennaPatternLength - of AntennaPatternLength.

getFrequency

public UnsignedLong getFrequency()
Gets Frequency. 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 frequency

setFrequency

public void setFrequency(UnsignedLong pFrequency)
Sets Frequency Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.

Parameters:
pFrequency - of Frequency.

getTransmitFrequencyBandwidth

public UnsignedInt getTransmitFrequencyBandwidth()
Gets TransmitFrequencyBandwidth. 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 transmitFrequencyBandwidth

setTransmitFrequencyBandwidth

public void setTransmitFrequencyBandwidth(UnsignedInt pTransmitFrequencyBandwidth)
Sets TransmitFrequencyBandwidth Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.

Parameters:
pTransmitFrequencyBandwidth - of TransmitFrequencyBandwidth.

getPower

public UnsignedInt getPower()
Gets Power. 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 power

setPower

public void setPower(UnsignedInt pPower)
Sets Power Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.

Parameters:
pPower - of Power.

getModulationType

public ModulationType getModulationType()
Gets ModulationType. 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 modulationType

setModulationType

public void setModulationType(ModulationType pModulationType)
Sets ModulationType Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.

Parameters:
pModulationType - of ModulationType.

getCryptoSytem

public UnsignedShort getCryptoSytem()
Gets CryptoSytem. 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 cryptoSytem

setCryptoSytem

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

Parameters:
pCryptoSytem - of CryptoSytem.

getCryptoKeyId

public UnsignedShort getCryptoKeyId()
Gets CryptoKeyId. 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 cryptoKeyId

setCryptoKeyId

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

Parameters:
pCryptoKeyId - of CryptoKeyId.

getLengthOfModulationParameters

public UnsignedByte getLengthOfModulationParameters()
Gets LengthOfModulationParameters. 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 lengthOfModulationParameters

setLengthOfModulationParameters

public void setLengthOfModulationParameters(UnsignedByte pLengthOfModulationParameters)
Sets LengthOfModulationParameters Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.

Parameters:
pLengthOfModulationParameters - of LengthOfModulationParameters.

toString

public java.lang.String toString()
String toString Used for debuging System.out.println("Transmitter Object. = " + transmitter); This print out all values for the fields for the NEW Transmitter object

Overrides:
toString in class ProtocolDataUnit