edu.nps.moves.dismobile
Class AggregateStatePdu

java.lang.Object
  extended by edu.nps.moves.dismobile.Pdu
      extended by edu.nps.moves.dismobile.EntityManagementFamilyPdu
          extended by edu.nps.moves.dismobile.AggregateStatePdu
All Implemented Interfaces:
java.io.Serializable

public class AggregateStatePdu
extends EntityManagementFamilyPdu
implements java.io.Serializable

Section 5.3.9.1 informationa bout aggregating entities anc communicating information about the aggregated entities. requires manual intervention to fix the padding between entityID lists and silent aggregate sysem lists--this padding is dependent on how many entityIDs there are, and needs to be on a 32 bit word boundary. UNFINISHED 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  EntityID aggregateID
          ID of aggregated entities
protected  java.util.List<AggregateID> aggregateIDList
          aggregates list
protected  AggregateMarking aggregateMarking
          marking for aggregate; first char is charset type, rest is char data
protected  short aggregateState
          state of aggregate
protected  EntityType aggregateType
          entity type of the aggregated entities
protected  Vector3Double centerOfMass
          center of mass of the aggregation
protected  Vector3Float dimensions
          dimensions of bounding box for the aggregated entities, origin at the center of mass
protected  java.util.List<EntityID> entityIDList
          entity ID list
protected  short forceID
          force ID
protected  long formation
          formation of aggregated entities
protected  int numberOfDisAggregates
          number of aggregates
protected  int numberOfDisEntities
          number of entities
protected  int numberOfSilentAggregateTypes
          number of silent aggregate types
protected  int numberOfSilentEntityTypes
          number of silent entity types
protected  long numberOfVariableDatumRecords
          number of variable datum records
protected  Orientation orientation
          orientation of the bounding box
protected  short pad2
          ^^^padding to put the start of the next list on a 32 bit boundary.
protected  java.util.List<EntityType> silentAggregateSystemList
          silent entity types
protected  java.util.List<EntityType> silentEntitySystemList
          silent entity types
protected  java.util.List<VariableDatum> variableDatumList
          variableDatums
protected  Vector3Float velocity
          velocity of aggregation
 
Fields inherited from class edu.nps.moves.dismobile.Pdu
exerciseID, padding, pduLength, pduType, protocolFamily, protocolVersion, timestamp
 
Constructor Summary
AggregateStatePdu()
          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
 EntityID getAggregateID()
           
 java.util.List<AggregateID> getAggregateIDList()
           
 AggregateMarking getAggregateMarking()
           
 short getAggregateState()
           
 EntityType getAggregateType()
           
 Vector3Double getCenterOfMass()
           
 Vector3Float getDimensions()
           
 java.util.List<EntityID> getEntityIDList()
           
 short getForceID()
           
 long getFormation()
           
 int getMarshalledSize()
           
 int getNumberOfDisAggregates()
           
 int getNumberOfDisEntities()
           
 int getNumberOfSilentAggregateTypes()
           
 int getNumberOfSilentEntityTypes()
           
 long getNumberOfVariableDatumRecords()
           
 Orientation getOrientation()
           
 short getPad2()
           
 java.util.List<EntityType> getSilentAggregateSystemList()
           
 java.util.List<EntityType> getSilentEntitySystemList()
           
 java.util.List<VariableDatum> getVariableDatumList()
           
 Vector3Float getVelocity()
           
 void marshal(java.nio.ByteBuffer buff)
          Packs a Pdu into the ByteBuffer.
 void marshal(java.io.DataOutputStream dos)
           
 void setAggregateID(EntityID pAggregateID)
           
 void setAggregateIDList(java.util.List<AggregateID> pAggregateIDList)
           
 void setAggregateMarking(AggregateMarking pAggregateMarking)
           
 void setAggregateState(short pAggregateState)
           
 void setAggregateType(EntityType pAggregateType)
           
 void setCenterOfMass(Vector3Double pCenterOfMass)
           
 void setDimensions(Vector3Float pDimensions)
           
 void setEntityIDList(java.util.List<EntityID> pEntityIDList)
           
 void setForceID(short pForceID)
           
 void setFormation(long pFormation)
           
 void setNumberOfDisAggregates(int pNumberOfDisAggregates)
          Note that setting this value will not change the marshalled value.
 void setNumberOfDisEntities(int pNumberOfDisEntities)
          Note that setting this value will not change the marshalled value.
 void setNumberOfSilentAggregateTypes(int pNumberOfSilentAggregateTypes)
          Note that setting this value will not change the marshalled value.
 void setNumberOfSilentEntityTypes(int pNumberOfSilentEntityTypes)
          Note that setting this value will not change the marshalled value.
 void setNumberOfVariableDatumRecords(long pNumberOfVariableDatumRecords)
          Note that setting this value will not change the marshalled value.
 void setOrientation(Orientation pOrientation)
           
 void setPad2(short pPad2)
           
 void setSilentAggregateSystemList(java.util.List<EntityType> pSilentAggregateSystemList)
           
 void setSilentEntitySystemList(java.util.List<EntityType> pSilentEntitySystemList)
           
 void setVariableDatumList(java.util.List<VariableDatum> pVariableDatumList)
           
 void setVelocity(Vector3Float pVelocity)
           
 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.dismobile.Pdu
