Package edu.nps.moves.dis7.pdus
Class GridAxisDescriptorFixed
java.lang.Object
edu.nps.moves.dis7.pdus.GridAxisDescriptor
edu.nps.moves.dis7.pdus.GridAxisDescriptorFixed
- All Implemented Interfaces:
Serializable
Grid axis record for fixed data. Section 6.2.41
IEEE Std 1278.1-2012, IEEE Standard for Distributed Interactive Simulation - Application Protocols
- See Also:
- Serialized Form
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected shortinitial grid point for the current pduprotected shortNumber of grid locations along Xi axisFields inherited from class edu.nps.moves.dis7.pdus.GridAxisDescriptor
axisType, domainFinalXi, domainInitialXi, domainPointsXi, interleafFactor -
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 objectshortGetter forinitialIndexintReturns size of this serialized (marshalled) object in bytesshortGetter fornumberOfPointsOnXiAxisvoidmarshal(DataOutputStream dos)Serializes an object to a DataOutputStream.voidmarshal(ByteBuffer byteBuffer)Packs an object into the ByteBuffer.setInitialIndex(int pInitialIndex)Utility setter forinitialIndexsetInitialIndex(short pInitialIndex)Setter forinitialIndexsetNumberOfPointsOnXiAxis(int pNumberOfPointsOnXiAxis)Utility setter fornumberOfPointsOnXiAxissetNumberOfPointsOnXiAxis(short pNumberOfPointsOnXiAxis)Setter fornumberOfPointsOnXiAxistoString()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.GridAxisDescriptor
getAxisType, getDomainFinalXi, getDomainInitialXi, getDomainPointsXi, getInterleafFactor, setAxisType, setDomainFinalXi, setDomainInitialXi, setDomainPointsXi, setDomainPointsXi, setInterleafFactor, setInterleafFactor
-
Field Details
-
numberOfPointsOnXiAxis
protected short numberOfPointsOnXiAxisNumber of grid locations along Xi axis -
initialIndex
protected short initialIndexinitial grid point for the current pdu
-
-
Constructor Details
-
GridAxisDescriptorFixed
public GridAxisDescriptorFixed()Constructor
-
-
Method Details
-
getMarshalledSize
public int getMarshalledSize()Returns size of this serialized (marshalled) object in bytes- Overrides:
getMarshalledSizein classGridAxisDescriptor- Returns:
- serialized size in bytes
- See Also:
- https://en.wikipedia.org/wiki/Marshalling_(computer_science)
-
setNumberOfPointsOnXiAxis
Setter fornumberOfPointsOnXiAxis- Parameters:
pNumberOfPointsOnXiAxis- new value of interest- Returns:
- same object to permit progressive setters
-
setNumberOfPointsOnXiAxis
Utility setter fornumberOfPointsOnXiAxis- Parameters:
pNumberOfPointsOnXiAxis- new value of interest- Returns:
- same object to permit progressive setters
-
getNumberOfPointsOnXiAxis
public short getNumberOfPointsOnXiAxis()Getter fornumberOfPointsOnXiAxis- Returns:
- value of interest
-
setInitialIndex
Setter forinitialIndex- Parameters:
pInitialIndex- new value of interest- Returns:
- same object to permit progressive setters
-
setInitialIndex
Utility setter forinitialIndex- Parameters:
pInitialIndex- new value of interest- Returns:
- same object to permit progressive setters
-
getInitialIndex
public short getInitialIndex()Getter forinitialIndex- Returns:
- value of interest
-
marshal
Serializes an object to a DataOutputStream.- Overrides:
marshalin classGridAxisDescriptor- Parameters:
dos- the OutputStream- Throws:
Exception- if something goes wrong- See Also:
DataOutputStream
-
unmarshal
Deserializes an object from a DataInputStream.- Overrides:
unmarshalin classGridAxisDescriptor- 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.- Overrides:
marshalin classGridAxisDescriptor- 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.- Overrides:
unmarshalin classGridAxisDescriptor- 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:
equalsin classGridAxisDescriptor
-
equalsImpl
Description copied from class:GridAxisDescriptorCompare all fields that contribute to the state, ignoring transient and static fields, forthisand the supplied object- Overrides:
equalsImplin classGridAxisDescriptor- Parameters:
obj- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
- Overrides:
toStringin classGridAxisDescriptor
-