Package edu.nps.moves.dis7.pdus
Class Environment
java.lang.Object
edu.nps.moves.dis7.pdus.Environment
- All Implemented Interfaces:
Serializable
Information about a geometry, a state associated with a geometry, a bounding volume, or an associated entity ID. 6.2.31, not fully defined. 'The current definitions can be found in DIS PCR 240'
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EnvironmentalProcessRecordTypeRecord type uid 250protected byte[]Geometry or state recordprotected byteIdentify the sequentially numbered record indexprotected shortlength, in bitsprotected bytepadding -
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 objectGetter forenvironmentTypebyte[]Getter forgeometrybytegetIndex()Getter forindexshortGetter forlengthintReturns size of this serialized (marshalled) object in bytesbyteGetter forpadding1inthashCode()voidmarshal(DataOutputStream dos) Serializes an object to a DataOutputStream.voidmarshal(ByteBuffer byteBuffer) Packs an object into the ByteBuffer.setEnvironmentType(EnvironmentalProcessRecordType pEnvironmentType) Setter forenvironmentTypesetGeometry(byte[] pGeometry) Setter forgeometrysetIndex(byte pIndex) Setter forindexsetIndex(int pIndex) Utility setter forindexsetLength(int pLength) Utility setter forlengthsetLength(short pLength) Setter forlengthsetPadding1(byte pPadding1) Setter forpadding1setPadding1(int pPadding1) Utility setter forpadding1toString()intunmarshal(DataInputStream dis) Deserializes an object from a DataInputStream.intunmarshal(ByteBuffer byteBuffer) Unpacks a Pdu from the underlying data.
-
Field Details
-
environmentType
Record type uid 250 -
length
protected short lengthlength, in bits -
index
protected byte indexIdentify the sequentially numbered record index -
padding1
protected byte padding1padding -
geometry
protected byte[] geometryGeometry or state record
-
-
Constructor Details
-
Environment
public Environment()Constructor creates and configures a new instance object
-
-
Method Details
-
getMarshalledSize
public int getMarshalledSize()Returns size of this serialized (marshalled) object in bytes- Returns:
- serialized size in bytes
- See Also:
-
setEnvironmentType
Setter forenvironmentType- Parameters:
pEnvironmentType- new value of interest- Returns:
- same object to permit progressive setters
-
getEnvironmentType
Getter forenvironmentType- Returns:
- value of interest
-
setLength
Setter forlength- Parameters:
pLength- new value of interest- Returns:
- same object to permit progressive setters
-
setLength
Utility setter forlength- Parameters:
pLength- new value of interest- Returns:
- same object to permit progressive setters
-
getLength
-
setIndex
Setter forindex- Parameters:
pIndex- new value of interest- Returns:
- same object to permit progressive setters
-
setIndex
Utility setter forindex- Parameters:
pIndex- new value of interest- Returns:
- same object to permit progressive setters
-
getIndex
-
setPadding1
Setter forpadding1- Parameters:
pPadding1- new value of interest- Returns:
- same object to permit progressive setters
-
setPadding1
Utility setter forpadding1- Parameters:
pPadding1- new value of interest- Returns:
- same object to permit progressive setters
-
getPadding1
-
setGeometry
Setter forgeometry- Parameters:
pGeometry- new value of interest- Returns:
- same object to permit progressive setters
-
getGeometry
-
marshal
Serializes an object to a DataOutputStream.- Parameters:
dos- the OutputStream- Throws:
Exception- if something goes wrong- See Also:
-
unmarshal
Deserializes an object from a DataInputStream.- 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.- 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.- 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
-
equalsImpl
Compare all fields that contribute to the state, ignoring transient and static fields, forthisand the supplied object- Parameters:
obj- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
-
hashCode
-