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

FDEVICECONTROL

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Provides control operations to a printer, terminal, or spooled device file.

Syntax

               I16V   UDS    I16V     I16V
DEVICECONTROL(filenum,buffer,length,controlcode,
               U16V   U16V     U16
               parm1,parm2,fserrorcode),

Use

The FDEVICECONTROL intrinsic allows you to perform a variety of control functions on devicefiles. The function performed by a specific FDEVICECONTROL call is determined by the values you set for its parameters.

This manual describes the functions performed when the controlcode parameter is set to a value of 192. This particular controlcode is used to apply various control directives to a devicefile.

A complete list of FDEVICECONTROL options is in Table 8-7 “Valid FDEVICECONTROL Controlcode Values”. For controlcode values other than controlcode 192, see the MPE/iX Intrinsics Reference Manual.

Table 8-7 Valid FDEVICECONTROL Controlcode Values

CodeOperation Performed
128Character set selection.
129Logical page activation/deactivation request.
130Relative pen displacement.
131Absolute pen move.
132Define job characteristics.
133Define physical page.
134Download/delete character set.
135Download/delete form.
136Download logical page table.
137Download multicopy from overlay table.
138Download/delete Vertical Format Control (VFC).
139Download/delete a picture.
140Page control.
141Clear environment.
142Reserved for MPE/iX.
143Load the default environment.
144Print picture.
145End of job.
146Device extended capability mode.
192Device control operations.
193Record processing information for NRJE spoolfiles.

 

The specific action that will be performed by a call to FDEVICECONTROL using 192 as a value for controlcode is determined by the value of the parm1 parameter. The applicable parm1 values and their meanings are described in the parameter descriptions that follow.

Note that all but one of the functions performed apply only to asynchronous terminals; controlcode 192 is not used for control of DTC serial printers. (The exception occurs when a parm1 value of 1 is used to specify a printer type file.) The parm2 parameter is used to indicate the Read/Write access desired for each call. That is, should the call replace old settings with new values, return information to your program, or both set new values and return old ones.

The parm2 access values allowed with each parm1 control function are shown in Table 8-8 “Allowable Access Value for Device Control”, along with a brief description of the control function being performed.

In Table 8-8 “Allowable Access Value for Device Control” an R indicates that only Read access is allowed, while R/W indicates that Read, Write, or both Read and Write access are allowed.

Table 8-8 Allowable Access Value for Device Control

parm1 ValueAccess AllowedDevice Control Operation
1R/WSpecify terminal type or printer type file.
2R/WSet read timeout value for the next read.
3R/WSet the line speed for the device.
4R/WSet echo on or off at terminal.
5R/WSet system break response on or off at a terminal.
6R/WSet subsystem break response on or off at a terminal.
8RObtain the time used for completion of the last read.
9R/WSet parity generation and checking on or off.
10R/WSet type of parity.
11R/WSet parity generation and checking on or off.
12R/WSet type of parity.
14R/WSet line deletion response.
15R/WSet transparent editing mode.
26R/WDevice XON/XOFF enable.
27R/WSet XOFF timer value.
28RBlock mode types supported.
29R/WDefine block mode alert character.
30R/WDefine block mode trigger character.
32R/WDefine read trigger character.
36R/WDefine backspace character.
37R/WDefine cancel in character.
39R/WDefine Type 1 EOR character.
40R/WDefine Type 2 EOR character (AEOR).
41R/WDefine subsystem break character.
51R/WSet typeahead mode.
52R/WForm feed allowed in output data.
53R/WDefine form feed replacement character.
55R/WSelect backspace response action.
56R/WSpecify data bits per character.
57RObtain subsystem break character.
60R/WFlush typeahead buffer.
61R/WBypass typeahead buffer.
62R/WQuiesce I/O.
63R/WSingle Echo Typeahead Mode.
64R/WIgnore Parity Error on Input Mode.
65R/WInter-Byte Timer
66R/WDefine Multiple Type 2 EOR characters (AEOR).
67R/WTreat Delete Character (DEL) like Backspace (BS).
68R/WEscape Sequence Read Termination.
69R/WSuppress echo of Read Termination Characters.
72RReturn PAD line speed.
73R/WSet FCLOSE timeout value.
74R/WSuppress last form feed.
76R/WHost and Device XON/XOFF enable.
77R/WSet the number of stop bits.

 

