mil.navy.nps.dis
Class SignalPdu

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.SignalPdu
All Implemented Interfaces:
java.lang.Cloneable, SerializationInterface

public class SignalPdu
extends RadioCommunicationsFamily

Signal PDU for DIS.

Version:
1.0
Author:
David W. Laflam (http://wwww.laflam.net/dave)
, Don Brutzman (http://web.nps.navy.mil/~brutzman)
Location:
Web: http://www.web3d.org/WorkingGroups/vrtp/mil/navy/nps/dis/SignalPdu.java
or locally: ~/mil/navy/nps/dis/SignalPdu.java
Hierarchy Diagram:
Summary:
The actual transmission of voice, audio or other data shall be communicated by issuing a Signal PDU.
Explanation:
The Signal pdu 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 signalPDU.

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
17DAug00 /Dave Laflam /Added toString method
1Sep00 /Don Brutzman /Added extra data elements
References:
DIS Data Dictionary: Signal PDU (local) and Signal 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.2
See Also:
ProtocolDataUnit, PduElement, SerializationInterface, RadioCommunicationsFamily, ReceiverPdu, TransmitterPdu, RadioCommunicationsPduScriptNode, TDLTypefield

Field Summary
protected  UnsignedByte data00
          data00: This field shall specify the audio or digital data conveyed by the radio transmission.
protected  UnsignedByte data01
          data01: This field shall specify the audio or digital data conveyed by the radio transmission.
protected  UnsignedByte data02
          data02: This field shall specify the audio or digital data conveyed by the radio transmission.
protected  UnsignedByte data03
          data03: This field shall specify the audio or digital data conveyed by the radio transmission.
protected  UnsignedByte data04
          data04: This field shall specify the audio or digital data conveyed by the radio transmission.
protected  UnsignedByte data05
          data05: This field shall specify the audio or digital data conveyed by the radio transmission.
protected  UnsignedByte data06
          data06: This field shall specify the audio or digital data conveyed by the radio transmission.
protected  UnsignedByte data07
          data07: This field shall specify the audio or digital data conveyed by the radio transmission.
protected  UnsignedByte data08
          data08: This field shall specify the audio or digital data conveyed by the radio transmission.
protected  UnsignedByte data09
          data09: This field shall specify the audio or digital data conveyed by the radio transmission.
protected  UnsignedByte data10
          data10: This field shall specify the audio or digital data conveyed by the radio transmission.
protected  UnsignedShort dataLength
          dataLength: This field shall specify the number of bits of digital voice audio or digital data being sent in this Signal PDU, and shall be represented by a 16-bit unsigned integer.
protected  UnsignedShort encodingScheme
          encodingScheme: This field shall specify the encoding used in the Data Şeld of this PDU.
protected  EntityID entityID
          entity ID: This field shall identify the entity that is the source of the radio transmission.
protected  UnsignedShort radioID
          radioID.
protected  UnsignedInt sampleRate
          sampleRate: This field shall specify either the sample rate in samples per second if the encoding class is encoded audio or, the data rate in bits per second for data transmissions.
protected  UnsignedShort samples
          samples: This field shall specify the number of samples in this PDU, and shall be represented by a 16-bit unsigned integer.
static int sizeOf
          Constant value--size of Fire PDU with header.
protected  UnsignedShort tdlType
          tdlType: This field shall specify the TDL Type as a 16-bit enumeration Şeld when the encoding class is the raw binary, audio, application-speciŞc, or database index representation of a TDL message.
 
Fields inherited from class mil.navy.nps.dis.ProtocolDataUnit
DEBUG, exerciseID, pduType, protocolFamily, protocolVersion, timeReceived, timestamp
 
Constructor Summary
SignalPdu()
          Default constructor - creates entityID, radioID, encodingScheme, tdlType, sampleRate, dataLength, samples, data00 - fills with zeros for all values of the following parameters:
 
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
 UnsignedByte getData00()
          accessor method
 UnsignedByte getData01()
          accessor method
 UnsignedByte getData02()
          accessor method
 UnsignedByte getData03()
          accessor method
 UnsignedByte getData04()
          accessor method
 UnsignedByte getData05()
          accessor method
 UnsignedByte getData06()
          accessor method
 UnsignedByte getData07()
          accessor method
 UnsignedByte getData08()
          accessor method
 UnsignedByte getData09()
          accessor method
 UnsignedByte getData10()
          accessor method
 UnsignedShort getDataLength()
          Gets the DataLength.
 UnsignedShort getEncodingScheme()
          Gets the EncodingScheme.
 EntityID getEntityID()
          Gets entity ID.
 UnsignedShort getRadioID()
          Gets getRadio ID.
 UnsignedInt getSampleRate()
          Gets the SampleRate.
 UnsignedShort getSamples()
          Gets the Samples.
 UnsignedShort getTdlType()
          Gets the TdlType.
 int length()
          Returns the length of the entity
 java.lang.String pduName()
          Returns the PDU name - Signal 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 setData00(UnsignedByte pdata00)
          accessor method
 void setData01(UnsignedByte pdata01)
          accessor method
 void setData02(UnsignedByte pdata02)
          accessor method
 void setData03(UnsignedByte pdata03)
          accessor method
 void setData04(UnsignedByte pdata04)
          accessor method
 void setData05(UnsignedByte pdata05)
          accessor method
 void setData06(UnsignedByte pdata06)
          accessor method
 void setData07(UnsignedByte pdata07)
          accessor method
 void setData08(UnsignedByte pdata08)
          accessor method
 void setData09(UnsignedByte pdata09)
          accessor method
 void setData10(UnsignedByte pdata10)
          accessor method
 void setDataLength(UnsignedShort pDataLength)
          Sets DataLength Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.
 void setEncodingScheme(UnsignedShort pEncodingScheme)
          Sets the EncodingScheme
 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 setRadioID(UnsignedShort pRadioID)
          Sets setRadio ID.
 void setSampleRate(UnsignedInt pSampleRate)
          Sets SampleRate Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.
 void setSamples(UnsignedShort pSamples)
          Sets Samples Each Entity in a given exercise executing on a DIS application shall be assigned an Entity Identifier Record Unique to the exercise.
 void setTdlType(UnsignedShort pTdlType)
          Sets TdlType.
 java.lang.String toString()
          String toString Used for debuging System.out.println("Signal 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
entity ID: This field shall identify the entity that is the source of the radio transmission. The source entity may either represent the radio itself or represent an entity (such as a vehicle) that contains the radio. This field shall be represented by an Entity Identifier record (see 5.2.14).
Value:
If the intended Entity ID is unknown, this field shall contain Entity ID_UNKNOWN.
Reference:
DIS Data Dictionary: Event Identifier Record (local) and Event Identifier Record


radioID

protected UnsignedShort radioID
radioID. This field shall identify a particular radio within a given entity. This field shall be represented by a 16-bit unsigned integer. The Entity ID, Radio ID pair associates each Signal PDU with the preceding Transmitter PDU that contains the same Entity ID, Radio ID pair. The combination of Entity ID and Radio ID uniquely identiŞes a particular radio within a simulation exercise. Pg 115 (5.3.8.2)
Reference:
DIS Data Dictionary: Event Identifier Record (local) and Event Identifier Record


encodingScheme

protected UnsignedShort encodingScheme
encodingScheme: This field shall specify the encoding used in the Data Şeld of this PDU. The encoding scheme shall be composed of a 2-bit Şeld specifying the encoding class and a 14-bit field specifying either the encoding type, or the number of TDL messages contained in this Signal PDU(see table 57 pg 115).
Reference:
DIS Data Dictionary: Event Identifier Record (local) and Event Identifier Record


tdlType

protected UnsignedShort tdlType
tdlType: This field shall specify the TDL Type as a 16-bit enumeration Şeld when the encoding class is the raw binary, audio, application-speciŞc, or database index representation of a TDL message. When the Data Şeld is not representing a TDL Message, this Şeld shall be set to zero (see Section 9 of EBV-DOC for enumeration of the TDL Type field).
Reference:
DIS Data Dictionary: Event Identifier Record (local) and Event Identifier Record


sampleRate

protected UnsignedInt sampleRate
sampleRate: This field shall specify either the sample rate in samples per second if the encoding class is encoded audio or, the data rate in bits per second for data transmissions. If the encoding class is database index, this Şeld shall be zero. This Şeld shall be represented by a 32-bit unsigned integer.
Reference:
DIS Data Dictionary: Event Identifier Record (local) and Event Identifier Record


dataLength

protected UnsignedShort dataLength
dataLength: This field shall specify the number of bits of digital voice audio or digital data being sent in this Signal PDU, and shall be represented by a 16-bit unsigned integer. If the encoding class is database index, the Data Length field shall contain the value 96. Currently hardwired to support 11 data elements.
Reference:
DIS Data Dictionary: Event Identifier Record (local) and Event Identifier Record


samples

protected UnsignedShort samples
samples: This field shall specify the number of samples in this PDU, and shall be represented by a 16-bit unsigned integer. If the encoding class is not encoded audio, this Şeld shall be zero.
Reference:
DIS Data Dictionary: Event Identifier Record (local) and Event Identifier Record


data00

protected UnsignedByte data00
data00: This field shall specify the audio or digital data conveyed by the radio transmission. The interpretation of each Data field depends on the value of the encoding scheme [see 5.3.8.2 item d)] and TDL Type [see 5.3.8.2 item e)] fields (page 116).
Reference:
DIS Data Dictionary: Event Identifier Record (local) and Event Identifier Record


data01

protected UnsignedByte data01
data01: This field shall specify the audio or digital data conveyed by the radio transmission. The interpretation of each Data field depends on the value of the encoding scheme [see 5.3.8.2 item d)] and TDL Type [see 5.3.8.2 item e)] fields (page 116).
Reference:
DIS Data Dictionary: Event Identifier Record (local) and Event Identifier Record


