The Physiologist's Friend Simulation API

ch.unizh.ini.friend.simulation
Class SimpleOutputMonitor

java.lang.Object
  extended by ch.unizh.ini.friend.simulation.AbstractAcceptsInput
      extended by ch.unizh.ini.friend.simulation.AbstractMonitor
          extended by ch.unizh.ini.friend.simulation.SimpleOutputMonitor
All Implemented Interfaces:
AcceptsInput, Updateable, Serializable

public class SimpleOutputMonitor
extends AbstractMonitor

Provides synchronization between the gui and the simulation needed for the gui to monitor the output of a simulation component.

Version:
$Revision: 1.11 $
Author:
Christof Marti
See Also:
Serialized Form

Nested Class Summary
static class SimpleOutputMonitor.Deliverable
          An abstract class whose heirs' instances can be passed to invokeLater() by an instance of SimpleOutputMonitor.
 
Field Summary
protected  SimpleOutputMonitor.Deliverable deliverable
          The prototype of the deliverable.
protected  long nextUpdate
          The time of the next update.
protected  long updateInterval
          The update interval in milliseconds.
 
Fields inherited from class ch.unizh.ini.friend.simulation.AbstractAcceptsInput
inputs
 
Constructor Summary
SimpleOutputMonitor(SimpleOutputMonitor.Deliverable deliverable)
          Creates a new instance of SimpleOutputMonitor
SimpleOutputMonitor(SimpleOutputMonitor.Deliverable deliverable, ServesOutput input)
          Creates a new instance of SimpleOutputMonitor with the given input.
 
Method Summary
 void compute(float dt)
          Computes the new state of this component of the simulation.
 
Methods inherited from class ch.unizh.ini.friend.simulation.AbstractMonitor
getInput, getInputs, setInput, setInputs, update
 
Methods inherited from class ch.unizh.ini.friend.simulation.AbstractAcceptsInput
averageInputs, cloneObject, connectOneToAll, connectOneToOne, getCollectionInstance, integrateInputs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deliverable

protected SimpleOutputMonitor.Deliverable deliverable
The prototype of the deliverable.


updateInterval

protected long updateInterval
The update interval in milliseconds.


nextUpdate

protected long nextUpdate
The time of the next update.

Constructor Detail

SimpleOutputMonitor

public SimpleOutputMonitor(SimpleOutputMonitor.Deliverable deliverable)
Creates a new instance of SimpleOutputMonitor


SimpleOutputMonitor

public SimpleOutputMonitor(SimpleOutputMonitor.Deliverable deliverable,
                           ServesOutput input)
Creates a new instance of SimpleOutputMonitor with the given input.

Method Detail

compute

public void compute(float dt)
Computes the new state of this component of the simulation.

Parameters:
dt - The time that has passed since the last invocation.

http://www.ini.unizh.ch/~tobi/friend