See previous chapters for examples of using the FDEVICECONTROL intrinsic to perform device control operations.

Parameters

filenum

16-bit signed integer by value (required)

Contains the file number of the target devicefile as returned by FOPEN (or HPFOPEN).

buffer

user-defined structure (required)

Specifies and returns the device control value of the control directive specified in parm1. Examples of information specified or returned by the buffer parameter include character sets, forms or other printer control information, and device control actions such as line speed and parity settings.

The value of parm2 indicates whether buffer specifies the Read/Write access, where you can specify a device control status, receive a device control status, or both. buffer is usually a 16-bit integer by reference; however, for some values of parm1, (1 and 66) buffer is a character array.

length

16-bit signed integer by value (required)

Specifies the length of buffer in halfwords or bytes. Positive values of length indicates the length in halfwords (2 bytes), and negative values indicates the length in bytes. With controlcode 192, length will usually be set to 1.

The exception to this occurs when parm1 is set to 1 to specify a new terminal type or printer type file for use. In this case, the length of the character array containing the name of the file to be used is specified in the length parameter.

controlcode

16-bit signed integer by value (required)

Specifies the code number of the operation to be performed. This section of the manual assumes that controlcode is 192 (device control directive). No controlcode values other than 192 can be used for asynchronous terminals. The permitted values for controlcode and their associated functions are listed in Table 8-7 “Valid FDEVICECONTROL Controlcode Values”.

parm1

16-bit unsigned integer by value (required)

Specifies the control directive for the device file specified in filenum. The permissible values and their associated meanings are described later in the "Device Control Directives" section.

parm2

16-bit unsigned integer by value (required)

When controlcode is 192, indicates whether the call will read or write device control value. Use the following values to indicate the desired access for the call:

1 =

Return current value in buffer (Read)

2 =

Set item to value in buffer (Write)

3 =

Return current value in buffer (Read/Write) and set item to value in buffer

Table 8-8 “Allowable Access Value for Device Control” shows the type of access allowed for each parm1 value.

fserrorcode

16-bit unsigned integer by reference (required)

Returns a file system error code number if an error occurs. If no error occurs, fserrorcode is set to zero.

Condition Codes

CCE

Request granted.

CCG

Not returned by this intrinsic.

CCL

Request denied. An error occurred.

Device Control Directives

The following is a list of all possible values for the parm1 argument, the control directive associated with that value, and a description of the operation of that control directive.

Value of parm1

Action

1

Specify terminal type or printer type file.

This directive specifies a new terminal type or printer type file which describes the device to the device driver. The terminal type or printer type file must be in the format used by the TTUTIL utility.

The buffer parameter contains the filename of the terminal type or printer type file. The length parameter contains the length of buffer.

If this call is issued against a device connected via PAD, DTC Telnet, Telnet/iX or VT, a CCE condition code is returned and the terminal type or printer type file associated with the device will be changed. However, the device will continue to operate as if no device control action took place.

2

Set read timeout value for the next read.

This directive specifies a timeout value to apply to the next read requested. buffer contains the number of seconds to wait before terminating the read. The read data is transferred to the user buffer and the read length is returned. It is the same as FCONTROL (4). A value of 0 means do not timeout. This device control effects only the next read.

If the timer expires before the read completes, the read returns error status 22 (software timeout). This use of the FDEVICECONTROL intrinsic is the same as a call to FCONTROL (4).

For reads posted to devices connected via PAD, DTC Telnet, or Telnet/iX, be sure to add enough time to compensate for any delays caused by the network.

