HPlogo Asynchronous Serial Communications Programmer's Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 8 Intrinsics Reference

FCONTROL(41)

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Parameters

controlcode

41 — Enables transparent editing.

param

16-bit unsigned integer by reference (required)

Passes a value to be used as a subsystem break character in bits (0:8) and a value to be used as a read terminator in bits (8:8).

Returns the values previously assigned for use as subsystem break and read terminator characters.

Notes

An FCONTROL call with a controlcode value of 41 will place a terminal in transparent editing mode. Also called unedited mode, this facility allows most special characters to be read and treated as data. Unlike binary mode, however, which allows no special character processing to occur, transparent mode allows a small subset of special characters to retain their meaning. These characters are listed in Table 8-6 “Special Characters for Transparent Editing”.

In addition to the characters shown in Table 8-6 “Special Characters for Transparent Editing”, two other characters have a special meaning to the system during transparent mode processing. The characters to be assigned these meanings are specified in the call through the value entered in param.

Bits (0:8) of param are used to specify the character that will replace the subsystem break character. Any character not otherwise defined as a special character in transparent mode, including the normal subsystem break character ([CTRL]Y), can be used. If this value is set to 0, subsystem break is disabled.

Bits (8:8) specify the character that will replace the line termination character (EOR) for the transparent mode read. Any character not otherwise defined as a special character in transparent mode may be used.

While binary mode reads terminate only on byte count or a read timeout, transparent mode reads can be terminated in any of the following ways:

  • The read encounters the End-of-Record (EOR) character defined in param. This character functions like the [Return] character does in normal reads. The EOR is echoed but is stripped from the user data. No carriage return or line feed is sent to the terminal.

  • The read encounters an Additional End-of-Record (AEOR) character defined through a previous call to FCONTROL(25). The read completes with error END OF LINE (FSERR 31), and the AEOR character is passed with the input data and included in the byte count. No carriage return or linefeed is sent to the terminal.

  • The expected byte count specified in the READ, READX, or FREAD call is reached. The read is terminated normally, and no carriage return or linefeed is sent to the terminal.

  • The read limit timer set through a call to FCONTROL(4) expires. The read terminates with error SOFTWARE TIMEOUT (FSERR 22), and the data entered before the read timed out is returned.

Table 8-6 Special Characters for Transparent Editing

KeyFunction
AEOR CharacterThe AEOR character defined through a previous call to FCONTROL(25). The read terminates in error, and a call to FCHECK returns an fserrorcode of 31. The AEOR character is passed with the data and included in the byte count.
[Break]Causes a system break (when enabled) and transfers control to MPE/iX. If :RESUME is entered transparent editing is resumed.
[CTRL]Q (DC1 or XON)The "resume output" character of the XON/XOFF handshake. This character is stripped from the input data when XON/XOFF protocol is enabled.
DC2When input as first character, it is stripped out. A DC1 ([CTRL]Q) is then written to the terminal. When not input as the first character, DC2 is a data character.
[CTRL]S (DC3 or XOFF)The "halt output" character of the XON/XOFF handshake. This character is stripped from the input data when XON/XOFF protocol is enabled.

 

Break processing, if not disabled, occurs in transparent mode the same as in normal editing mode. During the break the terminal will operate in standard editing mode. The terminal will return to transparent mode if a :RESUME is entered.

Subsystem break processing also occurs as in normal editing mode, except that the subsystem break character is defined through the FCONTROL(41) call.

Because DC1 and DC2 (if the DC2 is the first byte of data) are recognized as special characters, transparent editing can be successfully used during block mode reads.

NOTE: When several files are open on a device at the same time (multiple FOPEN calls were issued), transparent editing will be in effect for all of the files if it was explicitly enabled for any one of them.

If you enable binary editing, transparent editing is automatically overridden. When you leave binary mode, however, transparent mode will still be enabled. Binary mode will only be enabled for the file on which it is enabled. Other files will continue to operate in the mode, normal or transparent, that was set before binary was enabled.

Parity processing is the same in transparent mode as in standard mode.

Standard editing is restored by calling FCONTROL(41) with the value of param set to 0. Any FCLOSE call issued against the terminal will also restore standard editing.

It is possible to enable transparent editing for devices connected via PAD. However, since the PAD will still expect to see a [Return] as the data forwarding character, data will not be forwarded from the terminal immediately after the characters defined as the subsystem break or EOR characters are typed. The terminal user will need to press [Return] to cause data to be transmitted, or wait for the data forwarding timer to expire if it has been set. The host software will still recognize and act on the characters defined in param.

If this call is issued against a terminal connected via VT from an MPE V or HP-UX local client, the subsystem break character may not be redefined. Bits (0:8) should be the existing subsystem break character to keep status unchanged or set to 0 to return to edited mode.

Condition Codes

CCE

Request granted.

CCG

Not returned by this intrinsic.

CCL

Failed because the file number specified did not belong to this process, the device is not a terminal, or an illegal value was passed in param.

Additional Discussion

See also discussions of FCONTROL(4), FCONTROL(16,17), FCONTROL(25), FCONTROL(26,27) and FSETMODE in this manual. See Chapter 7 “Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices” for more information on controlling PAD and DTC Telnet devices.

Feedback to webmaster