Package edu.nps.moves.dis7.pdus
Class MinefieldQueryPdu
java.lang.Object
edu.nps.moves.dis7.pdus.Pdu
edu.nps.moves.dis7.pdus.PduBase
edu.nps.moves.dis7.pdus.MinefieldFamilyPdu
edu.nps.moves.dis7.pdus.MinefieldQueryPdu
- All Implemented Interfaces:
Marshaller
,Serializable
5.10.3 Contains information about the requesting entity and the region and mine types of interest to the requesting entity.
IEEE Std 1278.1-2012, IEEE Standard for Distributed Interactive Simulation - Application Protocols
- See Also:
- Serialized Form
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DataFilterRecord
data filter, 32 boolean fieldsprotected MinefieldIdentifier
Minefield IDprotected byte
Number of perimeter points for the minefieldprotected byte
Number of sensor typesprotected byte
padding is an undescribed parameter...protected EntityType
Entity type of mine being requestedprotected List<Vector2Float>
perimeter points of requestprotected byte
request IDprotected EntityID
EID of entity making the requestprotected List<MinefieldSensorType>
Sensor types, each 16-bits longFields inherited from class edu.nps.moves.dis7.pdus.Pdu
exerciseID, length, pduType, protocolFamily, protocolVersion, timestamp
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor creates and configures a new instance object -
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 fordataFilter
int
Returns size of this serialized (marshalled) object in bytesGetter forminefieldID
byte
Getter forpadding
Getter forrequestedMineType
Getter forrequestedPerimeterPoints
byte
Getter forrequestID
Getter forrequestingEntityID
Getter forsensorTypes
void
marshal(DataOutputStream dos)
Serializes an object to a DataOutputStream.void
marshal(ByteBuffer byteBuffer)
Packs an object into the ByteBuffer.setDataFilter(DataFilterRecord pDataFilter)
Setter fordataFilter
setMinefieldID(MinefieldIdentifier pMinefieldID)
Setter forminefieldID
setPadding(byte pPadding)
Setter forpadding
setPadding(int pPadding)
Utility setter forpadding
setRequestedMineType(EntityType pRequestedMineType)
Setter forrequestedMineType
setRequestedPerimeterPoints(List<Vector2Float> pRequestedPerimeterPoints)
Setter forrequestedPerimeterPoints
setRequestID(byte pRequestID)
Setter forrequestID
setRequestID(int pRequestID)
Utility setter forrequestID
setRequestingEntityID(EntityID pRequestingEntityID)
Setter forrequestingEntityID
setSensorTypes(List<MinefieldSensorType> pSensorTypes)
Setter forsensorTypes
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
getPduStatus, 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
-
minefieldID
Minefield ID -
requestingEntityID
EID of entity making the request -
requestID
protected byte requestIDrequest ID -
numberOfPerimeterPoints
protected byte numberOfPerimeterPointsNumber of perimeter points for the minefield -
padding
protected byte paddingpadding is an undescribed parameter... -
numberOfSensorTypes
protected byte numberOfSensorTypesNumber of sensor types -
dataFilter
data filter, 32 boolean fields -
requestedMineType
Entity type of mine being requested -
requestedPerimeterPoints
perimeter points of request -
sensorTypes
Sensor types, each 16-bits long
-
-
Constructor Details
-
MinefieldQueryPdu
public MinefieldQueryPdu()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 classMinefieldFamilyPdu
- Returns:
- serialized size in bytes
- See Also:
- https://en.wikipedia.org/wiki/Marshalling_(computer_science)
-
setMinefieldID
Setter forminefieldID
- Parameters:
pMinefieldID
- new value of interest- Returns:
- same object to permit progressive setters
-
getMinefieldID
Getter forminefieldID
- Returns:
- value of interest
-
setRequestingEntityID
Setter forrequestingEntityID
- Parameters:
pRequestingEntityID
- new value of interest- Returns:
- same object to permit progressive setters
-
getRequestingEntityID
Getter forrequestingEntityID
- Returns:
- value of interest
-
setRequestID
Setter forrequestID
- Parameters:
pRequestID
- new value of interest- Returns:
- same object to permit progressive setters
-
setRequestID
Utility setter forrequestID
- Parameters:
pRequestID
- new value of interest- Returns:
- same object to permit progressive setters
-
getRequestID
public byte getRequestID()Getter forrequestID
- Returns:
- value of interest
-
setPadding
Setter forpadding
- Overrides:
setPadding
in classPduBase
- Parameters:
pPadding
- new value of interest- Returns:
- same object to permit progressive setters
-
setPadding
Utility setter forpadding
- Overrides:
setPadding
in classPduBase
- Parameters:
pPadding
- new value of interest- Returns:
- same object to permit progressive setters
-
getPadding
public byte getPadding()Getter forpadding
- Overrides:
getPadding
in classPduBase
- Returns:
- value of interest
-
setDataFilter
Setter fordataFilter
- Parameters:
pDataFilter
- new value of interest- Returns:
- same object to permit progressive setters
-
getDataFilter
Getter fordataFilter
- Returns:
- value of interest
-
setRequestedMineType
Setter forrequestedMineType
- Parameters:
pRequestedMineType
- new value of interest- Returns:
- same object to permit progressive setters
-
getRequestedMineType
Getter forrequestedMineType
- Returns:
- value of interest
-
setRequestedPerimeterPoints
Setter forrequestedPerimeterPoints
- Parameters:
pRequestedPerimeterPoints
- new value of interest- Returns:
- same object to permit progressive setters
-
getRequestedPerimeterPoints
Getter forrequestedPerimeterPoints
- Returns:
- value of interest
-
setSensorTypes
Setter forsensorTypes
- Parameters:
pSensorTypes
- new value of interest- Returns:
- same object to permit progressive setters
-
getSensorTypes
Getter forsensorTypes
- Returns:
- value of interest
-
marshal
Serializes an object to a DataOutputStream.- Specified by:
marshal
in interfaceMarshaller
- Overrides:
marshal
in classMinefieldFamilyPdu
- 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 classMinefieldFamilyPdu
- 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 classMinefieldFamilyPdu
- 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 classMinefieldFamilyPdu
- 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 classMinefieldFamilyPdu
-
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 classMinefieldFamilyPdu
- Parameters:
obj
- the object to compare to- Returns:
- true if the objects are equal, false otherwise.
-
toString
- Overrides:
toString
in classMinefieldFamilyPdu
-