next up previous contents
Next: Allocating a file queue Up: Organization Previous: The configuration file config.hh

Performing I/O in WARPED

WARPED allows for file input and output from simulation objects which behave as one would wish with respect to TimeWarp. That is, the FileQueue class is handled properly by the WARPED kernel during garbage collection and rollback. Currently, files may only be opened for output; support for input files is not integrated into the kernel yet. If a simulation object needs an output file during simulation, it must inform the TimeWarp kernel of this prior to the beginning of execution. A good place to do this is in the simulation object's constructor. Three tasks must be accomplished; informing the kernel of the number of files needed, creating the proper number of FileQueues, and informing each FileQueue the name of the physical file it is associated with. The number of output files is stored in a kernel variable named numOutFiles, while a pointer to a FileQueue named outFileQ acts as an access point for an array of FileQueues.



 

Philip A. Wilsey
1/26/1998