edu.nps.moves.dis7mobile
Class MinefieldStatePdu

java.lang.Object
  extended by edu.nps.moves.dis7mobile.PduSuperclass
      extended by edu.nps.moves.dis7mobile.Pdu
          extended by edu.nps.moves.dis7mobile.MinefieldFamilyPdu
              extended by edu.nps.moves.dis7mobile.MinefieldStatePdu
All Implemented Interfaces:
java.io.Serializable

public class MinefieldStatePdu
extends MinefieldFamilyPdu
implements java.io.Serializable

information about the complete minefield. The minefield presence, perimiter, etc. Section 7.9.2 COMPLETE Copyright (c) 2008-2010, MOVES Institute, Naval Postgraduate School. All rights reserved. This work is licensed under the BSD open source license, available at https://www.movesinstitute.org/licenses/bsd.html

Author:
DMcG
See Also:
Serialized Form

Field Summary
protected  int appearance
          appearance bitflags
protected  short forceID
          force ID
protected  MinefieldIdentifier minefieldID
          Minefield ID
protected  Vector3Double minefieldLocation
          location of center of minefield in world coords
protected  EulerAngles minefieldOrientation
          orientation of minefield
protected  int minefieldSequence
          Minefield sequence
protected  EntityType minefieldType
          type of minefield
protected  java.util.List<EntityType> mineType
          Type of mines
protected  int numberOfMineTypes
          how many mine types
protected  short numberOfPerimeterPoints
          Number of permieter points
protected  java.util.List<Vector2Float> perimeterPoints
          perimeter points for the minefield
protected  int protocolMode
          protocolMode.
 
Fields inherited from class edu.nps.moves.dis7mobile.Pdu
padding, pduStatus
 
Fields inherited from class edu.nps.moves.dis7mobile.PduSuperclass
exerciseID, length, pduType, protocolFamily, protocolVersion, timestamp
 
Constructor Summary
MinefieldStatePdu()
          Constructor
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 boolean equalsImpl(java.lang.Object obj)
          Compare all fields that contribute to the state, ignoring transient and static fields, for this and the supplied object
 int getAppearance()
           
 short getForceID()
           
 int getMarshalledSize()
           
 MinefieldIdentifier getMinefieldID()
           
 Vector3Double getMinefieldLocation()
           
 EulerAngles getMinefieldOrientation()
           
 int getMinefieldSequence()
           
 EntityType getMinefieldType()
           
 java.util.List<EntityType> getMineType()
           
 int getNumberOfMineTypes()
           
 short getNumberOfPerimeterPoints()
           
 java.util.List<Vector2Float> getPerimeterPoints()
           
 int getProtocolMode()
           
 void marshal(java.nio.ByteBuffer buff)
          Packs a Pdu into the ByteBuffer.
 void marshal(java.io.DataOutputStream dos)
           
 void setAppearance(int pAppearance)
           
 void setForceID(short pForceID)
           
 void setMinefieldID(MinefieldIdentifier pMinefieldID)
           
 void setMinefieldLocation(Vector3Double pMinefieldLocation)
           
 void setMinefieldOrientation(EulerAngles pMinefieldOrientation)
           
 void setMinefieldSequence(int pMinefieldSequence)
           
 void setMinefieldType(EntityType pMinefieldType)
           
 void setMineType(java.util.List<EntityType> pMineType)
           
 void setNumberOfMineTypes(int pNumberOfMineTypes)
          Note that setting this value will not change the marshalled value.
 void setNumberOfPerimeterPoints(short pNumberOfPerimeterPoints)
          Note that setting this value will not change the marshalled value.
 void setPerimeterPoints(java.util.List<Vector2Float> pPerimeterPoints)
           
 void setProtocolMode(int pProtocolMode)
           
 void unmarshal(java.nio.ByteBuffer buff)
          Unpacks a Pdu from the underlying data.
 void unmarshal(java.io.DataInputStream dis)
           
 
Methods inherited from class edu.nps.moves.dis7mobile.Pdu
getPadding, getPduStatus, marshal, setPadding, setPduStatus
 
Methods inherited from class edu.nps.moves.dis7mobile.PduSuperclass
getExerciseID, getLength, getPduType, getProtocolFamily, getProtocolVersion, getTimestamp, setExerciseID, setLength, setPduType, setProtocolFamily, setProtocolVersion, setTimestamp
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

minefieldID

protected MinefieldIdentifier minefieldID
Minefield ID


minefieldSequence

protected int minefieldSequence
Minefield sequence


forceID

