|
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.record.SpikeLogger
public class SpikeLogger
Logs SpikeEvent
's to a File
. The spikes times are logged along with the string representation of an artibtray object that
is passed on construction. To use this class, create a SpikeLogger
, open()
it, and add
the SpikeLogger
as a SpikeListener
to the reporter.
File format
Comments have '#' in first character of line. Header line has date of creation and creator class. Data is logged as 1 spike/line. If an object is passed to append to spikes times, spikes times are followed by ',' and object. For example
# SpikeLogger ... 320 450or
# SpikeLogger ... 32,16,43 1500,54,879 # SpikeLogger ...
Constructor Summary | |
---|---|
SpikeLogger(File f)
|
|
SpikeLogger(File f,
Object o)
|
Method Summary | |
---|---|
void |
close()
closes the file. |
void |
open()
open the file for output. |
void |
spikeOccurred(SpikeEvent e)
called by spike source ( SpikeReporter ) when a spike is detected |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpikeLogger(File f)
public SpikeLogger(File f, Object o)
Method Detail |
---|
public void open() throws IOException
IOException
public void close() throws IOException
IOException
public void spikeOccurred(SpikeEvent e)
SpikeReporter
) when a spike is detected
spikeOccurred
in interface SpikeListener
e
- the spike event
|
http://www.ini.unizh.ch/~tobi/friend | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |