beautypg.com

Binary communication protocol, Binary communication protocol 3 – Apple LaserWriter Select 310 Printer User Manual

Page 62

background image

C H A P T E R 3

Communication Channels

50

Communication Protocols

The serial and parallel communication handlers perform the special processing of the
return and line-feed characters, as described in Table 3-4. This processing is independent
of the return and line-feed handling performed by the PostScript interpreter itself. Unlike
the processing done at the level of the PostScript interpreter, this processing is done
regardless of how the data is to be treated by the interpreter.

With the simple protocol, there is no way to ‘quote’ the reserved characters, that is to pass
them through to the PostScript interpreter. Nor is there any way to transmit characters in
the 'high ASCII' range (128–255) when using parity settings 0, 1, and 2, which cause the
high-order bit of each character to be ignored or used for parity. Therefore, with this
protocol, the communication link is not fully transparent. This causes no difficult in
normal use, however, since the standard PostScript language character set consists
entirely of printable characters. The language itself provides means for encoding
arbitrary characters in strings (the ‘\nnn’ escape sequence).

When the server encounters an end-of-file character and the job terminates, the server
sends an end-of-file character back to the host. This character marks the end of the data
(if any) written to the standard output file while the job was being executed. This enables
the application program running on the host computer to synchronize with the server, if
this is desired, and to correlate a given output batch with the job that generated it.

Binary Communication Protocol

3

As an alternate to the simple protocol, the LaserWriter Select 310 printer supports binary
protocol for both the serial and parallel channels. Binary protocol allows all character
codes to be transmitted as data, but also allows certain characters to be used for
specifying control functions, which may be handled asynchronously by the
communications driver. These functions include status requests, aborting of jobs,
end-of-job markers, and flow control for the serial channel.

Control-Q

17

Start output (XON). Function only if XON/XOFF flow control
is in use.

Control-T

20

Status query. Causes the server to produce a one-line message
that describes what the server is doing.

Return

13

End of line. Translated to the PostScript language newline
character.

Line-feed

10

End of line. This is the PostScript language newline character.
If a return and a line-feed are received in sequence, only one
newline

character is passed to the PostScript interpreter.

When a newline character is written to the standard output
file, it is translated to the two-character sequence: return and
line-feed.

Table 3-4

Reserved characters in simple communication protocol (continued)

Character

ASCII
code

Function