Package edu.nps.moves.dis7.pdus
Class RecordSpecificationElement
java.lang.Object
edu.nps.moves.dis7.pdus.RecordSpecificationElement
- All Implemented Interfaces:
Serializable
Synthetic record, made up from section 6.2.73. This is used to achieve a repeating variable list element.
recordLength, recordCount and recordValues must be set by hand so the. IEEE Std 1278.1-2012, IEEE Standard for Distributed Interactive Simulation - Application Protocols
- See Also:
- Serialized Form
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intpadding is an undescribed parameter...protected byte[]used if required to make entire record size an even multiple of 8 bytesprotected shortthe number of records included in the record setprotected VariableRecordTypeThe data structure used to convey the parameter values of the record for each record.protected shortthe length, in bits, of the record.protected intThe serial number of the first record in the block of recordsprotected byte[]The concatenated records of the format specified by the Record ID field. -
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 objectintReturns size of this serialized (marshalled) object in bytesintGetter forpaddingbyte[]Getter forpadTo64shortGetter forrecordCountGetter forrecordIDshortGetter forrecordLengthintGetter forrecordSetSerialNumberbyte[]Getter forrecordValuesvoidmarshal(DataOutputStream dos)Serializes an object to a DataOutputStream.voidmarshal(ByteBuffer byteBuffer)Packs an object into the ByteBuffer.setPadding(int pPadding)Setter forpaddingsetPadTo64(byte[] pPadTo64)Setter forpadTo64setRecordCount(int pRecordCount)Utility setter forrecordCountsetRecordCount(short pRecordCount)Setter forrecordCountsetRecordID(VariableRecordType pRecordID)Setter forrecordIDsetRecordLength(int pRecordLength)Utility setter forrecordLengthsetRecordLength(short pRecordLength)Setter forrecordLengthsetRecordSetSerialNumber(int pRecordSetSerialNumber)Setter forrecordSetSerialNumbersetRecordValues(byte[] pRecordValues)Setter forrecordValuestoString()intunmarshal(DataInputStream dis)Deserializes an object from a DataInputStream.intunmarshal(ByteBuffer byteBuffer)Unpacks a Pdu from the underlying data.
-
Field Details
-
recordID
The data structure used to convey the parameter values of the record for each record. 32-bit enumeration. uid = 66 -
recordSetSerialNumber
protected int recordSetSerialNumberThe serial number of the first record in the block of records -
padding
protected int paddingpadding is an undescribed parameter... -
recordLength
protected short recordLengththe length, in bits, of the record. Note, bits, not bytes. -
recordCount
protected short recordCountthe number of records included in the record set -
recordValues
protected byte[] recordValuesThe concatenated records of the format specified by the Record ID field. The length of this field is the Record Length multiplied by the Record Count, in units of bits. -
padTo64
protected byte[] padTo64used if required to make entire record size an even multiple of 8 bytes
-
-
Constructor Details
-
RecordSpecificationElement
public RecordSpecificationElement()Constructor
-
-
Method Details
-
getMarshalledSize
public int getMarshalledSize()Returns size of this serialized (marshalled) object in bytes- Returns:
- serialized size in bytes
- See Also:
- https://en.wikipedia.org/wiki/Marshalling_(computer_science)
-
setRecordID
Setter forrecordID- Parameters:
pRecordID- new value of interest- Returns:
- same object to permit progressive setters
-
getRecordID
Getter forrecordID- Returns:
- value of interest
-
setRecordSetSerialNumber
Setter forrecordSetSerialNumber- Parameters:
pRecordSetSerialNumber- new value of interest- Returns:
- same object to permit progressive setters
-
getRecordSetSerialNumber
public int getRecordSetSerialNumber()Getter forrecordSetSerialNumber- Returns:
- value of interest
-
setPadding
Setter forpadding- Parameters:
pPadding- new value of interest- Returns:
- same object to permit progressive setters
-
getPadding
public int getPadding()Getter forpadding- Returns:
- value of interest
-
setRecordLength
Setter forrecordLength- Parameters:
pRecordLength- new value of interest- Returns:
- same object to permit progressive setters
-
setRecordLength
Utility setter forrecordLength- Parameters:
pRecordLength- new value of interest- Returns:
- same object to permit progressive setters
-
getRecordLength
public short getRecordLength()Getter forrecordLength- Returns:
- value of interest
-
setRecordCount
Setter forrecordCount- Parameters:
pRecordCount- new value of interest- Returns:
- same object to permit progressive setters
-
setRecordCount
Utility setter forrecordCount- Parameters:
pRecordCount- new value of interest- Returns:
- same object to permit progressive setters
-
getRecordCount
public short getRecordCount()Getter forrecordCount- Returns:
- value of interest
-
setRecordValues
Setter forrecordValues- Parameters:
pRecordValues- new value of interest- Returns:
- same object to permit progressive setters
-
getRecordValues
public byte[] getRecordValues()Getter forrecordValues- Returns:
- value of interest
-
setPadTo64
Setter forpadTo64- Parameters:
pPadTo64- new value of interest- Returns:
- same object to permit progressive setters
-
getPadTo64
public byte[] getPadTo64()Getter forpadTo64- Returns:
- value of interest
-
marshal
Serializes an object to a DataOutputStream.- Parameters:
dos- the OutputStream- Throws:
Exception- if something goes wrong- See Also:
DataOutputStream
-
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:
DataInputStream, https://en.wikipedia.org/wiki/Marshalling_(computer_science)
-
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:
ByteBuffer
-
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:
ByteBuffer, https://en.wikipedia.org/wiki/Marshalling_(computer_science)
-
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
-