next up previous
Next: ProcessWriter Up: Class Library Previous: ProcessContainer

ProcessReader

This is a base class for simulator elements that need to read input from a file. It adds a simple mechanism for connecting the simulation to test vector input files. The actual reading is done by a user written derived class, but this base class provides useful functionality for control over opening of files, and a flag for what type of input to expect. A typical ProcessReader will probably have no input ports, but will provide one or more output ports, although there is no restriction on either, as it still has all the capabilities of a ProcessElement.


One new method provided here is inputFromFile. This is used to connect the object to an input file, also telling it which file format to expect, if more than one exists. In order to actually read a file, a pure virtual method readInput is provided. This is overridden by a user class of this type to read in the next chuck of data in order to drive the outputs.



M.P.J.Landon 2003-05-15