Package edu.nps.moves.dis7.pdus
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 Shortlength of data in bitsprotected shortencoding scheme used, and enumerationprotected RadioCommsHeaderRadio communications headerprotected intsample rateprotected shortnumber of samplesprotected SignalTDLTypetdl type uid 178Fields inherited from class edu.nps.moves.dis7.pdus.RadioCommunicationsFamilyPdu
FAMILY_NAMEFields inherited from class edu.nps.moves.dis7.pdus.Pdu
exerciseID, length, NAME, pduType, protocolFamily, protocolVersion, timestamp -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanequalsImpl(Object obj) Compare all fields that contribute to the state, ignoring transient and static fields, forthisand the supplied objectbyte[]getData()Getter fordatashortGetter fordataLengthshortGetter forencodingSchemeGetter forheaderintReturns size of this serialized (marshalled) object in bytesintGetter forsampleRateshortGetter forsamplesGetter fortdlTypevoidmarshal(DataOutputStream dos) Serializes an object to a DataOutputStream.voidmarshal(ByteBuffer byteBuffer) Packs an object into the ByteBuffer.setData(byte[] pData) Setter fordatasetDataLength(short pDataLength) Setter fordataLengthsetEncodingScheme(short pEncodingScheme) Setter forencodingSchemesetHeader(RadioCommsHeader pHeader) Setter forheadersetSampleRate(int pSampleRate) Setter forsampleRatesetSamples(short pSamples) Setter forsamplessetTdlType(SignalTDLType pTdlType) Setter fortdlTypeintunmarshal(DataInputStream dis) Deserializes an object from a DataInputStream.intunmarshal(ByteBuffer byteBuffer) Unpacks a Pdu from the underlying data.Methods inherited from class edu.nps.moves.dis7.pdus.RadioCommunicationsFamilyPdu
toStringMethods inherited from class edu.nps.moves.dis7.pdus.PduBase
getPadding, getPduStatus, hashCode, setPadding, setPadding, setPduStatusMethods 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:
getMarshalledSizein interfaceMarshaller- Overrides:
getMarshalledSizein 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 fordataLengthThis value is the size IN BITS of the
dataLengthfield. 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 fordataThis 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
dataLengthrounded to the next highest byte boundary. IfdataLengthis 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:
marshalin interfaceMarshaller- Overrides:
marshalin classRadioCommunicationsFamilyPdu- Parameters:
dos- The DataOutputStream- Throws:
Exception- if something goes wrong- See Also:
-
unmarshal
Deserializes an object from a DataInputStream.- Specified by:
unmarshalin interfaceMarshaller- Overrides:
unmarshalin 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:
marshalin interfaceMarshaller- Overrides:
marshalin 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:
unmarshalin interfaceMarshaller- Overrides:
unmarshalin 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:
equalsin classRadioCommunicationsFamilyPdu
-
equalsImpl
Description copied from class:PduCompare all fields that contribute to the state, ignoring transient and static fields, forthisand the supplied object- Overrides:
equalsImplin classRadioCommunicationsFamilyPdu- Parameters:
obj- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-