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 ByteArrayOutputStream
byteArrayOutputStream (baos) is used for marshal/unmarshal serializationprotected DataOutputStream
dataOutputStream (dos) is used for marshal/unmarshal serializationprotected LiveDeadReckoningParameters
deadReckoningParameters is an undescribed parameter...protected LiveEntityLinearVelocity
entityLinearVelocity is an undescribed parameter...protected LiveEntityRelativeWorldCoordinates
entityLocation is an undescribed parameter...protected LiveEntityOrientation
entityOrientation is an undescribed parameter...protected EntityID
liveEntityId is an undescribed parameter...protected short
measuredSpeed is an undescribed parameter...static final String
The name of this PDU typeprotected LiveEntityOrientationError
orientationError is an undescribed parameter...protected LiveEntityPositionError
positionError is an undescribed parameter...protected byte[]
systemSpecificData is an undescribed parameter...protected byte
systemSpecificDataLength is an undescribed parameter...protected byte
bit fieldFields inherited from class edu.nps.moves.dis7.pdus.LiveEntityFamilyPdu
FAMILY_NAME
Fields 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.boolean
boolean
equalsImpl
(Object obj) Compare all fields that contribute to the state, ignoring transient and static fields, forthis
and the supplied objectGetter fordeadReckoningParameters
Getter forentityLinearVelocity
Getter forentityLocation
Getter forentityOrientation
Getter forliveEntityId
int
Returns size of this serialized (marshalled) object in bytesshort
Getter formeasuredSpeed
Getter fororientationError
Getter forpositionError
byte[]
Getter forsystemSpecificData
byte
Getter forTSPIFlag
int
hashCode()
void
marshal
(DataOutputStream dos) Serializes an object to a DataOutputStream.void
marshal
(ByteBuffer byteBuffer) Packs an object into the ByteBuffer.setDeadReckoningParameters
(LiveDeadReckoningParameters pDeadReckoningParameters) Setter fordeadReckoningParameters
setEntityLinearVelocity
(LiveEntityLinearVelocity pEntityLinearVelocity) Setter forentityLinearVelocity
setEntityLocation
(LiveEntityRelativeWorldCoordinates pEntityLocation) Setter forentityLocation
setEntityOrientation
(LiveEntityOrientation pEntityOrientation) Setter forentityOrientation
setLiveEntityId
(EntityID pLiveEntityId) Setter forliveEntityId
setMeasuredSpeed
(int pMeasuredSpeed) Utility setter formeasuredSpeed
setMeasuredSpeed
(short pMeasuredSpeed) Setter formeasuredSpeed
setOrientationError
(LiveEntityOrientationError pOrientationError) Setter fororientationError
setPositionError
(LiveEntityPositionError pPositionError) Setter forpositionError
setSystemSpecificData
(byte[] pSystemSpecificData) Setter forsystemSpecificData
setTSPIFlag
(byte pTSPIFlag) Setter forTSPIFlag
setTSPIFlag
(int pTSPIFlag) Utility setter forTSPIFlag
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.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:
getMarshalledSize
in interfaceMarshaller
- Overrides:
getMarshalledSize
in 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:
marshal
in interfaceMarshaller
- Overrides:
marshal
in classLiveEntityFamilyPdu
- Parameters:
dos
- the OutputStream- Throws:
Exception
- if something goes wrong- See Also:
-
unmarshal
Deserializes an object from a DataInputStream.- Specified by:
unmarshal
in interfaceMarshaller
- Overrides:
unmarshal
in 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:
marshal
in interfaceMarshaller
- Overrides:
marshal
in 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:
unmarshal
in interfaceMarshaller
- Overrides:
unmarshal
in 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:
equals
in classLiveEntityFamilyPdu
-
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 classLiveEntityFamilyPdu
- Parameters:
obj
- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
- Overrides:
toString
in classLiveEntityFamilyPdu
-
hashCode
-