• Aucun résultat trouvé

USING DEVICE CONTROL ESCAPE SE- SE-QUENCES (~&p)

Dans le document Station 2626A (Page 32-36)

Programmatically you can define the" from" and "t 0 " de-vices and initiate data transfers using an '!::&P device con-trol sequence in the same manner as for an HP 264x series terminal.

The general form of the device control escape sequence is as follows:

To select source ("from") and destination ("to") devices, use the following commands in the device control escape sequence:

<"from" device Code)5

<"to" device code)d

where the device codes are as follows:

3

=

cursor active window

Workspaces and Windows Note that the meaning of device code 4 can be altered by way of the "P r i n h r Cod e 4" field in the Global Configu-ration menu. The default field value (Ext) assigns device code 4 to the external printer; you may, however, set the·

field to assign device code 4 to the integral printer instead

("Printer Code 4" field

=

Int). In the latter case both device codes 4 and 6 will specify the integral printer.

Within a single device control escape sequence you may define only one source ("from") device but you may de-fine multiple destination ("to") devices. For example, the following escape sequence defines the cursor active win-dow as the source device and workspaces #3 and #4 and the integral printer as the destination devices:

'!::&P 3~ 33d 34d 6D

Once you have defined the source and destination devices the assignments remain in effect until:

1. They are changed by a subsequent device control es-cape sequence;

2. They are changed by a keyboard entry (using the

"device control" set of function keys); or 3. A hard reset is performed.

Device assignments established using the system function keys are maintained in non-volatile memory while those established using the above escape sequence are NOT. If for some reason non-volatile memory is destroyed (per-haps because the battery failed or was removed), the de-fault device assignments at power-on time are as follows:

Source ("from") device = cursor active window

Destination ("to") device = integral printer, if present;

otherwise the external printer

Copy Line (8)

To copy a line from the source workspace to one or more destination devices, use the command character "B" in the device control escape sequence. Within the same es-cape sequence you may also define the desired source and destination devices by using the "s" and "d" command characters in conjunction with the appropriate parameter values. If you omit a source and/or destination device specification from the escape sequence, the current

"from" and "to" device assignments are used.

When the source device is a formatted workspace (with format mode enabled) and the destination device ilS an external printer, all "protected" data are translated to spaces so as to properly position the "unprotected" and

"transmit only" fields on the printed page. This makes it possible to transfer data from a form on the screen to a preprinted form on an external printer.

2-17

Workspaces and Windows Some examples are as follows:

~&p3!16dB Copy one line (the line containing the cursor) from the cursor active window to the integral printer.

~&pB Copy one line (the line containing the cursor) from the current "from"

workspace to all current "to" devices.

~&p31532d33d34dB Copy one line (the line containing the cursor) from workspace # 1 to

To copy a "page" of data from a workspace to one or more other terminal devices, use the command character "F" in a device control escape sequence. Within the same escape sequence you may also define the desired source and des-tination devices by using the "5" and "d" command char-acters in conjunction with the appropriate parameter values. If you omit a source and/or destination device specification from the escape sequence, the current

"from" and "to" device assignements are used.

When the source device is a non-formatted workspace, a

"page" consists of all data in all lines starting with the one containing the cursor through the last one currently visi-ble in the window. The copy page operation copies entire lines from the source workspace (NOT just the characters visible in the window),

When the source device is a formatted workspace (with format mode enabled) and the destination device is an external printer, a "page" consists of all "unprotected"

and "transmit only" fields in all lines starting with the one containing the cursor through the last one currently visible in the window. All "protected" data are translated to spaces so as to properly position the "unprotected" and

"transmit only" fields on the printed page. This makes it possible to transfer data from a form on the screen to a preprinted form on an external printer.

When the destination device is the integral printer, a

"page" always consists of ALL data in all lines starting with the one containing the cursor through the last one currently visible in the window. In other words, the source data is always treated as non-formatted data.

Ordinarily when copying data to a workspace, a CIt L, is automatically included at the end of each line copied.

When format mode is enabled in either the source or des-tination workspace, however, the CIt LF is suppressed.

2-18

Some examples are as follows:

~&p3!14d6dF Copy one page of data from the more destination devices, use the command character "M"

in the device control escape sequence. Within the same escape sequence you may also define the desired source and destination devices by using the "!I" and "d" com-mand characters in conjunction with the appropriate parameter values. If you omit a source and/or destination device specification from the escape sequence, the cur-rent "from" and "to" device assignments are used.

When the source device is a formatted workspace (with·

format mode enabled) and the destination device is an

c

external printer, the copy all operation copies all (

"unprotected" and "transmit only" fields in all lines starting with the one containing the cursor through the end of the workspace. All "protected" data are translated to spaces so as to properly position the "unprotected" and

"transmit only" fields on the printed page. This makes it possible to transfer data from a form on· the screen to a preprinted form on an external printer.

When the destination device is the integral printer, the copy all operation always copies ALL data in all lines starting with the one containing the cursor through the end of the workspace. In other words, the source data is always treated as non-formatted data.

Ordinarily when copying data to a workspace a CIt LF is auto-matically included at the end of each line copied. When format mode is enabled in either the source or destination workspace, however, the'll LF is suppressed.

Some examples are as follows:

~&p31!134dM Copy all from workspace # 1 to

Device Control Completion Codes

When performing device-to-device data transfers by using device control escape sequences, you determine whether or not the operation was performed successfully by executing an INPUT or similar instruction which re-quests one ASCII character from the terminal. The termi-nal responds by sending an 5, F, or u. An "5" indicates successful completion, an "F" indicates that the oper-ation failed, and a "u"indicates that the operoper-ation was interrupted by the terminal operator pressing the _

Workspaces and Windows key. Note that these completion codes cannot be sup-pressed by strap settings or any other means. They are always transmitted and your programs should include in-put commands explicitly for accepting them.

Once your program issues a device control escape se-quence to the terminal, the terminal queues further data received from the host computer in a buffer. The queued data is not acted upon until the terminal has transmitted the completion code for the current device control oper-ation back to the host computer.

(

(

(i

1

8Bi jj,jll

L . . . - -_ _ _ _

C_O_n_fi_gU_r_in_g_t_h_e _T_er_m_i_nl_'I---,.1 III I

INTRODUCTION

The HP 2626A is designed so the various terminal char-acteristics can be configured quickly and easily through the use of menus. These configuration menus can be dis-played on the screen and their content altered and saved (in non-volatile memory) through a few simple key-strokes.

The content of these menus may also be altered from a program executing in a host computer through the use of escape sequences.

The Configuration Function Keys

To gain access to the configuration menus through the keyboard, use the following keystroke sequence:

I I . .

This changes the function key labels to the following:

...

..

Each function key, when pressed, causes a particular

_ ..

_----configuration menu to appear on the screen and redefines the function keys to a set of functions that will assist you in manipulating the various parameters within the menu.

The Configuration Menus

The various configuration menus can be summarized as shown in table 3-1.

The window configuration menu is described in Section II, W orkspaces and Windows, of this manual while the Datacoml and Datacom2 configuration menus are de-scribed in Section VII, Data Communications.

The remainder of this section describes first how to change the Global and Term #1-4 configuration menus from the keyboard and then how to do it programmatically.

Dans le document Station 2626A (Page 32-36)