This call is not supported on devices connected via VT.

3

Set line speed for the device.

This directive sets the line speed for the device. The speed is the same for input and output. It is the same as FCONTROL (10, 11, 40). Valid buffer values are (in characters per second): 30, 120, 240, 480, 960, and 1920, (and 3840 for DTC 72MX direct connected devices only).

If this call is issued against a device connected through a PAD, DTC Telnet, or Telnet/iX connection, the terminal control will be ignored, and a meaningless value (120 for 1200 baud) will be returned in the call. For VT connections, the value returned will typically be 960 (for 9600 baud) but this value has no meaning.

4

Set echo at a terminal.

This directive enables and disables echoing of read data by the DTC. It is the same as FCONTROL (12, 13). If buffer equals 0, read echo is set to off. If the buffer value is 1, read echo is set to on.

This directive is not supported for use with VT. Changing echo on the local client of a VT connection may result in the remote host receiving false echo status; hence, it is not recommended for VT connections.

5

Set system break response.

This directive enables and disables the response to the system [Break] key at the terminal. It is the same as FCONTROL (14, 15). A buffer value of 0 disables system [Break]. A buffer value of 1 enables system [Break] response.

6

Set subsystem break response.

This directive enables and disables the response to the subsystem break character at the terminal. It is the same as FCONTROL (16, 17). A buffer value of 0 disables subsystem break response. A buffer value of 1 enables subsystem break response.

For terminals connected via PAD, the subsystem break must be followed by a [Return] to signal the PAD that data is ready to be forwarded.

8

Obtain time used for completion of last read.

This directive returns the amount of time, in seconds, required for the last read to complete. Since all reads are timed on MPE/iX systems there is no need to enable the timer. However, you should be sure that your call to this intrinsic is before the next read. Only Read access is allowed for this request. It is the same as FCONTROL (22). This directive is not supported for Telnet/iX or VT connections.

9, 11

Set parity generation and checking.

These directives enable and disable parity generation and checking between the DTC and the device. The functions of parm1 values 9 and 11 are identical. It is the same as FCONTROL (23, 24).

A buffer value of 0 disables parity, and all eight bits of each character are passed through untouched. A buffer value of 1 enables parity that is set when parm1 is 10 or 12, or when FCONTROL(36) is used. Both input and output parity are the same.

If this call is issued against a device connected through a PAD, DTC Telnet, Telnet/iX or VT connection, a CCE condition code is returned but there is no impact on the terminal.

10, 12

Set type of parity.

These directives enable or disable the kind of parity used when parity checking is enabled. The functions of parm1 values 10 and 12 are identical. If parity checking is disabled, the setting of this directive is ignored. It is the same as FCONTROL (36).

There are five possible settings for buffer:

0

indicates no parity checking (eighth bit always set to 0)

1

indicates no parity checking (eighth bit always set to 1)

3

indicates even parity

4

indicates no parity checking

5

indicates even parity with eight bit data length

6

indicates odd parity with eight bit data length

If this call is issued against a device connected through a PAD, DTC Telnet, Telnet/iX or VT connection, a CCE condition code is returned but there is no impact on the terminal.

14

Set line deletion response.

This directive enables and disables the response to the line deletion character when received from the terminal. The response is !!!. [CTRL]X is the default line deletion character. A buffer value of 0 disables transmission of !!!, and a value of 1 enables transmission. If the line delete response is disabled, line deletion still takes place, but !!! is not echoed. This directive is the same as FCONTROL (34, 35).

If this call is issued against a device connected through a PAD, DTC Telnet or VT connection, a CCE condition code is returned but there is no impact on the terminal. Line deletion characters are controlled locally by PAD devices.

15

Set transparent editing mode.

This directive enables and disables transparent (unedited) mode, and sets the EOR and the subsystem break characters. It is the same as FCONTROL (41).