data02

protected UnsignedByte data02
data02: This field shall specify the audio or digital data conveyed by the radio transmission. The interpretation of each Data field depends on the value of the encoding scheme [see 5.3.8.2 item d)] and TDL Type [see 5.3.8.2 item e)] fields (page 116).
Reference:
DIS Data Dictionary: Event Identifier Record (local) and Event Identifier Record


data03

protected UnsignedByte data03
data03: This field shall specify the audio or digital data conveyed by the radio transmission. The interpretation of each Data field depends on the value of the encoding scheme [see 5.3.8.2 item d)] and TDL Type [see 5.3.8.2 item e)] fields (page 116).
Reference:
DIS Data Dictionary: Event Identifier Record (local) and Event Identifier Record


data04

protected UnsignedByte data04
data04: This field shall specify the audio or digital data conveyed by the radio transmission. The interpretation of each Data field depends on the value of the encoding scheme [see 5.3.8.2 item d)] and TDL Type [see 5.3.8.2 item e)] fields (page 116).
Reference:
DIS Data Dictionary: Event Identifier Record (local) and Event Identifier Record


data05

protected UnsignedByte data05
data05: This field shall specify the audio or digital data conveyed by the radio transmission. The interpretation of each Data field depends on the value of the encoding scheme [see 5.3.8.2 item d)] and TDL Type [see 5.3.8.2 item e)] fields (page 116).
Reference:
DIS Data Dictionary: Event Identifier Record (local) and Event Identifier Record


