þa‹Rþw+þ mO<þhý oþ nSystem-wideGRiDFEC automatic received file printing (AutoPrint) Proposal I. Technical Description A. Requirements 1. Users want the GRiDFEC software to be able to print received files automatically, without manual intervention. We will call this capability "AutoPrint". 2. Given the emphasis users place on file transfer speed, running AutoPrint should not reduce transfer speed significantly. 3. Given the limited amount of free RAM available when GRiDFEC is running on some user systems, the AutoPrint software should use the minimum amount of RAM reasonably possible. 4. Because files can easily be received faster than they can be printed, AutoPrint should keep a queue by name of the files waiting to be printed. The queue should be First-In First-Out, meaning files are printed in the order they are put in the queue. 5. AutoPrint should should put margins on printed pages. It should use the margins in the files GRiD common properties if the file being printed has any; otherwise it should use reasonable default margins. AutoPrint should print a form feed after a file is done printing, so that each file starts printing at the top of a page. 6. AutoPrint should obey the GRiDWrite formatting commands, because users put format commands in most of their text files. In effect, AutoPrint should do a GRiDWrite "Format", as opposed to a "Print". 7. AutoPrint should be user controllable in 5 ways: a. Whether it is on or off, meaning whether it will queue received files for printing. b. When it is turned off, whether it will print the files already queued for printing before stopping or dispose of the queue and stop immediately. c. Whether it will initially be on or off each time GRiDFEC is started. d. A control to make it immediately stop printing (abort) the file currently being printed. e. Whether to insert the delays in printing needed when using a GPIB interfaced printer. 8. AutoPrint should not print files that it makes no sense to print, like program files and graphics files. 9. AutoPrint should work well with printers used by the user community, such as the HP LaserJet with serial and parallel interfaces, and the HP ThinkJet with parallel and GPIB interfaces. B. Specifications 1. Automatic received file printing (AutoPrint) will be implemented with a forked process in the background portion of GRiDFEC (the GFECCOM~Run~ program). The AutoPrint process will run at a weaker priority than all other processes in GRiDFEC, so it will use only processor time not needed by other processes. 2. A queue containing the names of files to be printed will be kept. Files will be printed in the order that they are added to the queue. AutoPrint will print only complete files stored on a mass storage device, so each file will be queued for printing only when it is completely received. If a file is not accessable when it's turn to be printed comes, because it is not there or it is locked, it will be removed from the queue and will not be printed. 3. AutoPrint will examine each file in the queue to determine whether it should be printed, using the follwing method: It will first skip any GRiD common properties at the beginning of the file. Then it will examine the next 512 bytes of the file. Files with more than 5 unprintable characters in that 512 will not be printed. Unprintable characters are those with values over 128 or under 32, excepting CR and LF. 4. AutoPrint will read the print options out of a file's GRiD common properties, if it has any, and will attempt to obey those print options, within the capabilities of the printer. AutoPrint will obey all GRiDWrite formatting commands except ^IF and ^SI when printing files, within the capabilities of the printer. These formatting commands to include other files will be ignored. AutoPrint will not understand file formats or formatting commands for any word processor other than GRiDWrite. 5. AutoPrint will use the printer driver loaded in InteGRiD/GRiD-OS, which is normally the current printer selected in the options menu in GRiDManager. A printer driver must be loaded and the appropriate printer must be present and properly set up for AutoPrint to print properly. 6. AutoPrint will read the file being printed in from a mass storage device in blocks of 512 bytes. Each block will be formatted and printed, then the next block will be read in, until all blocks have been printed. AutoPrint will be able to stop, on user command, between blocks. If an error occurs in reading from the file, AutoPrint will give up on the file and move to the next file in the queue. If an error occurs in outputting to the printer, AutoPrint will display an error message in the usual way for the GRiDFEC background program, then loop, waiting and retrying the printer, until the error goes away and it can continue printing. 7. AutoPrint will have a user settable capability to insert delays in printing so that it can drive a GPIB interfaced printer without interfering with GPIB based mass storage devices by keeping the GPIB busy most of the time. Delays will be inserted at the end of each line printed and after each form feed printed. 8. The user will control AutoPrint through a form accessed through a "Set AutoPrint Parameters" selection in the "Set GRiDFEC Parameters" menu in the GRiDFEC foreground program (GFECIFC~Run~). The form will have the following fields in it: Abort file now printing Yes/No Abort all files waiting to print Yes/No AutoPrint incoming files Yes/No AutoPrint when GRiDFEC is started Yes/No Do special delays for GPIB printer Yes/No The settings of the fourth and fifth fields will be saved in the configuration file, and used automatically each time GRiDFEC is started. The answers to the first three questions will only affect the way AutoPrint is currently running. 9. When the GRiDFEC background program (GFECCOM~Run~) is stopped, the list of files awaiting printing will be lost, and hence AutoPrint will not print the files the next time GRiDFEC is started. The files themselves will not be lost, just the list. 10. It will not be possible to AutoPrint on a GRiDServer based printer, because the GRiDLink or PhoneLink server communication would interfere too much with GRiDFEC communication. AutoPrint will print slowly during periods of heavy GRiDFEC communication, because most of the computers processor time will be spend communicatying. 11. AutoPrint will OsDetach the printer while it has no files to print, so that other applications may use the printer. While AutoPrint is printing, other applications will not be able to print. While other applications are printing, AutoPrint will not be able to print. If AutoPrint cannot OsAttach the printer when it receives a file to print, it will loop, trying to OsAttach the printer and then waiting a while, until it gets the printer. II. Estimates A. Effort Tasks Hours design 8 create printing process 32 modify and integrate format code 40 add control logic to user interface 24 add control flag to configuration file 8 debug and test 48 document 8 total 168 B. Additional computer resources required while running GRiDFEC Function Size in Kilobytes basic queueing and printing 5 formatting 20 user interface 4 help documentation in program 2 total 31