Class SignalPduSpecialCase
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.SignalPduSpecialCase
- All Implemented Interfaces:
Marshaller
,Serializable
5.8.4, 7.7.3 Conveys the audio or digital data carried by the simulated radio or intercom transmission.
IEEE Std 1278.1-2012, IEEE Standard for Distributed Interactive Simulation—Application Protocols
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected byte[]
list of eight bit valuesprotected Short
length of data in bitsprotected short
encoding scheme used, and enumerationprotected RadioCommsHeader
Radio communications headerprotected int
sample rateprotected short
number of samplesprotected SignalTDLType
tdl type uid 178Fields inherited from class edu.nps.moves.dis7.pdus.RadioCommunicationsFamilyPdu
FAMILY_NAME
Fields inherited from class edu.nps.moves.dis7.pdus.Pdu
exerciseID, length, NAME, 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 fordataLength
short
Getter forencodingScheme
Getter forheader
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
setDataLength
(short pDataLength) Setter fordataLength
setEncodingScheme
(short pEncodingScheme) Setter forencodingScheme
setHeader
(RadioCommsHeader pHeader) Setter forheader
setSampleRate
(int pSampleRate) Setter forsampleRate
setSamples
(short pSamples) Setter forsamples
setTdlType
(SignalTDLType pTdlType) Setter fortdlType
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.RadioCommunicationsFamilyPdu
toString
Methods inherited from class edu.nps.moves.dis7.pdus.PduBase
getPadding, getPduStatus, hashCode, setPadding, setPadding, setPduStatus
Methods inherited from class edu.nps.moves.dis7.pdus.Pdu
copyByPduFactory, getExerciseID, getLength, getPduType, getProtocolFamily, getProtocolVersion, getTimestamp, getTimestampSeconds, isAcknowledgeRPdu, isActionRequestPdu, isActionRequestRPdu, isActionResponsePdu, isActionResponseRPdu, isAggregateStatePdu, isAppearancePdu, isArealObjectStatePdu, isArticulatedPartsPdu, isAttributePdu, isCollisionElasticPdu, isCollisionPdu, isCommentPdu, isCommentRPdu, isCreateEntityPdu, isCreateEntityRPdu, isDataPdu, isDataQueryPdu, isDataQueryRPdu, isDataRPdu, isDesignatorPdu, isDetonationPdu, isDirectedEnergyFirePdu, isDistributedEmissionsRegenerationFamilyPdu, isElectromagneticEmissionPdu, isEntityDamageStatusPdu, isEntityInformationInteractionFamilyPdu, isEntityManagementFamilyPdu, isEntityStatePdu, isEntityStateUpdatePdu, isEnvironmentalProcessPdu, isEventReportPdu, isEventReportRPdu, isFirePdu, isGriddedDataPdu, isIFFPdu, isInformationOperationsActionPdu, isInformationOperationsFamilyPdu, isInformationOperationsReportPdu, isIntercomControlPdu, isIntercomSignalPdu, isIsGroupOfPdu, isIsPartOfPdu, isLEDetonationPdu, isLEFirePdu, isLinearObjectStatePdu, isLiveEntityDetonationPdu, isLiveEntityFirePdu, isLogisticsFamilyPdu, isMinefieldDataPdu, isMinefieldFamilyPdu, isMinefieldQueryPdu, isMinefieldResponseNACKPdu, isMinefieldStatePdu, isPointObjectStatePdu, isRadioCommunicationsFamilyPdu, isReceiverPdu, isRecordQueryRPdu, isRecordRPdu, isReliablePdu, isRemoveEntityPdu, isRemoveEntityRPdu, isRepairCompletePdu, isRepairResponsePdu, isResupplyCancelPdu, isResupplyOfferPdu, isResupplyReceivedPdu, isSEESPdu, isSetDataPdu, isSetDataRPdu, isSetRecordRPdu, isSignalPdu, isSimulationManagementFamilyPdu, isSimulationManagementWithReliabilityFamilyPdu, isStartResumePdu, isStartResumeRPdu, isStopFreezePdu, isStopFreezeRPdu, isSupplementalEmissionEntityStatePdu, isSyntheticEnvironmentFamilyPdu, isTransferOwnershipPdu, isTransmitterPdu, isTSPIPdu, isUnderwaterAcousticPdu, isWarfareFamilyPdu, marshal, occursAfter, occursBefore, occursSameTime, setExerciseID, setExerciseID, setLength, setLength, setPduType, setProtocolFamily, setProtocolVersion, setTimestamp, setTimestampSeconds
-
Field Details
-
header
Radio communications header -
encodingScheme
protected short encodingSchemeencoding scheme used, and enumeration -
tdlType
tdl type uid 178 -
sampleRate
protected int sampleRatesample rate -
dataLength
length of data in bits -
samples
protected short samplesnumber of samples -
data
protected byte[] datalist of eight bit values
-
-
Constructor Details
-
SignalPduSpecialCase
public SignalPduSpecialCase()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:
-
setHeader
Setter forheader
- Parameters:
pHeader
- value of interest- Returns:
- same object to permit progressive setters
-
getHeader
-
setEncodingScheme
Setter forencodingScheme
- Parameters:
pEncodingScheme
- value of interest- Returns:
- same object to permit progressive setters
-
getEncodingScheme
-
setTdlType
Setter fortdlType
- Parameters:
pTdlType
- of interest- Returns:
- same object to permit progressive setters
-
getTdlType
-
setSampleRate
Setter forsampleRate
- Parameters:
pSampleRate
- of interest- Returns:
- same object to permit progressive setters
-
getSampleRate
-
setDataLength
Setter fordataLength
This value is the size IN BITS of the
dataLength
field. Since that field is a byte array, its size must be large enough to contain the specified number of bits. If this size is NOT set and this pdu is issued (marshaled), the value used for this field will be the size of the byte array times 8.- Parameters:
pDataLength
- value for field- Returns:
- same object to permit progressive setters
-
getDataLength
-
setSamples
Setter forsamples
- Parameters:
pSamples
- value for field- Returns:
- same object to permit progressive setters
-
getSamples
-
setData
Setter fordata
This is described in the specification as a stream of bits, but is implemented in Java as a byte array. The size of the byte array reflects the value of
dataLength
rounded to the next highest byte boundary. IfdataLength
is not set when the Pdu is sent, the receiver will read a bit length equal to the size of the byte array times 8.- Parameters:
pData
- data of interest- Returns:
- same object to permit progressive setters
-
getData
-
marshal
Serializes an object to a DataOutputStream.- Specified by:
marshal
in interfaceMarshaller
- Overrides:
marshal
in classRadioCommunicationsFamilyPdu
- Parameters:
dos
- The DataOutputStream- Throws:
Exception
- if something goes wrong- See Also:
-
unmarshal
Deserializes an object from a DataInputStream.- Specified by:
unmarshal
in interfaceMarshaller
- Overrides:
unmarshal
in classRadioCommunicationsFamilyPdu
- Parameters:
dis
- DataInputStream- Returns:
- marshalled serialized size in bytes
- Throws:
Exception
- if something goes wrong- See Also:
-
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 buff is too smallReadOnlyBufferException
- if buff is read onlyException
- ByteBuffer-generated exception- See Also:
-
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 buff is too smallException
- ByteBuffer-generated exception- See Also:
-
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.
-