getExerciseID, getLength, getPadding, getPduLength, getPduType, getProtocolFamily, getProtocolVersion, getTimestamp, marshal, marshalWithDisAbsoluteTimestamp, marshalWithDisAbsoluteTimestamp, marshalWithDisRelativeTimestamp, marshalWithDisRelativeTimestamp, marshalWithNpsTimestamp, marshalWithNpsTimestamp, marshalWithUnixTimestamp, marshalWithUnixTimestamp, readUnsignedInt, readUnsignedInt, setExerciseID, setPadding, setPduLength, setPduType, setProtocolFamily, setProtocolVersion, setTimestamp
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

aggregateID

protected EntityID aggregateID
ID of aggregated entities


forceID

protected short forceID
force ID


aggregateState

protected short aggregateState
state of aggregate


aggregateType

protected EntityType aggregateType
entity type of the aggregated entities


formation

protected long formation
formation of aggregated entities


aggregateMarking

protected AggregateMarking aggregateMarking
marking for aggregate; first char is charset type, rest is char data


dimensions

protected Vector3Float dimensions
dimensions of bounding box for the aggregated entities, origin at the center of mass


orientation

protected Orientation orientation
orientation of the bounding box


centerOfMass

protected Vector3Double centerOfMass
center of mass of the aggregation


velocity

protected Vector3Float velocity
velocity of aggregation


numberOfDisAggregates

protected int numberOfDisAggregates
number of aggregates


numberOfDisEntities

protected int numberOfDisEntities
number of entities


numberOfSilentAggregateTypes

protected int numberOfSilentAggregateTypes
number of silent aggregate types


numberOfSilentEntityTypes

protected int numberOfSilentEntityTypes
number of silent entity types


aggregateIDList

protected java.util.List<AggregateID> aggregateIDList
aggregates list


entityIDList

protected java.util.List<EntityID> entityIDList
entity ID list


pad2

protected short pad2
^^^padding to put the start of the next list on a 32 bit boundary. This needs to be fixed


silentAggregateSystemList

protected java.util.List<EntityType> silentAggregateSystemList
silent entity types


silentEntitySystemList

protected java.util.List<EntityType> silentEntitySystemList
silent entity types


numberOfVariableDatumRecords

protected long numberOfVariableDatumRecords
number of variable datum records


variableDatumList

protected java.util.List<VariableDatum> variableDatumList
variableDatums

Constructor Detail

AggregateStatePdu

public AggregateStatePdu()
Constructor

Method Detail

getMarshalledSize

public int getMarshalledSize()
Overrides:
getMarshalledSize in class EntityManagementFamilyPdu

setAggregateID

public void setAggregateID(EntityID pAggregateID)

getAggregateID

public EntityID getAggregateID()

setForceID

public void setForceID(short pForceID)

getForceID

public short getForceID()

setAggregateState

public void setAggregateState(short pAggregateState)

getAggregateState

public short getAggregateState()

setAggregateType

public void setAggregateType(EntityType pAggregateType)

getAggregateType

public EntityType getAggregateType()

setFormation

public void setFormation(long pFormation)

getFormation

public long getFormation()

setAggregateMarking

public void setAggregateMarking(AggregateMarking pAggregateMarking)

getAggregateMarking

public AggregateMarking getAggregateMarking()

setDimensions

public void setDimensions(Vector3Float pDimensions)

getDimensions

public Vector3Float getDimensions()

setOrientation

public void setOrientation(Orientation pOrientation)

getOrientation

public Orientation getOrientation()

setCenterOfMass

public void setCenterOfMass(Vector3Double pCenterOfMass)

getCenterOfMass

public Vector3Double getCenterOfMass()

setVelocity

public void setVelocity(Vector3Float pVelocity)

getVelocity

public Vector3Float getVelocity()

getNumberOfDisAggregates

public int getNumberOfDisAggregates()

setNumberOfDisAggregates

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


getNumberOfDisEntities

public int getNumberOfDisEntities()

setNumberOfDisEntities

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


getNumberOfSilentAggregateTypes

public int getNumberOfSilentAggregateTypes()

setNumberOfSilentAggregateTypes

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


getNumberOfSilentEntityTypes

public int getNumberOfSilentEntityTypes()

setNumberOfSilentEntityTypes

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


setAggregateIDList

public void setAggregateIDList(java.util.List<AggregateID> pAggregateIDList)

getAggregateIDList

public java.util.List<AggregateID> getAggregateIDList()

setEntityIDList

public void setEntityIDList(java.util.List<EntityID> pEntityIDList)

getEntityIDList

public java.util.List<EntityID> getEntityIDList()

setPad2

public void setPad2(short pPad2)

getPad2

public short getPad2()

setSilentAggregateSystemList

public void setSilentAggregateSystemList(java.util.List<EntityType> pSilentAggregateSystemList)

getSilentAggregateSystemList

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

setSilentEntitySystemList

public void setSilentEntitySystemList(java.util.List<EntityType> pSilentEntitySystemList)

getSilentEntitySystemList

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

getNumberOfVariableDatumRecords

public long getNumberOfVariableDatumRecords()

setNumberOfVariableDatumRecords

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


setVariableDatumList

public void setVariableDatumList(java.util.List<VariableDatum> pVariableDatumList)

getVariableDatumList

public java.util.List<VariableDatum> getVariableDatumList()

marshal

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

unmarshal

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

marshal

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

Overrides:
marshal in class EntityManagementFamilyPdu
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 EntityManagementFamilyPdu
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 EntityManagementFamilyPdu

equalsImpl

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

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