|
Software flow control is a method of flow control where special codes (Xon and Xoff) are transmitted over the communications channel itself, instead of via dedicated out-of-band signals. The receiver sends the Xoff signal to indicate to the transmitter that it is unable to accept any more data at that time. Once this condition clears (usually because the receiving device has completed earlier commands sent to it) the receiver may restart the data transmission by sending an Xon signal to request the continuation of data transmission. The ASCII character set does not specifically reserve any characters for use with Xon/Xoff signalling. However, four characters (DC1-DC4, with codes 11-14 Hex) were reserved as 'device control' characters. The ASR-33 Teletype adopted two of these characters, DC1 and DC3 (codes 11 and 13, or ^S and ^Q in caret notation) for use as Xon and Xoff characters respectively. These codes were copied by other devices and are now a de facto standard. Comparison with hardware flow controlThe principal advantage of software flow control is the reduction in the number of connections between sender and receiver. Given a common ground, only two signals are needed, one to send and the other to receive. Hardware flow control requires additional wires between the two devices. However, software flow control is not without its problems. A 'busy' signal requires at least one character time to transmit compared with a hardware signal which may be asserted almost instantaneously. As the name "software flow control" implies, flow control using this method is usually implemented in software which can cause further delays in processing a request to stop transmitting. Hardware flow control is typically under the direct control of the transmitting UART which is able to cease transmission immediately without the intervention of the host computer. Finally, as a form of in-band signaling care must be taken to ensure that that the Xon and Xoff characters do not appear in the data transmitted between the two devices. If this may happen such data must be encoded in some manner, usually with the result that the amount of data to be transmitted increases and the effective throughput of the connection falls. Common UsesSoftware flow control is used extensively by low speed serial devices such as printers to indicate they are temporarily unable to accept more data. It may also be used with serial terminals to signal when a terminal cannot receive any more data, although terminal control packages such as termcap typically use padding to ensure that the terminal is allowed sufficent time to perform the requested actions without the need to assert Xoff. The system console on modern Unix and Linux machines, as well as terminal emulators such as xterm, typically also support these codes as part of their serial terminal emulation. These codes may be manually entered at the keyboard (via Ctrl-S and Ctrl-Q) to temporarily pause and restart output. References
|
This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License.
Mercedes Car
This site monitored by SitePinger.net