
DoubleReader |
ptolemy.actor.lib.DoubleReader |
This actor reads tokens from an URL, and output them. Each entry in
the file corresponds to one iteration. If there are multiple fires in
the iteration, the same token will be repeated. This actor has a
multiport, where each port corresponds to one column in the data file.
The file format at the URL is assumed as the following. A newline
character separates the rows, and a tab or a space character separates
the columns.
The sourceURL parameter should be set to the name of the
file, specified as a fully qualified URL. If the sourceURL
parameter is an empty string, then the System.in is used for input.
It is possible to load a file from the local file system by using the
prefix "file://" instead of "http://". Relative file paths are
allowed. To specify a file relative to the current directory, use
"../" or "./". For example, if the current directory contains a file
called "test.txt", then sourceURL should be set to
"file:./test.txt". If the parent directory contains a file called
"test.txt", then sourceURL should be set to
"file:../test.txt". To reference the file test.txt, located at
"/tmp/test.txt", sourceURL should be set to
"file:///tmp/test.txt" The default value is "file:///tmp/test.txt".
FIXME: The type of the output ports is set to Double for now.
It should read a line in the prefire() and refer the type
from there.
FIXME: Reader should read in expressions and serialized tokens
Author(s): Jie Liu, Christopher Hylands
Version:$Id: DoubleReader.java,v 1.26 2005/07/08 19:55:58 cxh Exp $
Pt.Proposed Rating:Red (liuj)
Pt.Accepted Rating:Red (liuj)