data06

protected UnsignedByte data06
data06: This field shall specify the audio or digital data conveyed by the radio transmission. The interpretation of each Data field depends on the value of the encoding scheme [see 5.3.8.2 item d)] and TDL Type [see 5.3.8.2 item e)] fields (page 116).
Reference:
DIS Data Dictionary: Event Identifier Record (local) and Event Identifier Record


data07

protected UnsignedByte data07
data07: This field shall specify the audio or digital data conveyed by the radio transmission. The interpretation of each Data field depends on the value of the encoding scheme [see 5.3.8.2 item d)] and TDL Type [see 5.3.8.2 item e)] fields (page 116).
Reference:
DIS Data Dictionary: Event Identifier Record (local) and Event Identifier Record


data08

protected UnsignedByte data08
data08: This field shall specify the audio or digital data conveyed by the radio transmission. The interpretation of each Data field depends on the value of the encoding scheme [see 5.3.8.2 item d)] and TDL Type [see 5.3.8.2 item e)] fields (page 116).
Reference:
DIS Data Dictionary: Event Identifier Record (local) and Event Identifier Record


data09

protected UnsignedByte data09
data09: This field shall specify the audio or digital data conveyed by the radio transmission. The interpretation of each Data field depends on the value of the encoding scheme [see 5.3.8.2 item d)] and TDL Type [see 5.3.8.2 item e)] fields (page 116).
Reference:
DIS Data Dictionary: Event Identifier Record (local) and Event Identifier Record