A buffer value of 0 disables transparent (unedited) mode, and enables normal editing mode, with [CTRL]Y as the subsystem break character and carriage return as the EOR character.

If buffer is non-0, the low order byte is treated as the subsystem break character and the high order byte is treated as the EOR character:

bits (0:8) = subsystem break character

bits (8:8) = EOR character

The special characters listed below may not be used as the subsystem break or EOR character. A value of 0 in the subsystem break field disables the subsystem break facility. The EOR character must be specified when setting transparent mode. A value of 0 in the EOR field and a non-zero value in the subsystem break field will still enable transparent mode but no EOR will be recognized. Transparent editing mode treats most special characters as data, but the following special characters retain their meaning:

AEOR character

Alternate End of Record

[Break]

System Break

[CTRL]R

HP Block mode alert

[CTRL]Q

XON

[CTRL]S

XOFF

If the device is connected via PAD, the terminal user must enter a [Return] to signal to the PAD to transmit data. The subsystem break and EOR characters defined in this directive will still be recognized by the host software. If the device is connected via VT from an MPE V or HP-UX local client, the subsystem break character must be set to the existing subsystem break character when enabling transparent mode.

26

Device XON/XOFF enable.

This directive enables and disables XON/XOFF flow control between the device and the DTC. A buffer value of 1 enables device XON/XOFF, and a value of 0 disables XON/XOFF. When device XON/XOFF is enabled, the DTC stops sending data to the device when it receives XOFF and resumes when it receives XON. The DTC does not send XON/XOFF characters to the host. When device XON/XOFF is disabled, the XON and XOFF characters are passed to the host as data. When XON/XOFF flow control is disabled, data overruns can occur.

If this control is issued to a terminal connected via PAD, DTC Telnet, Telnet/iX or VT, it will return a CCE condition code, but no terminal control action will occur.

27

Set XOFF timer value.

This directive enables or disables the XOFF timer<. The timer is enabled by passing a positive value, representing a time limit in seconds, in the buffer parameter. When enabled, the XOFF timer causes a warning message to be sent to the console if a device is XOFFed for a time exceeding the set limit. A buffer value less than or equal to 0 disables the XOFF timer.

If this control is issued to a terminal connected via PAD, DTC Telnet, Telnet/iX or VT, it will return a CCE condition code, but no terminal control action will occur.

28

Block mode types supported.

This directive returns a value indicating the type of block mode supported by the driver. The possible return values are shown below:

7 =

both line and DTC style page block mode

15 =

PAD terminal supporting page block mode

This directive is not supported for terminals connected via DTC Telnet or via VT from a PC or HP-UX local client.

29

Define block mode alert character.

This directive specifies the character that signals HP block mode transfers. The normal alert character is DC2. Note that this call only defines the alert character; it does not enable HP block mode. The low order byte of buffer contains the new alert character.

If issued against a terminal connected via PAD, DTC Telnet or VT, this call will return a CCE condition code, but the device control action will not occur.

30, 32

Define read trigger character.

These directives specify the character the DTC sends to trigger a read on the device. The normal trigger character is DC1. The low order byte of buffer contains the read trigger character. If the low order byte of buffer contains a NUL character, there is no trigger character.

If issued against a terminal connected via PAD, DTC Telnet or VT, this call will return a CCE condition code but the device control action will not occur.

36

Define backspace character.

This directive specifies the backspace character in normal editing mode. The low order byte of buffer contains the new backspace character.

If issued against a terminal connected via VT, this call will return a CCE condition code but no device control action will take place.

37

Define cancel line character.

This directive specifies the line deletion character for normal editing mode. The low order byte of buffer contains the new line deletion character. [CTRL]X is the default cancel line character.

If issued against a terminal connected via VT, this call will return a CCE condition code but no device control action will take place.

39

Define type 1 EOR character.

This directive specifies the EOR (End-of-Record) character to be used in normal or transparent editing mode. The high order byte of buffer (value*256) contains the new Type 1 EOR character. A NUL character disables the EOR character. [Return] is the default EOR character.

