Print Buffer Flow - TransAct POSjet 1500 Programmer's Manual

Transact posjet 1500: software guide
Hide thumbs Also See for POSjet 1500:
Table of Contents

Advertisement

Programmer' s Guide

Print Buffer Flow

The following chart illustrates how the communications driver acquires data from the serial port and places it in the
buffer using Ready/Busy or XON/XOFF flow control.
Wait for data from the
Place data in the print
The top of the chart shows that the driver is waiting for data. When data is received from the host, the printer checks
to see if it is an inquire command. If the data is an inquire, it is responded to and placed in the buffer. If not, the
data is placed in the buffer without response. The buffer is then checked to see if it is full before the internal pointer
is incremented. If it is not full, the pointer is incremented in preparation for the next data byte. The buffer is
checked by looking to see if it has passed a high watermark. If the buffer has, the communication driver is notified,
and it resets DTR to indicate to the host that no more data should be sent. This chart also illustrates how the print
control software takes data from the buffer and controls flow. At the top of the chart, the print control software asks
for data. If there is no data in the buffer, a "no data flag" is returned. The print software must then wait for data. If
there is data in the buffer, it is read, and the pointers are updated. The buffer is then checked to see how much
information is left. If the buffer is below a low watermark (about 100 bytes left), the communication driver is
notified, and DTR is reasserted.
When XON/XOFF flow control is used, the flow is similar to DTR flow except that DTR is not used and
XON/XOFF control characters are transmitted back to the host on the serial link. The XON/XOFF advantage is that
only three wires are required to interconnect to a printer. The disadvantage is that a serial-port receiver driver must
be written for the host.
Nov-07
POSjet
host.
buffer.
Is the
buffer full?
No
Update the buffer
pointers.
Is the buffer
Yes
past the high
watermark?
No
Flow Chart 1 Serial Buffer Operation
Rev M
®
1500
Yes
Clear the DTR signal or
transmit XOFF.
Port Protocols and
Connection Specifics
Page 261

Advertisement

Table of Contents
loading

Table of Contents