Today I got my printer server to successfully print an 800 kBytes image. It
is not finished yet, but I wanted to ask about several issues:
The server is implemented in a very simple way: It receives an FS_WRITE message,
then it prints the data in a polling loop, and finally returns to the main
message loop. That way an abort message makes no sense (the server doesn't
receive messages while an I/O is in progress) and is simply ignored. I suppose
a user would not use the printer server directly, but instead one would have
a spooler server (more about spooler servers below) which feeds the printer
server in small chunks, and to abort a print job the spooler server simply
stops feeding chunks. Is this good enough ? Any opinions ?
The handling of the parallel port at the hardware level is implemented as a
C++ class (or rather as a struct, which is really a class without constructor/
destructor). Any reason not to use C++ in VSTa ?
Some thoughts about a spooler server:
A spooler server could look like several directories, representing different
queues. To print a file, you 'cp' it to the appropriate directory, to remove
or abort it, you 'rm' it. 'rm' should also be possible if the printing was
already in progress. If a file is printed successfully, it simply disappears.
Stat fields of these files could show ranking order and stuff like this. The
spooled data could be stored in an mmap()'ed file or in (a) regular file(s)
in a spooling directory, so print jobs would not be lost due to a
system/spooler/printer crash.
A spooling server implemented like this would seem very easy to use, what do
you think ?
Probably the most important question: Is it a good idea to add a sophisticated
printing/spooling system at this time ? Since VSTa internals are still
subject to changes, it could add a considerable amount of maintenance.
Greetings
Robert
Received on Thu Mar 17 03:33:59 1994
This archive was generated by hypermail 2.1.8 : Wed Sep 21 2005 - 21:02:16 PDT