The following special characters retain their meaning:

AEOR character

Alternate End of Record

[Break]

System Break

[CTRL]R

Same as XON if it is first character in the record

[CTRL]Q

XON

[CTRL]S

XOFF

If a [Return] is issued via PAD, and the EOR is not [Return], the EOR will be set and a timer (.5 second) will be enabled that will timeout and transmit the data if the user enters the EOR but does not enter a [Return]. If [Return] is the EOR character, the system will wait for a [Return] and the timer (.5 second) will not time out.

If issued against a terminal connected via VT, this call will return a CCE condition code but no device control action will take place.

40

Define single type 2 EOR character (AEOR).

This directive specifies an AEOR (Additional End of Record) character and enables its use. It is the same as FCONTROL (25). The high order byte of buffer (value*256) contains the new AEOR character. Use a NUL character to disable the AEOR character. You can use any character as the AEOR character; however, avoid the following characters because their use may yield unpredictable results:

[CTRL]@

NUL (null)

[CTRL]Q

XON

[CTRL]S

XOFF

[CTRL]Y

the Subsystem break by default

[Return]

carriage return

[CTRL]J

line feed

[CTRL]X

cancel line character by default

[CTRL]H

backspace by default

[DC2]

block mode alert character by default

[ESC]

escape

The Define Single Type 2 EOR character (AEOR) control directive (FCONTROL 25 or FDEVICECONTROL 40) and Define Multiple Type 2 EOR characters (AEOR) control directive (FDEVICECONTROL 66) interact closely. A call to set a single AEOR sets the specified character as the AEOR character, and all other AEOR characters are cleared. A call to set multiple AEORs sets all of the characters specified in the array, and it clears the single AEOR.

This call is not supported for use with VT.

41

Define subsystem break character.

This directive specifies the subsystem break character. The high order byte of buffer (value*256) contains the new subsystem break character. The default subsystem break character is [CTRL]Y.

If this request is issued for a terminal connected via PAD, the host software recognizes the new subsystem break character, but the terminal user must type a [Return] following the subsystem break to signal the PAD to transmit the data.

If issued against a terminal connected via VT, this call will return a CCE condition code but no device control action will take place.

51

Set typeahead mode.

This directive enables and disables typeahead mode. A buffer value of 0 disables typeahead mode. A buffer value of 1 enables typeahead mode. Typeahead mode is disabled by default.

When a terminal is in typeahead mode, up to 224 characters may be entered before a read is posted. The device driver stores the typeahead data in a typeahead buffer until it receives a read. The terminal operator may enter data in advance of the actual posting of a read. When a terminal is not in typeahead mode, the terminal operator may enter data only when a read has been posted to the terminal.

If issued against a terminal connected via PAD or DTC Telnet, this call will return a CCE condition code, but the device control action will not occur. This directive is not supported for VT connections to MPE V remote devices or PCs without appropriate NS software. Additionally, HP-UX (VT3K) supports single echo typeahead only.

Refer to Chapter 6 “Typeahead Mode” for more information on using typeahead mode.

52

Form feed allowed in output data.

This directive enables and disables the substitution of the form feed character in the output stream. If buffer is 1, the device driver does not substitute the form feed character when it is encountered in the carriage control of terminals. If buffer is 0, the device driver substitutes any form feed characters encountered in the carriage control of terminals with form feed replacement character.

53

Define form feed replacement character.

This directive specifies the form feed replacement character. The low order 8 bits of buffer contains the new form feed replacement character. Note that form feed in carriage control information will be replaced; form feed in data will not. NUL is the default form feed replacement character.

55

Select backspace response action.

This directive specifies the action the DTC will take when it receives a backspace character. The valid values for buffer are shown below:

1

remove character from input and back cursor up one space

5

remove character from input and erase character backspace, space, backspace)

