Package edu.nps.moves.dis7.pdus
Class TSPIPdu
java.lang.Object
edu.nps.moves.dis7.pdus.Pdu
edu.nps.moves.dis7.pdus.LiveEntityFamilyPdu
edu.nps.moves.dis7.pdus.TSPIPdu
- All Implemented Interfaces:
Marshaller,Serializable
- Direct Known Subclasses:
TimeSpacePositionInformationPdu
9.4.2 The Time Space Position Information (TSPI) PDU shall communicate information about the LE’s state vector.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ByteArrayOutputStreambyteArrayOutputStream (baos) is used for marshal/unmarshal serializationprotected DataOutputStreamdataOutputStream (dos) is used for marshal/unmarshal serializationprotected LiveDeadReckoningParametersdeadReckoningParameters is an undescribed parameter...protected LiveEntityLinearVelocityentityLinearVelocity is an undescribed parameter...protected LiveEntityRelativeWorldCoordinatesentityLocation is an undescribed parameter...protected LiveEntityOrientationentityOrientation is an undescribed parameter...protected EntityIDliveEntityId is an undescribed parameter...protected shortmeasuredSpeed is an undescribed parameter...static final StringThe name of this PDU typeprotected LiveEntityOrientationErrororientationError is an undescribed parameter...protected LiveEntityPositionErrorpositionError is an undescribed parameter...protected byte[]systemSpecificData is an undescribed parameter...protected bytesystemSpecificDataLength is an undescribed parameter...protected bytebit fieldFields inherited from class edu.nps.moves.dis7.pdus.LiveEntityFamilyPdu
FAMILY_NAMEFields inherited from class edu.nps.moves.dis7.pdus.Pdu
exerciseID, length, pduType, protocolFamily, protocolVersion, timestamp -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()copy method creates a deep copy of current object using preferred marshalling methodCreates a "deep copy" of current object using ByteBuffer methods.copy method creates a deep copy of current object using DataOutputStream methods.booleanbooleanequalsImpl(Object obj) Compare all fields that contribute to the state, ignoring transient and static fields, forthisand the supplied objectGetter fordeadReckoningParametersGetter forentityLinearVelocityGetter forentityLocationGetter forentityOrientationGetter forliveEntityIdintReturns size of this serialized (marshalled) object in bytesshortGetter formeasuredSpeedGetter fororientationErrorGetter forpositionErrorbyte[]Getter forsystemSpecificDatabyteGetter forTSPIFlaginthashCode()voidmarshal(DataOutputStream dos) Serializes an object to a DataOutputStream.voidmarshal(ByteBuffer byteBuffer) Packs an object into the ByteBuffer.setDeadReckoningParameters(LiveDeadReckoningParameters pDeadReckoningParameters) Setter fordeadReckoningParameterssetEntityLinearVelocity(LiveEntityLinearVelocity pEntityLinearVelocity) Setter forentityLinearVelocitysetEntityLocation(LiveEntityRelativeWorldCoordinates pEntityLocation) Setter forentityLocationsetEntityOrientation(LiveEntityOrientation pEntityOrientation) Setter forentityOrientationsetLiveEntityId(EntityID pLiveEntityId) Setter forliveEntityIdsetMeasuredSpeed(int pMeasuredSpeed) Utility setter formeasuredSpeedsetMeasuredSpeed(short pMeasuredSpeed) Setter formeasuredSpeedsetOrientationError(LiveEntityOrientationError pOrientationError) Setter fororientationErrorsetPositionError(LiveEntityPositionError pPositionError) Setter forpositionErrorsetSystemSpecificData(byte[] pSystemSpecificData) Setter forsystemSpecificDatasetTSPIFlag(byte pTSPIFlag) Setter forTSPIFlagsetTSPIFlag(int pTSPIFlag) Utility setter forTSPIFlagtoString()intunmarshal(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.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
-
NAME
-
liveEntityId
liveEntityId is an undescribed parameter... -
TSPIFlag
protected byte TSPIFlagbit field -
entityLocation
entityLocation is an undescribed parameter... -
entityLinearVelocity
entityLinearVelocity is an undescribed parameter... -
entityOrientation
entityOrientation is an undescribed parameter... -
positionError
positionError is an undescribed parameter... -
orientationError
orientationError is an undescribed parameter... -
deadReckoningParameters
deadReckoningParameters is an undescribed parameter... -
measuredSpeed
protected short measuredSpeedmeasuredSpeed is an undescribed parameter... -
systemSpecificDataLength
protected byte systemSpecificDataLengthsystemSpecificDataLength is an undescribed parameter... -
systemSpecificData
protected byte[] systemSpecificDatasystemSpecificData is an undescribed parameter... -
byteArrayOutputStream
byteArrayOutputStream (baos) is used for marshal/unmarshal serialization- See Also:
-
dataOutputStream
dataOutputStream (dos) is used for marshal/unmarshal serialization- See Also:
-
-
Constructor Details
-
TSPIPdu
public TSPIPdu()Constructor creates and configures a new instance object
-
-
Method Details
-
copy
copy method creates a deep copy of current object using preferred marshalling method- Returns:
- deep copy of PDU
-
copyByteBuffer
Creates a "deep copy" of current object using ByteBuffer methods.- Returns:
- deep copy of PDU
-
copyDataOutputStream
copy method creates a deep copy of current object using DataOutputStream methods.- Returns:
- deep copy of PDU
-
getMarshalledSize
public int getMarshalledSize()Returns size of this serialized (marshalled) object in bytes- Specified by:
getMarshalledSizein interfaceMarshaller- Overrides:
getMarshalledSizein classLiveEntityFamilyPdu- Returns:
- serialized size in bytes
- See Also:
-
setLiveEntityId
Setter forliveEntityId- Parameters:
pLiveEntityId- new value of interest- Returns:
- same object to permit progressive setters
-
getLiveEntityId
-
setTSPIFlag
-
setTSPIFlag
-
getTSPIFlag
-
setEntityLocation
Setter forentityLocation- Parameters:
pEntityLocation- new value of interest- Returns:
- same object to permit progressive setters
-
getEntityLocation
Getter forentityLocation- Returns:
- value of interest
-
setEntityLinearVelocity
Setter forentityLinearVelocity- Parameters:
pEntityLinearVelocity- new value of interest- Returns:
- same object to permit progressive setters
-
getEntityLinearVelocity
Getter forentityLinearVelocity- Returns:
- value of interest
-
setEntityOrientation
Setter forentityOrientation- Parameters:
pEntityOrientation- new value of interest- Returns:
- same object to permit progressive setters
-
getEntityOrientation
Getter forentityOrientation- Returns:
- value of interest
-
setPositionError
Setter forpositionError- Parameters:
pPositionError- new value of interest- Returns:
- same object to permit progressive setters
-
getPositionError
Getter forpositionError- Returns:
- value of interest
-
setOrientationError
Setter fororientationError- Parameters:
pOrientationError- new value of interest- Returns:
- same object to permit progressive setters
-
getOrientationError
Getter fororientationError- Returns:
- value of interest
-
setDeadReckoningParameters
Setter fordeadReckoningParameters- Parameters:
pDeadReckoningParameters- new value of interest- Returns:
- same object to permit progressive setters
-
getDeadReckoningParameters
Getter fordeadReckoningParameters- Returns:
- value of interest
-
setMeasuredSpeed
Setter formeasuredSpeed- Parameters:
pMeasuredSpeed- new value of interest- Returns:
- same object to permit progressive setters
-
setMeasuredSpeed
Utility setter formeasuredSpeed- Parameters:
pMeasuredSpeed- new value of interest- Returns:
- same object to permit progressive setters
-
getMeasuredSpeed
-
setSystemSpecificData
Setter forsystemSpecificData- Parameters:
pSystemSpecificData- new value of interest- Returns:
- same object to permit progressive setters
-
getSystemSpecificData
-
marshal
Serializes an object to a DataOutputStream.- Specified by:
marshalin interfaceMarshaller- Overrides:
marshalin classLiveEntityFamilyPdu- Parameters:
dos- the OutputStream- Throws:
Exception- if something goes wrong- See Also:
-
unmarshal
Deserializes an object from a DataInputStream.- Specified by:
unmarshalin interfaceMarshaller- Overrides:
unmarshalin classLiveEntityFamilyPdu- Parameters:
dis- the InputStream- 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 classLiveEntityFamilyPdu- 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:
-
unmarshal
Unpacks a Pdu from the underlying data.- Specified by:
unmarshalin interfaceMarshaller- Overrides:
unmarshalin classLiveEntityFamilyPdu- 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:
-
equals
- Overrides:
equalsin classLiveEntityFamilyPdu
-
equalsImpl
Description copied from class:PduCompare all fields that contribute to the state, ignoring transient and static fields, forthisand the supplied object- Overrides:
equalsImplin classLiveEntityFamilyPdu- Parameters:
obj- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
- Overrides:
toStringin classLiveEntityFamilyPdu
-
hashCode
-