HPlogo MPE/iX Intrinsics Reference Manual > Chapter 5 Command Definitions (FCONTROL - FLOCK)

FDEVICECONTROL

MPE documents

Complete PDF
Table of Contents
Index

Edition 7 E0701 ♥
Edition 7 E0300
Edition 6 E0195

NM and CM callable.

Provides control operations to a printer, terminal, or a spooled device file and is used to:
  • Download character sets, forms, and internal or control tables used in printing.

  • Control the page size, pen positioning, form and use of character sets, the number of copies to be printed, and all other printing environment characteristics.

  • Perform control operations on a terminal, printer, or spooled device file.

Syntax



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

Parameters


filenum

16-bit signed integer by value (required)

Passes the file number of the device file.

buffer

user-defined structure (required)

Passes and returns device information:

  • Passes information to the device, such as character sets, forms, vertical format control (VFC) information, or device control actions.

  • Returns device driver information.

(ASC) The buffer is usually a 16-bit integer by reference or, for controlcode=192, where parm=1, buffer is a character array containing the name of the terminal type or printer type file. For controlcode=192, buffer values are defined in the parm1 discussion.

length

16-bit signed integer by value (required)

Passes the length of buffer:

  • If positive, it indicates the length in half words.

  • If negative, it indicates the length in bytes.

(ASC) If controlcode=192, length is normally set to 1 unless parm1 is set to 1 (specifying a new terminal or printer type file), then the length of the array is specified in the length parameter.

controlcode

16-bit signed integer by value (required)

Passes the item value to be returned. (See following control codes 128+.)

(ASC) Passes the number of the operation to be performed. Controlcode 192 is used to apply control directives to a device file.

Codes 0 through 64 call FCONTROL. Control passes to FCONTROL, and any errors returned will have originated with FCONTROL.

parm1, parm2

16-bit unsigned integer by value (required)

Passes the value specified in the corresponding controlcode; there are several values for parm1 and parm2 that define the operation in more detail.

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. If FDEVICECONTROL detects a bounds violation for fserrorcode (that is, an address outside your stack area), fserrorcode is returned unchanged.


FDEVICECONTROL Control Code Values

Table 5-1 FDEVICECONTROL Control Code 192 Values

Parm1 Parm2 Description
1R/WSpecify terminal 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/OFF at a terminal
5R/WSet system break response ON/OFF at a terminal
6R/WSet subsystem break response ON/OFF at a terminal
8RObtain time used for completion of the last read
9R/WSet parity checking ON/OFF
10R/WSet type of parity to check
11R/WSet parity generation ON/OFF
12R/WSet type of parity generated
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 line character
39R/WDefine type 1 EOR character
40R/WDefine type 2 EOR character (AEOR)
41R/WDefine subsystem break character
51R/WSet type ahead 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
62WQuiesce I/O
63R/WSingle echo mode typeahead
64R/WIgnore parity error

Operation Notes


Not used for KSAM files.

Condition Codes


CCE (2)Request granted.
CCG (0)Not returned.
CCL (1)Request denied. An error occurred.

Related Information


Intrinsics FCONTROL, FREAD, FSETMODE, FWRITE, IODONTWAIT, IOWAIT, RESETCONTROL, XCONTRAP
Manuals Accessing Files Programmer's Guide
Asynchronous Serial Communications Programmer's Reference Manual




FDELETE


FERRMSG