If issued against a terminal connected via PAD, DTC Telnet or VT, this call will return a CCE condition code, but the device control action will not occur.

56

Specify data bits per character.

This directive specifies whether 7 or 8 bits will be used for each character. If buffer is 7, then 7 data bit characters are used, and the current parity setting (directives 9 and 11 or FCONTROL(36)) controls parity generation and checking.

If buffer is 8, then 8 bit characters are used, and parity checking is disabled. The current parity setting is reenabled if you switch back to 7 data bits.

If issued against a terminal connected via PAD, DTC Telnet, Telnet/iX or VT, this call will return a CCE condition code, but the device control action will not occur.

57

Obtain subsystem break character.

This directive returns the current subsystem break character. It only returns a value, and may not be used to change the subsystem break character.

60

Flush typeahead buffer.

This directive flushes the typeahead buffer. If buffer equals 1, the device driver flushes the typeahead buffer, and any data in the buffer is lost. This request is valid for the next read only. A value of 0 has no effect on the typeahead buffer. This request is only valid if typeahead is enabled. (See parm1 = 51)

If issued against a terminal connected via PAD or DTC Telnet, this call will return a CCE condition code, but the device control action will not occur. If issued against a terminal connected via VT to an MPE V system, this call will return an error.

61

Bypass typeahead buffer.

This directive specifies that the next read shall be taken from the terminal and not the typeahead buffer. If buffer is 1, the next read will receive data directly from the device; the read bypasses any data in the typeahead buffer. The data in the typeahead buffer will not be flushed, and can be obtained by subsequent reads. The request is valid for the next read only. A buffer value of 0 allows the typeahead buffer to function normally. (See parm1 = 51)

You may use this directive to obtain status information directly from a device. This request is only valid if typeahead is enabled.

If issued against a terminal connected via PAD or DTC Telnet, this call will return a CCE condition code, but the device control action will not occur. If issued against a terminal connected via VT to an MPE V or HP-UX system, this call will return an error.

62

Quiesce I/O.

This directive ensures that all outstanding nowait I/O operations have completed. If buffer is 1, the call to FDEVICECONTROL does not complete until all nowait I/O operations have been fulfilled for the device. A buffer value of 0 has no effect, and returns immediately.

If issued against a terminal connected via DTC Telnet or via VT to an HP-UX or PC local client, this call will return an error.

63

Single echo typeahead mode.

This directive specifies that the device driver shall withhold the echoing of typeahead data until a read is posted for the data. This facility prevents passwords and other data from being echoed at inappropriate times. This directive is not valid if typeahead mode is disabled. A buffer value of 1 enables single echo typeahead mode. A buffer value of 0 restores normal typeahead mode.

If issued against a terminal connected via PAD or DTC Telnet, this call will return a CCE condition code, but the device control action will not occur. If issued against a terminal connected via VT to an MPE V local client, this call will return an error. Also, this directive is supported for VT connections to an MPE/iX host or PC running appropriate software only.

64

Ignore parity error on input mode.

This directive causes the device driver to ignore parity errors on input data. If buffer is 1, the device driver ignores parity errors on data received from the terminal. If buffer is 0, the device driver reports all parity errors; this is the default setting.

If this directive is issued against a terminal connected via PAD, DTC Telnet, or Telnet/iX, this call will return a CCE condition code, but the device control action will not occur. This directive is not supported for use with VT connections and will return an error if used

65

Inter-byte timer.

This directive sets the inter-byte timer. When a read is posted with the inter-byte timer enabled, the DTC waits indefinitely to receive the first character of data. The inter-byte timer starts when the DTC receives a character from the terminal. The DTC restarts the timer each time it receives another character. If the timer reaches the specified duration before the DTC receives the next character, the read completes. If typeahead mode is enabled, the timer does not start until all data has been read from the typeahead buffer. The inter-byte timer and the read timer are independent of one another and either may complete a given read.

