|
The Physiologist's Friend Simulation API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.unizh.ini.friend.simulation.AbstractAcceptsInput
ch.unizh.ini.friend.simulation.AbstractMonitor
ch.unizh.ini.friend.record.SimulationReporter
public class SimulationReporter
Generates a SpikeEvent
when it detects that the simulation's
monitored cell
has made a spike.
An instance of this class is constructed
in the SimulationSetupFactory
for each simulation type (color, luminance, etc.)
FriendGUI
sets the monitored cell based on the user's menu choice of cell,
and when recording is activated, it adds listeners for the appropriate monitor.
#see SpikeReporter
Field Summary |
---|
Fields inherited from class ch.unizh.ini.friend.simulation.AbstractAcceptsInput |
---|
inputs |
Constructor Summary | |
---|---|
SimulationReporter(SimulationSetup setup)
Creates a new instance of SpikeEventMonitor |
Method Summary | |
---|---|
void |
addSpikeListener(SpikeListener listener)
add a listener for all spikes. |
void |
clearSpikeListeners()
remove all listeners |
void |
compute(float dt)
Computes the new state of this component of the simulation. |
Collection |
getSpikeListeners()
|
boolean |
isReporting()
|
void |
removeSpikeListener(SpikeListener listener)
removes a listener |
void |
startReporting()
starts acquisition of spikes and generation of SpikeEvent 's. |
void |
stopReporting()
removes all spike event listeners, ends thread after first stopping microphone acquisition. |
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 |
Constructor Detail |
---|
public SimulationReporter(SimulationSetup setup)
Method Detail |
---|
public void compute(float dt)
compute
in interface Updateable
dt
- The time that has passed since the last invocation.public void addSpikeListener(SpikeListener listener)
called
when a spike occurs and are passed a SpikeEvent
.
addSpikeListener
in interface SpikeEventSource
listener
- the listenerpublic void clearSpikeListeners()
clearSpikeListeners
in interface SpikeEventSource
public Collection getSpikeListeners()
getSpikeListeners
in interface SpikeEventSource
public void removeSpikeListener(SpikeListener listener)
removeSpikeListener
in interface SpikeEventSource
listener
- to removepublic void startReporting()
SpikeEvent
's. If source is not available it does nothing.
startReporting
in interface SpikeReporter
public void stopReporting()
SpikeEvent
's
stopReporting
in interface SpikeReporter
public boolean isReporting()
isReporting
in interface SpikeReporter
|
http://www.ini.unizh.ch/~tobi/friend | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |