HPlogo Asynchronous Serial Communications Programmer's Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 2 Controlling Asynchronous Devices Programmatically

Device Operation Modes

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

An asynchronous device may be operated in one of five device operation modes. Each mode has a specific set of capabilities and is intended for a specific purpose. The five device operation modes are:

  • Session-Accepting Devices.

  • Programmatic Devices.

  • System Console.

  • Spooled Devices.

  • Slaved Devices.

A device's current operation mode has a direct bearing on how a program may or may not exert control over the device's characteristics, as summarized below. For a complete description of the features and capabilities of each device operation mode, see Configuring Systems for Terminals, Printers, and Other Serial Devices.

Session-Accepting Devices

Session-accepting devices are opened with the MPE/iX :HELLO command and a session is initiated. The session remains active until the user logs off by using the :BYE command or initiates a different session by using the :HELLO command, or in the case of remote sessions, modem signals are dropped.Some error conditions will also cause sessions to end, as will the :ABORTJOB command, if entered by someone with the proper capabilities. (Note that neither :ABORTJOB nor :ABORTIO have any effect if issued against a terminal that is currently accessing the switching user interface.)

Session-accepting devices, also referred to as log-on devices, are normally terminals or personal computers running in terminal emulation mode. They can be configured as either nailed or non-nailed devices. During a session, the terminal is used for interactive (conversational) communication with the computer.

Session-accepting devices frequently come under the control of a system or user program, but only when the user who is logged-on to the device takes some action to allow this, such as issuing a valid MPE/iX :RUN command.

The device is then under the control of the program, and the program can read from and write to the device and programmatically control the interaction between the device and the computer through the use of intrinsics and the proper escape sequences.

At the completion of the program, control of the terminal is returned to the active session. For this reason it is critical that any device characteristics altered by the program be reset to normal or default settings before the session regains control. If a program fails to reset altered characteristics, the session may not be able to communicate successfully with the MPE/iX system.

NOTE: For similar reasons, it is strongly recommended that you disable system break through use of the FCONTROL system intrinsic in any program which significantly alters the operating characteristics of a device. If system break is not disabled and the [BREAK] key is pressed during execution of such a program (one that uses block mode, for example), the device may not be able to resume normal operations. Both of these recommendations are discussed in greater detail in later chapters of this manual.

Programmatic Devices

Programmatic devices are those which run under the control of a program running on the computer. The program accesses the device through the File System by treating the device as a file. The File System passes the information to the ASC software, which communicates with the device itself.

A programmatic device is considered to be program captive, because access to the device is through the program only. For instance, no MPE/iX commands can be executed from a terminal under the control of a program unless the controlling program initiates the command.

Programmatic devices can be used for input, output, or both, depending on the device and how it was opened by the controlling program.

There are many situations in which devices that are operating in one of the other device operation modes are also operating programmatically. As explained in the discussion above, session-accepting devices become programmatic devices when their users execute a :RUN command.

The system console can be a programmatic device in the same way. Slaved and spooled devices can be considered to be programmatic in the sense that they must be controlled through an application.

System Console

The CIO system console is the only terminal (or PC) that is not connected to the system through a DTC. The system is aware of its existence from system initialization. It is connected to a special interface card in the system cabinet known as the access port.

The system console has a unique set of functionality not available to any other device. It can receive console messages, and execute special commands through use of console attention characters that are not recognized by any other device.

A subset of console functionality may temporarily be assigned to another interactive device through use of the :CONSOLE command. This is called moving the logical console to the device. Any commands requiring use of the special console attention characters must continue to be executed from the system console. Note that the logical console may not be moved to a terminal connected via PAD or to a terminal with switching enabled.

The system console is also a session-accepting device, and therefore can be operated as a programmatic device as well. However, because the console serves a special purpose, some of the features of other session-accepting devices are not provided:

  • The console may not operate at 19200 bps. Supported speeds are 300, 1200, 2400, 4800 and 9600 bps.

  • No user block mode applications are supported. Except for NMMGR which is used to modify configuration files, no VPLUS block mode applications are supported.

CAUTION: The console will continue to display messages it receives even if being operated in block mode. This may cause data on the block mode screen to be overwritten or lost.

Spooled Devices

MPE/iX is equipped with a spooling facility to assist the operation of certain nonsharable devices. When a spooler process controls a nonsharable device the device gives the appearance of being shared among several users.

The spooler intercepts data being output by various processes and temporarily stores it on disk instead of sending it directly to the device. The disk essentially becomes a staging area, while the spooler manages the selection of output spool files destined for the spooled device.

Printers are the only type of asynchronous device that can be spooled. Because it makes no sense for printers to be session-accepting devices (they can be used for output only), spooled devices are always programmatic devices.

Slaved Devices

If two devices share the same port in the DTC (one device is connected to the port and the other device is connected by an additional cable to the first device), only one device is recognized by the ASC software. The device that is recognized is referred to as the master device, while the other device is called a slave of the master. A wide variety of devices can be connected as slaves, including terminals, printers, card readers, flexible-disk drives, cartridge tape units and plotters. Slaved devices are considered programmatic because the device is controlled through an application. They never accept sessions and are not spooled.

Feedback to webmaster