Package edu.nps.moves.dis7.pdus
Class IFFLayer2Pdu
java.lang.Object
edu.nps.moves.dis7.pdus.Pdu
edu.nps.moves.dis7.pdus.PduBase
edu.nps.moves.dis7.pdus.DistributedEmissionsRegenerationFamilyPdu
edu.nps.moves.dis7.pdus.IFFPdu
edu.nps.moves.dis7.pdus.IFFLayer2Pdu
- All Implemented Interfaces:
Marshaller
,Serializable
Section 5.3.7.4.2 When present, layer 2 should follow layer 1 and have the following fields. This requires manual cleanup. the beamData attribute semantics are used in multiple ways. UNFINSISHED
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BeamData
beam dataprotected ByteArrayOutputStream
byteArrayOutputStream (baos) is used for marshal/unmarshal serializationprotected DataOutputStream
dataOutputStream (dos) is used for marshal/unmarshal serializationprotected List
<IFFFundamentalParameterData> variable length list of fundamental parameters.protected LayerHeader
layer headerprotected short
numberOfParameters is an undescribed parameter...protected byte
secondaryOpParameter1 is an undescribed parameter...protected byte
secondaryOpParameter2 is an undescribed parameter...Fields inherited from class edu.nps.moves.dis7.pdus.IFFPdu
emittingEntityId, eventID, fundamentalParameters, location, systemDesignator, systemID, systemSpecificData
Fields inherited from class edu.nps.moves.dis7.pdus.Pdu
exerciseID, length, pduType, protocolFamily, protocolVersion, timestamp
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()
copy method creates a deep copy of current object using preferred marshalling methodCreates a "deep copy" of current object using ByteBuffer methods.copy method creates a deep copy of current object using DataOutputStream methods.boolean
boolean
equalsImpl
(Object obj) Compare all fields that contribute to the state, ignoring transient and static fields, forthis
and the supplied objectGetter forbeamData
Getter forfundamentalIFFParameters
Getter forlayerHeader
int
Returns size of this serialized (marshalled) object in bytesbyte
Getter forsecondaryOpParameter1
byte
Getter forsecondaryOpParameter2
void
marshal
(DataOutputStream dos) Serializes an object to a DataOutputStream.void
marshal
(ByteBuffer byteBuffer) Packs an object into the ByteBuffer.setBeamData
(BeamData pBeamData) Setter forbeamData
setFundamentalIFFParameters
(List<IFFFundamentalParameterData> pFundamentalIFFParameters) Setter forfundamentalIFFParameters
setLayerHeader
(LayerHeader pLayerHeader) Setter forlayerHeader
setSecondaryOpParameter1
(byte pSecondaryOpParameter1) Setter forsecondaryOpParameter1
setSecondaryOpParameter1
(int pSecondaryOpParameter1) Utility setter forsecondaryOpParameter1
setSecondaryOpParameter2
(byte pSecondaryOpParameter2) Setter forsecondaryOpParameter2
setSecondaryOpParameter2
(int pSecondaryOpParameter2) Utility setter forsecondaryOpParameter2
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.IFFPdu
getEmittingEntityId, getEventID, getFundamentalParameters, getLocation, getSystemDesignator, getSystemID, getSystemSpecificData, setEmittingEntityId, setEventID, setFundamentalParameters, setLocation, setSystemDesignator, setSystemDesignator, setSystemID, setSystemSpecificData, setSystemSpecificData
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
copyByPduFactory, getExerciseID, getLength, getPduType, getProtocolFamily, getProtocolVersion, getTimestamp, getTimestampSeconds, marshal, occursAfter, occursBefore, occursSameTime, setExerciseID, setExerciseID, setLength, setLength, setPduType, setProtocolFamily, setProtocolVersion, setTimestamp, setTimestampSeconds
-
Field Details
-
layerHeader
layer header -
beamData
beam data -
secondaryOpParameter1
protected byte secondaryOpParameter1secondaryOpParameter1 is an undescribed parameter... -
secondaryOpParameter2
protected byte secondaryOpParameter2secondaryOpParameter2 is an undescribed parameter... -
numberOfParameters
protected short numberOfParametersnumberOfParameters is an undescribed parameter... -
fundamentalIFFParameters
variable length list of fundamental parameters. -
byteArrayOutputStream
byteArrayOutputStream (baos) is used for marshal/unmarshal serialization- See Also:
-
dataOutputStream
dataOutputStream (dos) is used for marshal/unmarshal serialization- See Also:
-
-
Constructor Details
-
IFFLayer2Pdu
public IFFLayer2Pdu()Constructor creates and configures a new instance object
-
-
Method Details
-
copy
copy method creates a deep copy of current object using preferred marshalling method -
copyByteBuffer
Creates a "deep copy" of current object using ByteBuffer methods.- Overrides:
copyByteBuffer
in classIFFPdu
- Returns:
- deep copy of PDU
-
copyDataOutputStream
copy method creates a deep copy of current object using DataOutputStream methods.- Overrides:
copyDataOutputStream
in classIFFPdu
- Returns:
- deep copy of PDU
-
getMarshalledSize
public int getMarshalledSize()Returns size of this serialized (marshalled) object in bytes- Specified by:
getMarshalledSize
in interfaceMarshaller
- Overrides:
getMarshalledSize
in classIFFPdu
- Returns:
- serialized size in bytes
- See Also:
-
setLayerHeader
Setter forlayerHeader
- Parameters:
pLayerHeader
- new value of interest- Returns:
- same object to permit progressive setters
-
getLayerHeader
Getter forlayerHeader
- Returns:
- value of interest
-
setBeamData
Setter forbeamData
- Parameters:
pBeamData
- new value of interest- Returns:
- same object to permit progressive setters
-
getBeamData
Getter forbeamData
- Returns:
- value of interest
-
setSecondaryOpParameter1
Setter forsecondaryOpParameter1
- Parameters:
pSecondaryOpParameter1
- new value of interest- Returns:
- same object to permit progressive setters
-
setSecondaryOpParameter1
Utility setter forsecondaryOpParameter1
- Parameters:
pSecondaryOpParameter1
- new value of interest- Returns:
- same object to permit progressive setters
-
getSecondaryOpParameter1
public byte getSecondaryOpParameter1()Getter forsecondaryOpParameter1
- Returns:
- value of interest
-
setSecondaryOpParameter2
Setter forsecondaryOpParameter2
- Parameters:
pSecondaryOpParameter2
- new value of interest- Returns:
- same object to permit progressive setters
-
setSecondaryOpParameter2
Utility setter forsecondaryOpParameter2
- Parameters:
pSecondaryOpParameter2
- new value of interest- Returns:
- same object to permit progressive setters
-
getSecondaryOpParameter2
public byte getSecondaryOpParameter2()Getter forsecondaryOpParameter2
- Returns:
- value of interest
-
setFundamentalIFFParameters
public IFFLayer2Pdu setFundamentalIFFParameters(List<IFFFundamentalParameterData> pFundamentalIFFParameters) Setter forfundamentalIFFParameters
- Parameters:
pFundamentalIFFParameters
- new value of interest- Returns:
- same object to permit progressive setters
-
getFundamentalIFFParameters
Getter forfundamentalIFFParameters
- Returns:
- value of interest
-
marshal
Serializes an object to a DataOutputStream.- Specified by:
marshal
in interfaceMarshaller
- Overrides:
marshal
in classIFFPdu
- Parameters:
dos
- the OutputStream- Throws:
Exception
- if something goes wrong- See Also:
-
unmarshal
Deserializes an object from a DataInputStream.- Specified by:
unmarshal
in interfaceMarshaller
- Overrides:
unmarshal
in classIFFPdu
- 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.- Specified by:
marshal
in interfaceMarshaller
- Overrides:
marshal
in classIFFPdu
- 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.- Specified by:
unmarshal
in interfaceMarshaller
- Overrides:
unmarshal
in classIFFPdu
- 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
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 classIFFPdu
- Parameters:
obj
- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
-