Class DataCallbackAggregator

java.lang.Object
  extended by DataCallbackAggregator
All Implemented Interfaces:
ISimUICallback

public class DataCallbackAggregator
extends java.lang.Object
implements ISimUICallback

Implementation of callback to accumulate data collection routines

Since:
1.0

Constructor Summary
DataCallbackAggregator()
           
 
Method Summary
 void addCallback(ISimUICallback toAdd)
           
 boolean doCallback(double[] arrLfState, IAgent agent, StateBundle[] arrStates, ISensor[] arrSensors, IEnvironment env, CommGraph graph, double lfSimTime)
          Callback function
 java.lang.Object getLastObject()
          In case we need more info then true/false from doCallback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataCallbackAggregator

public DataCallbackAggregator()
Method Detail

addCallback

public void addCallback(ISimUICallback toAdd)

doCallback

public boolean doCallback(double[] arrLfState,
                          IAgent agent,
                          StateBundle[] arrStates,
                          ISensor[] arrSensors,
                          IEnvironment env,
                          CommGraph graph,
                          double lfSimTime)
Callback function

Specified by:
doCallback in interface ISimUICallback
Parameters:
arrLfState - state vector (initially initial state, overwritten with final state)
agent - agent mapping (currently only support for homogenous swarms )
arrStates - non-position components of state of each agent (logic vars and control function)
arrSensors - array of sensor interfaces.
env - environment
graph - new communication graph (if an update is needed pass null otherwise)
lfSimTime - current simulated time
Returns:
true if something unusual has happened

getLastObject

public java.lang.Object getLastObject()
In case we need more info then true/false from doCallback

Specified by:
getLastObject in interface ISimUICallback
Returns:
arbitrary object (meaning depends on derived class)