This control directive is incompatible with the Escape Sequence Read Termination control directive (parm1 = 68). If both are enabled, the second FDEVICECONTROL will return an error.

A positive value in buffer indicates the inter-byte timer value in tenths (.1) of a second. That is, a value of 10 in buffer sets the inter-byte timer to expire in 1 second. If buffer is 0, the inter-byte timer is deactivated.

If this directive is issued against a terminal connected via PAD or DTC Telnet, this call will return a CCE condition code, but the device control action will not occur. This directive is not supported for VT connections from an MPE V or HP-UX local client and will return an error if used. Also, this directive is supported for VT connections to an MPE/iX host or PC running appropriate software only.

66

Define multiple type 2 EOR characters (AEOR).

This directive specifies up to 16 Alternate End of Record characters. The buffer argument is a byte array containing up to 16 characters. The following characters may not be used as AEOR characters:

[CTRL]@

NUL

[CTRL]Q

XON

[CTRL]S

XOFF

[CTRL]Y

the Subsystem break by default

The characters shown below should not be used as AEOR characters because they may yield unpredictable results:

[Return]

carriage return

[CTRL]J

line feed

[CTRL]X

cancel line character by default

[CTRL]H

backspace by default

[DC2]

block mode alert character by default

[ESC]

escape

The length argument contains the length of the array. If buffer contains 0s or if length is 0, all AEOR characters are canceled.

The Define Single Type 2 EOR character (AEOR) control directive (parm1 = 40) and Define Multiple Type 2 EOR characters (AEOR) control directive (parm1 = 66) interact closely. A call to set a single AEOR sets the specified character as the AEOR character, and all other AEOR characters are cleared. A call to set multiple AEORs sets all of the characters specified in the array, and it clears the single AEOR.

If this directive is issued against a terminal connected via PAD or DTC Telnet, this call will return a CCE condition code, but the device control action will not occur. This directive is not supported for VT connections from an MPE V or HP-UX local client and will return an error if used. Also, this directive is supported for VT connections to an MPE/iX host or PC running appropriate software only.

67

Delete (DEL) to backspace (BS) Mapping.

This directive causes the DTC to treat the DEL character (ASCII 127) like a backspace. The DTC treats both backspace and delete as defined by the Backspace Response Action control directive (parm1 = 55). If the backspace would normally be part of the read data, the DTC replaces the delete with backspace. If buffer is 1, the DTC treats the delete character like the backspace (for example, echoes backspace-space-backspace). If buffer is 0, the DTC processes the delete character normally in binary and unedited mode; otherwise it ignores the data. The backspace character is not affected by this directive.

If this directive is issued against a terminal connected via PAD or DTC Telnet, this call will return a CCE condition code, but the device control action will not occur. Also, this directive is supported for VT connections to an MPE/iX host or PC running appropriate software only.

68

Escape sequence read termination.

This directive terminates reads after an escape (ESC) character is encountered. It is used to capture entire escape sequences (usually associated with a key) from the terminal without performing multiple reads. When you enable this mode, the DTC sets the inter-byte timer after receiving an escape character and then terminates the read.

The DTC sets the inter-byte timer to the time it takes to transmit 2 characters at the current baud rate (see parm1 = 3). The read returns with all characters received with less than a 2 character delay between them. This ensures that the read included all of the automatically generated escape sequence characters. Because the DTC uses the inter-byte timer to time the read termination, this control directive is incompatible with the Inter-Byte Timer (parm1 = 65). If both are enabled, the second FDEVICECONTROL will return an error.

A buffer value of 1 enables escape sequence read termination. A buffer value of 0 disables escape sequence read termination.

If this directive is issued against a terminal connected via PAD or DTC Telnet, this call will return a CCE condition code, but the device control action will not occur. This directive is not supported for VT connections from an MPE V or HP-UX local client and will return an error if used. Also, this directive is supported for VT connections to an MPE/iX host or PC running appropriate software only.

69

Suppress echo of read termination characters.

