Package edu.nps.moves.dis7
Class EntityStatePdu
java.lang.Object
edu.nps.moves.dis7.PduSuperclass
edu.nps.moves.dis7.Pdu
edu.nps.moves.dis7.EntityInformationFamilyPdu
edu.nps.moves.dis7.EntityStatePdu
- All Implemented Interfaces:
Serializable
Represents the postion and state of one entity in the world. Section 7.2.2.
COMPLETE
Copyright (c) 2008-2016, MOVES Institute, Naval Postgraduate School. All
rights reserved. This work is licensed under the BSD open source license,
available at https://www.movesinstitute.org/licenses/bsd.html
- Author:
- DMcG
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EntityType
protected long
a series of bit flagsprotected DeadReckoningParameters
parameters used for dead reckoningprotected long
a series of bit flags that are used to help draw the entity, such as smoking, on fire, etc.protected EntityID
Unique ID for an entity that is tied to this state informationprotected Vector3Float
Describes the speed of the entity in the worldprotected Vector3Double
describes the location of the entity in the worldprotected EulerAngles
describes the orientation of the entity, in euler anglesprotected EntityType
Describes the type of entity in the worldprotected short
What force this entity is affiliated with, eg red, blue, neutral, etcprotected EntityMarking
characters that can be used for debugging, or to draw unique strings on the side of entities in the worldprotected short
How many variable parameters are in the variable length list.protected List<VariableParameter>
variable length list of variable parameters.Fields inherited from class edu.nps.moves.dis7.PduSuperclass
exerciseID, 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 objectlong
long
short
int
short
void
marshal
(DataOutputStream dos) void
marshal
(ByteBuffer buff) Packs a Pdu into the ByteBuffer.void
setAlternativeEntityType
(EntityType pAlternativeEntityType) void
setCapabilities
(long pCapabilities) void
setDeadReckoningParameters
(DeadReckoningParameters pDeadReckoningParameters) void
setEntityAppearance
(long pEntityAppearance) void
setEntityID
(EntityID pEntityID) void
setEntityLinearVelocity
(Vector3Float pEntityLinearVelocity) void
setEntityLocation
(Vector3Double pEntityLocation) void
setEntityOrientation
(EulerAngles pEntityOrientation) void
setEntityType
(EntityType pEntityType) void
setForceId
(short pForceId) void
setMarking
(EntityMarking pMarking) void
setNumberOfVariableParameters
(short pNumberOfVariableParameters) Note that setting this value will not change the marshalled value.void
setVariableParameters
(List<VariableParameter> pVariableParameters) void
unmarshal
(DataInputStream dis) void
unmarshal
(ByteBuffer buff) Unpacks a Pdu from the underlying data.Methods inherited from class edu.nps.moves.dis7.Pdu
getPadding, getPduStatus, marshal, setPadding, setPduStatus
Methods inherited from class edu.nps.moves.dis7.PduSuperclass
getExerciseID, getLength, getPduType, getProtocolFamily, getProtocolVersion, getTimestamp, setExerciseID, setLength, setPduType, setProtocolFamily, setProtocolVersion, setTimestamp
-
Field Details
-
entityID
Unique ID for an entity that is tied to this state information -
forceId
protected short forceIdWhat force this entity is affiliated with, eg red, blue, neutral, etc -
numberOfVariableParameters
protected short numberOfVariableParametersHow many variable parameters are in the variable length list. In earlier versions of DIS these were known as articulation parameters -
entityType
Describes the type of entity in the world -
alternativeEntityType
-
entityLinearVelocity
Describes the speed of the entity in the world -
entityLocation
describes the location of the entity in the world -
entityOrientation
describes the orientation of the entity, in euler angles -
entityAppearance
protected long entityAppearancea series of bit flags that are used to help draw the entity, such as smoking, on fire, etc. -
deadReckoningParameters
parameters used for dead reckoning -
marking
characters that can be used for debugging, or to draw unique strings on the side of entities in the world -
capabilities
protected long capabilitiesa series of bit flags -
variableParameters
variable length list of variable parameters. In earlier DIS versions this was articulation parameters.
-
-
Constructor Details
-
EntityStatePdu
public EntityStatePdu()Constructor
-
-
Method Details
-
getMarshalledSize
public int getMarshalledSize()- Overrides:
getMarshalledSize
in classEntityInformationFamilyPdu
-
setEntityID
-
getEntityID
-
setForceId
public void setForceId(short pForceId) -
getForceId
public short getForceId() -
getNumberOfVariableParameters
public short getNumberOfVariableParameters() -
setNumberOfVariableParameters
public void setNumberOfVariableParameters(short pNumberOfVariableParameters) Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose. The getnumberOfVariableParameters method will also be based on the actual list length rather than this value. The method is simply here for java bean completeness. -
setEntityType
-
getEntityType
-
setAlternativeEntityType
-
getAlternativeEntityType
-
setEntityLinearVelocity
-
getEntityLinearVelocity
-
setEntityLocation
-
getEntityLocation
-
setEntityOrientation
-
getEntityOrientation
-
setEntityAppearance
public void setEntityAppearance(long pEntityAppearance) -
getEntityAppearance
public long getEntityAppearance() -
setDeadReckoningParameters
-
getDeadReckoningParameters
-
setMarking
-
getMarking
-
setCapabilities
public void setCapabilities(long pCapabilities) -
getCapabilities
public long getCapabilities() -
setVariableParameters
-
getVariableParameters
-
marshal
- Overrides:
marshal
in classEntityInformationFamilyPdu
-
unmarshal
- Overrides:
unmarshal
in classEntityInformationFamilyPdu
-
marshal
Packs a Pdu into the ByteBuffer.- Overrides:
marshal
in classEntityInformationFamilyPdu
- Parameters:
buff
- The ByteBuffer at the position to begin writing- Throws:
BufferOverflowException
- if buff is too smallReadOnlyBufferException
- if buff is read only- Since:
- ??
- See Also:
-
unmarshal
Unpacks a Pdu from the underlying data.- Overrides:
unmarshal
in classEntityInformationFamilyPdu
- Parameters:
buff
- The ByteBuffer at the position to begin reading- Throws:
BufferUnderflowException
- if buff is too small- Since:
- ??
- See Also:
-
equals
- Overrides:
equals
in classEntityInformationFamilyPdu
-
equalsImpl
Description copied from class:PduSuperclass
Compare all fields that contribute to the state, ignoring transient and static fields, forthis
and the supplied object- Overrides:
equalsImpl
in classEntityInformationFamilyPdu
- Parameters:
obj
- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-