Status queries and spontaneous messages, Status queries and spontaneous messages 3 – Apple LaserWriter Select 310 Printer User Manual
Page 67
C H A P T E R 3
Communication Channels
Status Queries and Spontaneous Messages
55
Typically, characters written to the standard output file by PostScript operators, such as
print
, are not sent immediately. They are buffered until a flush is executed. A flush
occurs automatically
■
at the end of a job
■
in interactive mode, whenever the user is prompted to make an entry
If a PostScript language program writes data that is needed immediately by the host, for
example a reply to an environmental query, it is important to flush after writing the data.
Otherwise, a deadlock may occur.
Status Queries and Spontaneous Messages
3
The LaserWriter Select 310 printer provides a status query facility that enables the host or
user to determine what the printer is doing. The printer responds to a status query
asynchronously with respect to normal job execution. That is, it sends a response
immediately, regardless of what has gone on before, or how much input data has been
buffered. This facility primarily enables spoolers (printer control programs) to track the
activities of the LaserWriter Select 310 printers under their control.
If the printer receives a CTL-T character from the active input channel, it replies with a
one-line status message over the active port’s output channel. The message is bracketed
by the text sequences %%[ and ]%%, to enable the host software to extract the message
from the ordinary data generated by the job being executed.
The status message has standardized syntax that is intended to be machine readable. It
consists of one or more key, value pairs separated by semicolons. For example:
%%[job: Jane's report; status: busy; source: serial 9]%%
The possible keys, values, and meanings are as follows:
job
The name of the job is stored as jobname entry in statusdict. (See
Chapter 2.) This field is omitted if the current job has not defined jobname.
status
Indicates what the printer is currently doing:
■
idle
indicates there is no job in progress
■
busy
means the printer is executing the user’s PostScript
language program
■
waiting
means that the I/O is waiting in the middle of a job
■
printing indicates that the printer is printing, and that paper is
in motion
■
PrinterError:
reason means that there is a printer error such as a
paper jam or printer out of paper.
■
initializing
indicates the printer is starting up
source
serial 9
or Centronics indicates the source of the job that the server is
currently executing. This field is omitted if the server is idle.