This directive causes the DTC not to echo read termination characters to the terminal. This directive is particularly useful with special AEOR characters which may make cursor positioning uncertain. (For example, you might use a "?" character as a help request.)

If buffer is 1, the DTC does not echo read termination characters (EOR and all AEOR characters). If buffer is 0, the DTC echos all characters according to the setting of the Set Echo at Terminal control directive (parm1 = 4).

If this directive is issued against a terminal connected via PAD or DTC Telnet, this call will return a CCE condition code, but the device control action will not occur. This directive is not supported for VT connections from an MPE V or HP-UX local client and will return an error if used. Also, this directive is supported for VT connections to an MPE/iX host or PC running appropriate software only.

72

Return PAD line speed.

This directive will return the current line speed of a terminal connection, including PAD connections. The line speed in characters per second will be returned in buffer.

NOTE: When the connection is first established, the DTC sends the line speed to the host. If the user changes the line speed locally (between the PAD and the terminal), this FDEVICECONTROL will not reflect the change.
73

Set FCLOSE timeout value.

This directive establishes a timeout value for an FCLOSE request. If the timer expires before the close is terminated successfully, the connection is aborted.

This call is not supported for use with Telnet/iX or VT. The Telnet/iX or VT driver will return a condition code even though no device control action will take place.

WARNING! Data loss can occur when the connection is aborted due to the timer expiration.

This FDEVICECONTROL should be called immediately before the FCLOSE. Sending any I/O commands to the LDEV after this FDEVICECONTROL and before the FCLOSE will cause the port to become inoperative.

buffer value:

1-2147

timer is set to value in seconds; values less than 1 or greater than 2147 are invalid

These are the error conditions returned in the fserrorcode field:

68

internal error—most likely a parameter error; verify that timer value is within range 1-2147 seconds

32

software abort—timer expired and connection aborted, data loss may have occurred

0

successful—connection closed normally

This call is not supported for use with DTC Telnet, Telnet/iX or VT. The driver will return a condition code even though no device control action will take place.

74

Suppress the last form feed.

For printers only.

This directive will suppress the form feed normally sent by the serial printer driver during close processing. This FDEVICECONTROL is often used when an application sends its own form feed at the end of a document. The combination of the application's form feed and the serial printer driver's form feed produces an extra blank page at the end of the document. The use of this FDEVICECONTROL will suppress the serial printer driver's form feed. This FDEVICECONTROL must be called for every document since it is automatically turned off at the end of printing.

The buffer parameter is not used in this FDEVICECONTROL.

This call is not supported for use with DTC Telnet, Telnet/iX or VT. The driver will return a condition code even though no device control action will take place.

76

Host and Device XON/XOFF enable.

This directive enables and disables XON/XOFF flow control between device and the DTC.

Device XON/XOFF:

When device XON/XOFF is enabled, the DTC stops sending data to the device when it receives XOFF. It resumes it on receiving an XON. However, when the XON/XOFF is disabled, the XON and XOFF characters received by the DTC are simply passed to the host without any interpretation.

Host XON/XOFF:

When Host XON/XOFF is enabled, the DTC sends an XOFF character to the device when its receive buffer becomes full. Then, when the data is transmitted to the CPU, the DTC sends an XON character to the device and restarts the input data flow.

There are four possible flow control settings for buffer values:

0

disable both device and host flow control

5

enable device flow control

9

enable host flow control

13

enable both device and host flow control

77

Set the number of stop bits.

This directive specifies the number of stop bits used.

There are two possible settings for buffer:

0

indicate the number of stop bits to 1

1

indicate the number of stop bits to 2

Additional Discussion

See the discussions of the various uses of the FCONTROL intrinsic. See also the MPE/iX Intrinsics Reference Manual, the discussion of providing control operations to devices in Accessing Files Programmer's Guide, and the IFS/3000 Reference Manual. For examples of using FDEVICECONTROL, see this manual.

Feedback to webmaster