data10

protected UnsignedByte data10
data10: This field shall specify the audio or digital data conveyed by the radio transmission. The interpretation of each Data field depends on the value of the encoding scheme [see 5.3.8.2 item d)] and TDL Type [see 5.3.8.2 item e)] fields (page 116).
Reference:
DIS Data Dictionary: Event Identifier Record (local) and Event Identifier Record


sizeOf

public static final int sizeOf
Constant value--size of Fire PDU with header. Here: sizeOf = 256 bytes Total Signal Size = 256 + Data Length + 0 to 31, padding bits to increase the total Signal Size to a multiple of 32 Bits. Current Size 264 bits

See Also:
Constant Field Values
Constructor Detail

SignalPdu

public SignalPdu()
Default constructor - creates entityID, radioID, encodingScheme, tdlType, sampleRate, dataLength, samples, data00 - fills with zeros for all values of the following parameters:

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 Signal 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 - Signal PDU

Overrides:
pduName in class RadioCommunicationsFamily
Returns:
a string "Signal 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. EntityID, RadioID, Encoding Scheme, TDL Type, Sample Rate, Data Length, Samples, data00

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 getRadio ID. 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 target entity ID

setRadioID

public void setRadioID(UnsignedShort pRadioID)
Sets setRadio ID. 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 - target entity ID value

getEncodingScheme

public UnsignedShort getEncodingScheme()
Gets the EncodingScheme. 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 a EncodingScheme

setEncodingScheme

public void setEncodingScheme(UnsignedShort pEncodingScheme)
Sets the EncodingScheme

Parameters:
pEncodingScheme - a EncodingScheme

setTdlType

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

Parameters:
pTdlType - target entity ID value

getTdlType

public UnsignedShort getTdlType()
Gets the TdlType. 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 a TdlType

setSampleRate

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

Parameters:
pSampleRate - target entity ID value

getSampleRate

public UnsignedInt getSampleRate()
Gets the SampleRate. 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 a SampleRate

setDataLength

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

Parameters:
pDataLength - target entity ID value

getDataLength

public UnsignedShort getDataLength()
Gets the DataLength. 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 a DataLength

setSamples

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

Parameters:
pSamples - target entity ID value

getSamples

public UnsignedShort getSamples()
Gets the Samples. 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 a Samples

setData00

public void setData00(UnsignedByte pdata00)
accessor method


setData01

public void setData01(UnsignedByte pdata01)
accessor method


setData02

public void setData02(UnsignedByte pdata02)
accessor method


setData03

public void setData03(UnsignedByte pdata03)
accessor method


setData04

public void setData04(UnsignedByte pdata04)
accessor method


setData05

public void setData05(UnsignedByte pdata05)
accessor method


setData06

public void setData06(UnsignedByte pdata06)
accessor method


setData07

public void setData07(UnsignedByte pdata07)
accessor method


setData08

public void setData08(UnsignedByte pdata08)
accessor method


setData09

public void setData09(UnsignedByte pdata09)
accessor method


setData10

public void setData10(UnsignedByte pdata10)
accessor method


getData00

public UnsignedByte getData00()
accessor method

Returns:
a clone of a data00

getData01

public UnsignedByte getData01()
accessor method

Returns:
a clone of a data01

getData02

public UnsignedByte getData02()
accessor method

Returns:
a clone of a data02

getData03

public UnsignedByte getData03()
accessor method

Returns:
a clone of a data03

getData04

public UnsignedByte getData04()
accessor method

Returns:
a clone of a data04

getData05

public UnsignedByte getData05()
accessor method

Returns:
a clone of a data05

getData06

public UnsignedByte getData06()
accessor method

Returns:
a clone of a data06

getData07

public UnsignedByte getData07()
accessor method

Returns:
a clone of a data07

getData08

public UnsignedByte getData08()
accessor method

Returns:
a clone of a data08

getData09

public UnsignedByte getData09()
accessor method

Returns:
a clone of a data09

getData10

public UnsignedByte getData10()
accessor method

Returns:
a clone of a data10

toString

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

Overrides:
toString in class ProtocolDataUnit