Monday, September 29, 2008

Use

The SAPVtio configuration allows you to specify which type of output the SAPVtio should produce.

Procedure

File – Applies to direct output only.

As mentioned above, in direct mode the output is written with vt220 emulation escapes. Telnet servers provide a path-through route from the program to the client. This route is usually an anonymous or a named pipe. When "STDIN$" is specified as the file name, it is treated as an anonymous pipe. \\.\PIPE\Pipe%VarName% is specified as a file name for a named pipe. Every identifier between the %…% signs is expanded to the value of the corresponding environment variable, except for two cases:

      • %pid% is expanded to the running process number
      • %tid% is expanded to the running thread number

Technically, these pipes are opened as file handles and you write to them the same way you write to files. Your telnet server documentation should provide you with the information about which way the server makes such a path-through route (direct route) available.

In the concept of pattern expansion you find an example.

The runtime expansion is required since all instances of SAPConsole will probably need a different pipe name. Telnet servers assign a unique name to each pipe when they create it. SAPVtio is expected to know the name of the pipe it is supposed to open and to use. To convey the pipe name from the telnet server to the running process (in this case to SAPVtio), servers usually name the pipes based on some rule or template. For example, some embed the process ID in a constant string to make it unique. Others simply set a predefined environment variable to the name of the created pipe. The pattern expansion mechanism was created to support all these possibilities.

LF to CRLF convert – Depending on the requirement of the telnet server, this option can be selected. Each LF (line feed) sequence will then be converted to CRLF (Carriage Return Line Feed).

Standard console output – For interpreted output.

SAPVtio behaves as if it were telnet-ignorant. It writes regular Windows Console output. The telnet server then interprets and converts this output into telnet commands.

Convert attributes to colors

Since SAPConsole is oriented towards character based terminal devices, different types of screen fields are distinguished by having different terminal-oriented attributes, such as being underlined or reverse video (inverse). For example, a field where the user has to enter data is marked as such using the inverse attribute to catch the attention of the user and request an entry.

The Windows console does not support all those attributes. On the other hand, a Windows console application can produce colored output.

Some telnet servers, like the Seattle Lab SLnet product, enable the display of different terminal attributes – inverse, bold and underlined – on the radio frequency (RF) terminals by mapping them to a combination of different console colors.

The server interprets certain colors as mapping to certain terminal attributes, and sends their corresponding escape commands to the client terminal. This makes it possible for SAPVtio to write console-oriented (colored) output and still keep the terminal-oriented visual separation between field types on the client´s side.

To define the mapping of console color combinations to attributes that your server supports, click on Convert attributes to colors. This opens the mapping dialog box:

This graphic is explained in the accompanying text

Input (Terminal) Attributes and Output (Console) Attributes

You can adjust different attributes here (according to the mapping) to slightly modify the output on the RF terminal. Depending on how the foreground and background colors are combined, the text on the RF terminal will be shown as inverse, bold and/or underlined.

0 comments: