Package edu.nps.moves.dis7.pdus
Class EntityStatePdu
java.lang.Object
edu.nps.moves.dis7.pdus.Pdu
edu.nps.moves.dis7.pdus.PduBase
edu.nps.moves.dis7.pdus.EntityInformationInteractionFamilyPdu
edu.nps.moves.dis7.pdus.EntityStatePdu
- All Implemented Interfaces:
Marshaller
,Serializable
7.2.2. Represents the position and state of one entity in the world. See 5.3.2.
IEEE Std 1278.1-2012, IEEE Standard for Distributed Interactive Simulation - Application Protocols
- See Also:
- Serialized Form
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EntityType
alternativeEntityType is an undescribed parameter...protected EntityCapabilities
a series of bit flags uid 55protected DeadReckoningParameters
parameters used for dead reckoningprotected int
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 ForceID
What force this entity is affiliated with, eg red, blue, neutral, etc uid 6protected EntityMarking
11 characters that can be used for entity identifiication, debugging, or to draw unique strings on the side of entities in the worldprotected byte
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.pdus.Pdu
exerciseID, length, 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 objectGetter foralternativeEntityType
Getter forcapabilities
Getter fordeadReckoningParameters
int
Getter forentityAppearance
Getter forentityID
Getter forentityLinearVelocity
Getter forentityLocation
Getter forentityOrientation
Getter forentityType
Getter forforceId
Getter formarking
int
Returns size of this serialized (marshalled) object in bytesGetter forvariableParameters
void
marshal(DataOutputStream dos)
Serializes an object to a DataOutputStream.void
marshal(ByteBuffer byteBuffer)
Packs an object into the ByteBuffer.setAlternativeEntityType(EntityType pAlternativeEntityType)
Setter foralternativeEntityType
setCapabilities(EntityCapabilities pCapabilities)
Setter forcapabilities
setDeadReckoningParameters(DeadReckoningParameters pDeadReckoningParameters)
Setter fordeadReckoningParameters
setEntityAppearance(int pEntityAppearance)
Setter forentityAppearance
setEntityID(EntityID pEntityID)
Setter forentityID
setEntityLinearVelocity(Vector3Float pEntityLinearVelocity)
Setter forentityLinearVelocity
setEntityLocation(Vector3Double pEntityLocation)
Setter forentityLocation
setEntityOrientation(EulerAngles pEntityOrientation)
Setter forentityOrientation
setEntityType(EntityType pEntityType)
Setter forentityType
setForceId(ForceID pForceId)
Setter forforceId
setMarking(EntityMarking pMarking)
Setter formarking
setVariableParameters(List<VariableParameter> pVariableParameters)
Setter forvariableParameters
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.PduBase
getPadding, getPduStatus, setPadding, setPadding, setPduStatus
Methods inherited from class edu.nps.moves.dis7.pdus.Pdu
getExerciseID, getLength, getPduType, getProtocolFamily, getProtocolVersion, getTimestamp, marshal, setExerciseID, setExerciseID, setLength, setLength, setPduType, setProtocolFamily, setProtocolVersion, setTimestamp
-
Field Details
-
entityID
Unique ID for an entity that is tied to this state information -
forceId
What force this entity is affiliated with, eg red, blue, neutral, etc uid 6 -
numberOfVariableParameters
protected byte 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
alternativeEntityType is an undescribed parameter... -
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 int 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
11 characters that can be used for entity identifiication, debugging, or to draw unique strings on the side of entities in the world -
capabilities
a series of bit flags uid 55 -
variableParameters
variable length list of variable parameters. In earlier DIS versions this was articulation parameters.
-
-
Constructor Details
-
EntityStatePdu
public EntityStatePdu()Constructor creates and configures a new instance object
-
-
Method Details
-
getMarshalledSize
public int getMarshalledSize()Returns size of this serialized (marshalled) object in bytes- Specified by:
getMarshalledSize
in interfaceMarshaller
- Overrides:
getMarshalledSize
in classEntityInformationInteractionFamilyPdu
- Returns:
- serialized size in bytes
- See Also:
- https://en.wikipedia.org/wiki/Marshalling_(computer_science)
-
setEntityID
Setter forentityID
- Parameters:
pEntityID
- new value of interest- Returns:
- same object to permit progressive setters
-
getEntityID
Getter forentityID
- Returns:
- value of interest
-
setForceId
Setter forforceId
- Parameters:
pForceId
- new value of interest- Returns:
- same object to permit progressive setters
-
getForceId
Getter forforceId
- Returns:
- value of interest
-
setEntityType
Setter forentityType
- Parameters:
pEntityType
- new value of interest- Returns:
- same object to permit progressive setters
-
getEntityType
Getter forentityType
- Returns:
- value of interest
-
setAlternativeEntityType
Setter foralternativeEntityType
- Parameters:
pAlternativeEntityType
- new value of interest- Returns:
- same object to permit progressive setters
-
getAlternativeEntityType
Getter foralternativeEntityType
- 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
-
setEntityLocation
Setter forentityLocation
- Parameters:
pEntityLocation
- new value of interest- Returns:
- same object to permit progressive setters
-
getEntityLocation
Getter forentityLocation
- 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
-
setEntityAppearance
Setter forentityAppearance
- Parameters:
pEntityAppearance
- new value of interest- Returns:
- same object to permit progressive setters
-
getEntityAppearance
public int getEntityAppearance()Getter forentityAppearance
- 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
-
setMarking
Setter formarking
- Parameters:
pMarking
- new value of interest- Returns:
- same object to permit progressive setters
-
getMarking
Getter formarking
- Returns:
- value of interest
-
setCapabilities
Setter forcapabilities
- Parameters:
pCapabilities
- new value of interest- Returns:
- same object to permit progressive setters
-
getCapabilities
Getter forcapabilities
- Returns:
- value of interest
-
setVariableParameters
Setter forvariableParameters
- Parameters:
pVariableParameters
- new value of interest- Returns:
- same object to permit progressive setters
-
getVariableParameters
Getter forvariableParameters
- Returns:
- value of interest
-
marshal
Serializes an object to a DataOutputStream.- Specified by:
marshal
in interfaceMarshaller
- Overrides:
marshal
in classEntityInformationInteractionFamilyPdu
- Parameters:
dos
- the OutputStream- Throws:
Exception
- if something goes wrong- See Also:
DataOutputStream
-
unmarshal
Deserializes an object from a DataInputStream.- Specified by:
unmarshal
in interfaceMarshaller
- Overrides:
unmarshal
in classEntityInformationInteractionFamilyPdu
- Parameters:
dis
- the InputStream- Returns:
- marshalled serialized size in bytes
- Throws:
Exception
- if something goes wrong- See Also:
DataInputStream
, https://en.wikipedia.org/wiki/Marshalling_(computer_science)
-
marshal
Packs an object into the ByteBuffer.- Specified by:
marshal
in interfaceMarshaller
- Overrides:
marshal
in classEntityInformationInteractionFamilyPdu
- 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:
ByteBuffer
-
unmarshal
Unpacks a Pdu from the underlying data.- Specified by:
unmarshal
in interfaceMarshaller
- Overrides:
unmarshal
in classEntityInformationInteractionFamilyPdu
- 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:
ByteBuffer
, https://en.wikipedia.org/wiki/Marshalling_(computer_science)
-
equals
- Overrides:
equals
in classEntityInformationInteractionFamilyPdu
-
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 classEntityInformationInteractionFamilyPdu
- Parameters:
obj
- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
- Overrides:
toString
in classEntityInformationInteractionFamilyPdu
-