protected short forceID
force ID


numberOfPerimeterPoints

protected short numberOfPerimeterPoints
Number of permieter points


minefieldType

protected EntityType minefieldType
type of minefield


numberOfMineTypes

protected int numberOfMineTypes
how many mine types


minefieldLocation

protected Vector3Double minefieldLocation
location of center of minefield in world coords


minefieldOrientation

protected EulerAngles minefieldOrientation
orientation of minefield


appearance

protected int appearance
appearance bitflags


protocolMode

protected int protocolMode
protocolMode. First two bits are the protocol mode, 14 bits reserved.


perimeterPoints

protected java.util.List<Vector2Float> perimeterPoints
perimeter points for the minefield


mineType

protected java.util.List<EntityType> mineType
Type of mines

Constructor Detail

MinefieldStatePdu

public MinefieldStatePdu()
Constructor

Method Detail

getMarshalledSize

public int getMarshalledSize()
Overrides:
getMarshalledSize in class MinefieldFamilyPdu

setMinefieldID

public void setMinefieldID(MinefieldIdentifier pMinefieldID)

getMinefieldID

public MinefieldIdentifier getMinefieldID()

setMinefieldSequence

public void setMinefieldSequence(int pMinefieldSequence)

getMinefieldSequence

public int getMinefieldSequence()

setForceID

public void setForceID(short pForceID)

getForceID

public short getForceID()

getNumberOfPerimeterPoints

public short getNumberOfPerimeterPoints()

setNumberOfPerimeterPoints

public void setNumberOfPerimeterPoints(short pNumberOfPerimeterPoints)
Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose. The getnumberOfPerimeterPoints method will also be based on the actual list length rather than this value. The method is simply here for java bean completeness.


setMinefieldType

public void setMinefieldType(EntityType pMinefieldType)

getMinefieldType

public EntityType getMinefieldType()

getNumberOfMineTypes

public int getNumberOfMineTypes()

setNumberOfMineTypes

public void setNumberOfMineTypes(int pNumberOfMineTypes)
Note that setting this value will not change the marshalled value. The list whose length this describes is used for that purpose. The getnumberOfMineTypes method will also be based on the actual list length rather than this value. The method is simply here for java bean completeness.


setMinefieldLocation

public void setMinefieldLocation(Vector3Double pMinefieldLocation)

getMinefieldLocation

public Vector3Double getMinefieldLocation()

setMinefieldOrientation

public void setMinefieldOrientation(EulerAngles pMinefieldOrientation)

getMinefieldOrientation

public EulerAngles getMinefieldOrientation()

setAppearance

public void setAppearance(int pAppearance)

getAppearance

public int getAppearance()

setProtocolMode

public void setProtocolMode(int pProtocolMode)

getProtocolMode

public int getProtocolMode()

setPerimeterPoints

public void setPerimeterPoints(java.util.List<Vector2Float> pPerimeterPoints)

getPerimeterPoints

public java.util.List<Vector2Float> getPerimeterPoints()

setMineType

public void setMineType(java.util.List<EntityType> pMineType)

getMineType

public java.util.List<EntityType> getMineType()

marshal

public void marshal(java.io.DataOutputStream dos)
Overrides:
marshal in class MinefieldFamilyPdu

unmarshal

public void unmarshal(java.io.DataInputStream dis)
Overrides:
unmarshal in class MinefieldFamilyPdu

marshal

public void marshal(java.nio.ByteBuffer buff)
Packs a Pdu into the ByteBuffer.

Overrides:
marshal in class MinefieldFamilyPdu
Parameters:
buff - The ByteBuffer at the position to begin writing
Throws:
java.nio.BufferOverflowException - if buff is too small
java.nio.ReadOnlyBufferException - if buff is read only
Since:
??
See Also:
ByteBuffer

unmarshal

public void unmarshal(java.nio.ByteBuffer buff)
Unpacks a Pdu from the underlying data.

Overrides:
unmarshal in class MinefieldFamilyPdu
Parameters:
buff - The ByteBuffer at the position to begin reading
Throws:
java.nio.BufferUnderflowException - if buff is too small
Since:
??
See Also:
ByteBuffer

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class MinefieldFamilyPdu

equalsImpl

public boolean equalsImpl(java.lang.Object obj)
Description copied from class: PduSuperclass
Compare all fields that contribute to the state, ignoring transient and static fields, for this and the supplied object

Overrides:
equalsImpl in class MinefieldFamilyPdu
Parameters:
obj - the object to compare to
Returns:
true if the objects are equal, false otherwise.