Apple 310 manual Status Queries and Spontaneous Messages

Page 67

C H A P T E R 3

Communication Channels

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

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.

Status Queries and Spontaneous Messages

55

Image 67
Contents Apple LaserWriter Select 310 Printer Limited Warranty on Media and Replacement Contents Page Communication Channels Page Figures and Tables Page What This Note Contains About This NoteOther Reference Material Conventions Used in This NoteApda For More InformationPage LaserWriter Select Hardware1 LaserWriter Select 310 Hardware ROM Serial Port for RS-232C Devices Communication Ports2An 8-pin serial port connector Centronics Parallel ConnectorPstrobe Signal Status Lights ROM Capability Memory CapabilitiesBasic Operation Batch ModeDram Expansion Types Interactive ModePaper Handling 7Paper handling options Page LaserWriter Select 310 Software Adobe PostScript Programming Language Software OverviewPostScript Interpreter Types LaserWriter Select 310 DriverSelects the paper tray containing A4-size paper and sets Compatibility Operators Software ParametersProduct Strings Communication Device ParametersStatusdict Setting Compatibility Operators Device Idlefonts Setting System ParametersCheckpassword DefaulttimeoutsRamsize PrinternameProduct ProductASetpassword SetdefaulttimeoutsSetidlefonts Setprintername Setting Page Device ParametersDefaultmultipurposetraysize DefaultpapertrayPagestackorder ManualfeedtimeoutManualfeed MarginsPapersize SetdefaultmultipurposepapertraysizePapertray Setdostartpage SetdefaultpapertraySetmargins Setpagetype SetpagestackorderSetpapertray Jobname Setting User ParametersJobtimeout SetjobtimeoutWaittimeout Setting Device ParametersSetsoftwareiomode Softwareiomode Setting Communication ParametersPacketbackchannel Setpacketbackchannel SccbatchSetsccbatch Setting Engine Device ParametersDarkness Currentpacking Setting Extensions to PostScript LevelSetdarkness CurrentcacheparamsSetcacheparams PackedarraySetpacking Printer Error ParameterPostScript Language Changes PrintererrorPacked Arrays Versus Ordinary Arrays Packed ArraysCreating Packed Arrays Immediately Evaluated Names Changes in Font Cache Operation Device Resolution ImagesEnd-of-Line Recognition New Operators TrueType FontsCommunication Channels Baud Rates Serial CommunicationFlow Control Parity SettingsDTR Flow Control XON/XOFF Flow Control SCC Operator EncodingSimple Communication Protocol Communication ProtocolsBinary Communication Protocol SOH CTL-A Parallel Interface Communicating with an IBM PCDTR Flow Control for PC Communication Serial InterfaceXON/XOFF Flow Control for PC Communication Communication DynamicsStatus Queries and Spontaneous Messages Errorerror OffendingCommand operator %%