Package edu.nps.moves.dis7.pdus
Class IntercomSignalPdu
java.lang.Object
edu.nps.moves.dis7.pdus.Pdu
edu.nps.moves.dis7.pdus.PduBase
edu.nps.moves.dis7.pdus.RadioCommunicationsFamilyPdu
edu.nps.moves.dis7.pdus.IntercomSignalPdu
- All Implemented Interfaces:
Marshaller
,Serializable
5.8.6 Conveys the audio or digital data that is used to communicate between simulated intercom devices
IEEE Std 1278.1-2012, IEEE Standard for Distributed Interactive Simulation - Application Protocols
- See Also:
- Serialized Form
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected byte[]
data bytesprotected short
data lengthprotected short
encoding schemeprotected short
ID of communications deviceprotected IntercomReferenceID
intercomReferenceID is an undescribed parameter...protected int
sample rateprotected short
samplesprotected SignalTDLType
tactical data link type uid 178Fields inherited from class edu.nps.moves.dis7.pdus.Pdu
exerciseID, length, pduType, protocolFamily, protocolVersion, timestamp
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
equalsImpl(Object obj)
Compare all fields that contribute to the state, ignoring transient and static fields, forthis
and the supplied objectbyte[]
getData()
Getter fordata
short
Getter forencodingScheme
short
Getter forintercomNumber
Getter forintercomReferenceID
int
Returns size of this serialized (marshalled) object in bytesint
Getter forsampleRate
short
Getter forsamples
Getter fortdlType
void
marshal(DataOutputStream dos)
Serializes an object to a DataOutputStream.void
marshal(ByteBuffer byteBuffer)
Packs an object into the ByteBuffer.setData(byte[] pData)
Setter fordata
setEncodingScheme(int pEncodingScheme)
Utility setter forencodingScheme
setEncodingScheme(short pEncodingScheme)
Setter forencodingScheme
setIntercomNumber(int pIntercomNumber)
Utility setter forintercomNumber
setIntercomNumber(short pIntercomNumber)
Setter forintercomNumber
setIntercomReferenceID(IntercomReferenceID pIntercomReferenceID)
Setter forintercomReferenceID
setSampleRate(int pSampleRate)
Setter forsampleRate
setSamples(int pSamples)
Utility setter forsamples
setSamples(short pSamples)
Setter forsamples
setTdlType(SignalTDLType pTdlType)
Setter fortdlType
toString()
int
unmarshal(DataInputStream dis)
Deserializes an object from a DataInputStream.int
unmarshal(ByteBuffer byteBuffer)
Unpacks a Pdu from the underlying data.Methods inherited from class edu.nps.moves.dis7.pdus.PduBase
getPadding, getPduStatus, setPadding, setPadding, setPduStatus
Methods inherited from class edu.nps.moves.dis7.pdus.Pdu
getExerciseID, getLength, getPduType, getProtocolFamily, getProtocolVersion, getTimestamp, marshal, setExerciseID, setExerciseID, setLength, setLength, setPduType, setProtocolFamily, setProtocolVersion, setTimestamp
-
Field Details
-
intercomReferenceID
intercomReferenceID is an undescribed parameter... -
intercomNumber
protected short intercomNumberID of communications device -
encodingScheme
protected short encodingSchemeencoding scheme -
tdlType
tactical data link type uid 178 -
sampleRate
protected int sampleRatesample rate -
dataLength
protected short dataLengthdata length -
samples
protected short samplessamples -
data
protected byte[] datadata bytes
-
-
Constructor Details
-
IntercomSignalPdu
public IntercomSignalPdu()Constructor
-
-
Method Details
-
getMarshalledSize
public int getMarshalledSize()Returns size of this serialized (marshalled) object in bytes- Specified by:
getMarshalledSize
in interfaceMarshaller
- Overrides:
getMarshalledSize
in classRadioCommunicationsFamilyPdu
- Returns:
- serialized size in bytes
- See Also:
- https://en.wikipedia.org/wiki/Marshalling_(computer_science)
-
setIntercomReferenceID
Setter forintercomReferenceID
- Parameters:
pIntercomReferenceID
- new value of interest- Returns:
- same object to permit progressive setters
-
getIntercomReferenceID
Getter forintercomReferenceID
- Returns:
- value of interest
-
setIntercomNumber
Setter forintercomNumber
- Parameters:
pIntercomNumber
- new value of interest- Returns:
- same object to permit progressive setters
-
setIntercomNumber
Utility setter forintercomNumber
- Parameters:
pIntercomNumber
- new value of interest- Returns:
- same object to permit progressive setters
-
getIntercomNumber
public short getIntercomNumber()Getter forintercomNumber
- Returns:
- value of interest
-
setEncodingScheme
Setter forencodingScheme
- Parameters:
pEncodingScheme
- new value of interest- Returns:
- same object to permit progressive setters
-
setEncodingScheme
Utility setter forencodingScheme
- Parameters:
pEncodingScheme
- new value of interest- Returns:
- same object to permit progressive setters
-
getEncodingScheme
public short getEncodingScheme()Getter forencodingScheme
- Returns:
- value of interest
-
setTdlType
Setter fortdlType
- Parameters:
pTdlType
- new value of interest- Returns:
- same object to permit progressive setters
-
getTdlType
Getter fortdlType
- Returns:
- value of interest
-
setSampleRate
Setter forsampleRate
- Parameters:
pSampleRate
- new value of interest- Returns:
- same object to permit progressive setters
-
getSampleRate
public int getSampleRate()Getter forsampleRate
- Returns:
- value of interest
-
setSamples
Setter forsamples
- Parameters:
pSamples
- new value of interest- Returns:
- same object to permit progressive setters
-
setSamples
Utility setter forsamples
- Parameters:
pSamples
- new value of interest- Returns:
- same object to permit progressive setters
-
getSamples
public short getSamples()Getter forsamples
- Returns:
- value of interest
-
setData
Setter fordata
- Parameters:
pData
- new value of interest- Returns:
- same object to permit progressive setters
-
getData
public byte[] getData()Getter fordata
- Returns:
- value of interest
-
marshal
Serializes an object to a DataOutputStream.- Specified by:
marshal
in interfaceMarshaller
- Overrides:
marshal
in classRadioCommunicationsFamilyPdu
- Parameters:
dos
- the OutputStream- Throws:
Exception
- if something goes wrong- See Also:
DataOutputStream
-
unmarshal
Deserializes an object from a DataInputStream.- Specified by:
unmarshal
in interfaceMarshaller
- Overrides:
unmarshal
in classRadioCommunicationsFamilyPdu
- Parameters:
dis
- the InputStream- Returns:
- marshalled serialized size in bytes
- Throws:
Exception
- if something goes wrong- See Also:
DataInputStream
, https://en.wikipedia.org/wiki/Marshalling_(computer_science)
-
marshal
Packs an object into the ByteBuffer.- Specified by:
marshal
in interfaceMarshaller
- Overrides:
marshal
in classRadioCommunicationsFamilyPdu
- Parameters:
byteBuffer
- The ByteBuffer at the position to begin writing- Throws:
BufferOverflowException
- if byteBuffer is too smallReadOnlyBufferException
- if byteBuffer is read onlyException
- ByteBuffer-generated exception- See Also:
ByteBuffer
-
unmarshal
Unpacks a Pdu from the underlying data.- Specified by:
unmarshal
in interfaceMarshaller
- Overrides:
unmarshal
in classRadioCommunicationsFamilyPdu
- Parameters:
byteBuffer
- The ByteBuffer at the position to begin reading- Returns:
- marshalled serialized size in bytes
- Throws:
BufferUnderflowException
- if byteBuffer is too smallException
- ByteBuffer-generated exception- See Also:
ByteBuffer
, https://en.wikipedia.org/wiki/Marshalling_(computer_science)
-
equals
- Overrides:
equals
in classRadioCommunicationsFamilyPdu
-
equalsImpl
Description copied from class:Pdu
Compare all fields that contribute to the state, ignoring transient and static fields, forthis
and the supplied object- Overrides:
equalsImpl
in classRadioCommunicationsFamilyPdu
- Parameters:
obj
- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
- Overrides:
toString
in classRadioCommunicationsFamilyPdu
-