V+ 12.4 Release Notes

Displays the Table of Contents for the current document
Displays the previous topic in the current document
Displays the next topic in the current document
Displays the Index for the current document

FSET (logical_unit) attribute_list

 
Function

Set or modify attributes of a graphics window, serial line, or network device related to AdeptNet.

Usage Considerations

If a window has been referenced, it must have been opened already with an FOPEN instruction. If a serial line is referenced, it must have been attached already with an attach instruction.

The IOSTAT function should be checked after each use of this instruction to determine whether or not the instruction is successful.

The use of this instruction with NFS or TCP network devices applies only to systems fitted with the AdeptNet option and with the appropriate license(s).

Parameter s

logical_unit Real value, variable, or expression (interpreted as an integer) that defines the logical unit number of the window to be accessed. (See the ATTACH instruction for a description of unit numbers.)

attribute_list List of string constants, variables, and expressions; real values, variables, and expressions; and format specifiers used to define the characteristics of the window. See the description of the FOPEN instruction for detailed information on this parameter.

Details
Using FSET With Windows

This instruction sets attributes for a window that already exists and is already open for access.

NOTE: No interlocks exist to prevent multiple program tasks from changing the attributes of a window.

The argument list for this instruction has exactly the same format as that for the FOPEN instruction, except that no window name is included for this instruction. Refer to the description of the FOPEN instruction for information on how window attributes are specified.

The window attributes described below can be specified with either the FSET or FOPEN instructions (unless noted otherwise). For some attributes, after the attribute has been specified, its effect may be modified later in one of the following ways:

This information is provided for each attribute described in FSET Graphics Window Attributes:

Some attributes can be either on or off. For each such attribute there are two corresponding keywords. The on keyword directly relates to the attribute (for example, /DISPLAY); the off keyword has a NO prefix (for example, /NODISPLAY).

For attributes with an on/off character, the on condition is described.

Table 2-4. FSET Graphics Window Attributes
Attribute:
/ABS_POSITION
Explanation:
FSET-ABS_POSITION
Position the window at an absolute location on the screen rather than at a location relative to the parent window.
Arguments:
The X and Y offsets from the upper left corner of the monitor.
Default:
None
Attribute:
/BORDER
Explanation:
FSET-BORDER
Enable a border around all or part of the window. The border is a line (one pixel wide) inside the window boundary, and it will obscure anything in that area. The border is always drawn with color 1 (black).
Arguments:
One or more of the following keywords.
  • ALL = Display all borders
  • NONE = Display no borders
  • TOP = Display top border
  • NOTOP = Suppress top border
  • BOTTOM = Display bottom border
  • NOBOTTOM = Suppress bottom border
  • LEFT = Display left border
  • NOLEFT = Suppress left border
  • RIGHT = Display right border
  • NORIGHT = Suppress right border
Default:
/BORDER ALL
Attribute:
/CURSOR
Explanation:
FSET-CURSOR
Set the mouse cursor to a loaded icon.
Arguments:
The index of the icon element to use, followed by the name of the icon (in single quotes)
Default:
None
Attribute:
/DISPLAY and /NODISPLAY
Explanation:
FSET-DISPLAY
FSET-NODISPLAY
Display the window. Top-level windows that are not displayed may be displayed by selecting their name from the Adept pull-down menu at the top of the screen.
Arguments:
None
Default:
/DISPLAY
Attribute:
/EVENT
Explanation:
FSET-EVENT
Enables or disables event processing for the window. If you want to receive events, you must explicitly use this attribute with fset or fopen each time you open a window. The details of event processing, and descriptions of the events that can be specified with this keyword, are described with the GETEVENT instruction. If the window is opened for write-only access (see the /WRITEONLY attribute), this keyword causes the error File already opened.
Arguments:
One or more keywords (see GETEVENT)
Default:
/EVENT NONE
Attribute:
/EVENT CONNECT
Explanation:
FSET-EVENT_CONNECT
Enables or disables connect and disconnect event notification. If the event value returned is 20, then you are connected to the PC. If the event value returned is 21, then you are disconnected from the PC.
Arguments:
None
Default:
None
Attribute:
/FONT
Explanation:
FSET-FONT
Selects a character font to be used for all text output in the window, except for output from the GTYPE instruction. The new font will take effect immediately, with the following effect on the placement of the next character output to the window: (1) The new character cell will have its left edge at the same pixel column as before the font change. (2) Its baseline will remain at the same pixel row. (3) If the top of the character cell extends above the text top margin, the character position will be bumped down so that no part of the cell is outside the text margins. (4) A similar rule applies if the right edge of the character cell extends beyond the text right margin. Font number 1 is the standard font-it has character cells 8 pixels wide and 15 pixels high; there are 3 pixels below the baseline; and uppercase letters are 9 pixels high.
Arguments:
Font number (the value must be greater than or equal to one)
Default:
/FONT 1
Attribute:
/FONT_HDR
Explanation:
FSET-FONT_HDR
Specify the font number to use for the title, menu bars, and pull-down menus of the window. (Changes the title bar immediately, changes the menu bars at the next FSET /MENU... instruction.)
Arguments:
Font number
Default:
/FONT 1
Attribute:
/H_ARROWINC
Explanation:
FSET-H_ARROWWINC
Sets the change in the position of the scroll handle in the horizontal scroll bar that will be caused by clicking on the arrow buttons in the horizontal scroll bar. (This keyword is valid only when the event GRAB_H_SCROLL is enabled [see the GETEVENT instruction].)
Arguments:
Number of units (see /H_RANGE) to move the handle for each click on an arrow button (the value must be greater than or equal to zero)
Default:
Pixel width of the current font cell
Attribute:
/H_HANDLE
Explanation:
FSET-H_HANDLE
Sets the displayed position of the scroll handle in the horizontal scroll bar. (This keyword is valid only when the event GRAB_H_SCROLL is enabled [see GETEVENT].)
Arguments:
Relative position along bar (note that this is not a pixel count; 0 = leftmost end; rightmost end may be set with /H_RANGE)
Default:
Current scroll position
Attribute:
/H_RANGE
Explanation:
FSET-H_RANGE
Sets the value of the rightmost position of the scroll handle in the horizontal scroll bar. (This keyword is valid only when the event GRAB_H_SCROLL is enabled [see GETEVENT].)
Arguments:
Value associated with the rightmost position of the scroll handle (value must be greater than or equal to 0; if n handle positions are desired, use the value n-1)
Default:
Total number of pixels that the window can be scrolled (not the width of the window)
Attribute:
/H_SCROLL
Explanation:
FSET-H_SCROLL
Sets the horizontal scroll position of the displayed contents of the window. (This keyword is ignored if it is specified with FOPEN and the window already exists.)
Arguments:
Horizontal offset (in pixels) in the bitmap to the first column to display (the value must be greater than or equal to zero)
Default:
/H_SCROLL 0
Attribute:
/IGNORE
Explanation:
FSET-IGNORE
Specifies pull-down menu items that cannot be selected. These items are dimmed in the pull-down menu display. This keyword must be specified in the same FSET instruction as the /PULLDOWN keyword.
Arguments:
List of numbers in the range 1 to 30, which correspond to rows in the pull-down menu. Numbers greater than the number of pull-down items are ignored.
Default:
No pull-down items are ignored
Attribute:
/LUT
Explanation:
FSET-LUT
Sets the red, green, and blue (RGB) values of a color. The specified color is actually altered for the entire graphics system. Thus, this keyword must be used with care. Note, for example, that changing color values may cause all the color descriptions in this manual to become invalid.
Arguments:
The color to be changed (in the range 0 to 15), followed by the red, green, and blue values for the color (each in the range 0 to 255). A value of -1 may be specified for the red, green, or blue value to return that value to its default. For instance, specifying /LUT 15 127 127 127 will change the default white (color #15) in the system to a gray, and specifying /LUT 15 -1 -1 -1 will return the white to its default color.
Default:
System default colors (see GCOLOR)
Attribute:
/MARGINS
Explanation:
FSET-MARGINS
Sets the text margins for the window. This keyword also sets the text cursor position to the top left corner of the text window defined by the new margins. The text scrolling window is reset to its maximum size.
Arguments:
Coordinates of the left, top, right, and bottom edges of the text window (if a value is negative, the corresponding margin is not modified)
Default:
  • X coordinate of left margin = 8
  • Y coordinate of top margin = 8
  • X coordinate of right margin = (right_edge_of_window - 8)
  • Y coordinate of bottom margin = (left_edge_of_window - 8)
Attribute:
/MENU
Explanation:
FSET-MENU
Specifies up to 20 items to appear in the menu bar of the window. Each menu string is displayed in a box in the menu bar, left to right in the order specified. A space is added to each side of each string. If the strings are too long, the excess fall off the end of the menu bar without any error indication. The strings are written in the current font defined for the menu bar. (This keyword is ignored if the window does not have a menu bar.)
Arguments:
List of up to 20 strings, each one enclosed in single quotes. Each string delimited by single-quote characters must be separated from the next string by at least one space. The correct way to clear the menu bar is to specify no strings, not a null string (that is, with /MENU, not with /MENU ' ').
Default:
/MENU (no items)
Attribute:
/POINTER
Explanation:
FSET-POINTER
Specifies the point of reference for position information obtained from the mouse cursor. This keyword takes effect with the next event that occurs-it does not change any events that have already occurred but are waiting to be read.
Arguments:
  • DISPLAY = Return pointer device positions relative to the upper left-hand corner of the window region displayed on the screen.
  • SCREEN = Return pointer device positions relative to the upper left-hand corner of the entire screen.
  • WINDOW = Return pointer device positions relative to the upper left-hand corner of the allocated window, even if the corner is scrolled out of the displayed region.
Default:
/POINTER WINDOW
Attribute:
/POSITION
Explanation:
FSET-POSITION
Sets the displayed position of the window relative to its parent. The arguments define the position of this window's upper left-hand corner relative to the upper left-hand corner of the parent's allocated window. If this is a top-level window, the position is relative to the upper left-hand corner of the screen. (This keyword may not be specified for control-bar windows.) This keyword is ignored if it is specified with FOPEN and the window already exists. If this keyword is used with FSET, the value specified overrides any mouse drag that may have been done by the user. This keyword may also specify the position of the reference point of an icon relative to the top left corner of the icon (see the /ICON keyword for FOPEN).
Arguments:
X position (in pixels) relative to parent (always rounded up to be an even number)
Y position (in pixels) relative to parent
Default:
/POSITION 0 0
Attribute:
/PULLDOWN
Explanation:
FSET-PULLDOWN
Outputs text into a pull-down window, and displays the pull-down window under the specified menu-bar item if that item is currently selected (highlighted). (This keyword may not be specified with FOPEN.) All the strings specified are displayed, left justified, stacked vertically, in a window the width of the longest string (plus a space on each side of the string). With the standard font, the pull-down window may have a maximum area equivalent to 25 lines of text, 25 characters wide. There can be a maximum of 30 lines of text. If there are more than 25 lines, the maximum pull-down will be less than 25 characters wide; conversely, if there are fewer than 25 lines, the pull-down can be more than 25 characters wide. Each line of text will be truncated on the right if necessary. (See the /IGNORE keyword for information on how to disable pull-down items.) Only one pull-down window can be present in the entire system at any one time.
Arguments:
Number of the menu-bar item with which this pull-down list is associated (1 [leftmost item] to N [rightmost item]) followed by a list of strings (each in single quotes) separated by spaces
Default:
No pull-down menu specified
Attribute:
/SELECT
Explanation:
FSET-SELECT
Specifies that a window is selected for receiving input. The effect of this keyword is equivalent to clicking the mouse on the window.
Arguments:
None
Default:
The window is not selected
Attribute:
/SHOW
Explanation:
FSET-SHOW
Forces a window and all its ancestors to be displayed. (This keyword differs fromthe keyword /DISPLAY, which does not display a window if any one of its ancestors is not displayed.)
Arguments:
None
Default:
None
Attribute:
/SIZE
Explanation:
FSET-SIZE
Sets the size of the window in the display. The size specified overrides any mouse drag that may have been done by the user. This keyword may not be specified for control-bar windows. (This keyword is ignored if it is specified with FOPEN and the window already exists.)
The X value is always rounded up to be an even number. For windows with a title bar, X and Y values less than 64 are set to 64. For windows without a title bar, X and Y values less than 8 are set to 8. The values of X and Y are clipped to the full size of the window as required.
This keyword may also specify the size of an icon or font (see the /ICON or /DEFFONT keyword for the FOPEN instruction).
Arguments:
  • X size (in pixels)
  • Y size (in pixels)
Default:
Display the whole window (see /MAXSIZE described in the FOPEN instruction)
Attribute:
/SPECIAL
Explanation:
FSET-SPECIAL
Sets special attributes for the window.
Arguments:
One or more of the following keywords.
  • DESELECT = Allow deselection
  • NODESELECT = Don't allow deselection
  • POSITION = Allow moving by dragging title bar
  • NOPOSITION = Don't allow dragging of title bar
  • SELECTABLE = Allow window to be selected from pull-down menu under Adept icon
  • NOSELECTABLE = Don't allow window to be selected from pull-down menu under Adept icon. (Window name is dimmed in pull-down menu.)
  • SIZE = Allow resize with sizing icon
  • NOSIZE = Don't allow resize with sizing icon
Default:
/SPECIAL DESELECT POSITION SELECTABLE SIZE
Attribute:
/STACK
Explanation:
FSET-STACK
Sets the position of the window in its window stack, which determines the layering of the windows in the display. This keyword may not be specified for control-bar windows. No child of a window can be stacked below that window's control bars.
Arguments:
Code value for desired position:
  • 1 Move to top of parent's stack
  • -1 Move to bottom of parent's stack
Default:
/STACK 1
Attribute:
/TERMINAL
Explanation:
FSET-TERMINAL
Sets characteristics of the terminal emulator used to output text to the window.
Arguments:
One or more of the following keywords.
  • CURSOR = Display the text cursor
  • NOCURSOR = Do not display text cursor
  • OVERSTRIKE = Force designated overstrike characters to overstrike the previous character
  • NOOVERSTRIKE = defeat overstriking
  • WRAP = Wrap lines of text that are too long
  • NOWRAP = Truncate long lines of text
Default:
/TERMINAL CURSOR OVERSTRIKE WRAP
Attribute:
/TITLE
Explanation:
FSET-TITLE
Set the window title, which is the text that is displayed in the title bar. The title has no other meaning to the V+ system.
Arguments:
String enclosed in single quotes. The string will be truncated to 40 characters.
Default:
Same as the window name
Attribute:
/UPDATE and /NOUPDATE
Explanation:
FSET-UPDATE
FSET-NOUPDATE
In normal operation, the screen display is updated every time new graphics appear in any displayed window. The /NOUPDATE keyword stops this process for the window currently open, thereby hiding all new graphics from the screen display until normal operation resumes. The /UPDATE keyword will force the screen display to be updated and normal operation to resume. (This keyword may not be specified with the FOPEN instruction.)
Arguments:
None
Default:
/UPDATE
Attribute:
/V_ARROWINC
Explanation:
FSET-V_ARROWWINC
Sets the change in the position of the scroll handle in the vertical scroll bar that will be caused by clicking on the arrow buttons in the vertical scroll bar. (This keyword is valid only when the event GRAB_V_SCROLL is enabled [see the GETEVENT instruction].)
Arguments:
Number of units (see V_RANGE) to move the handle for each click on an arrow button (the value must be greater than or equal to zero)
Default:
Pixel height of the current font cell
Attribute:
/V_HANDLE
Explanation:
FSET-V_HANDLE
Sets the displayed position of the scroll handle in the vertical scroll bar. (This keyword is valid only when the event GRAB_V_SCROLL is enabled [see GETEVENT].)
Arguments:
Relative position along bar (note that this is not a pixel count; 0 = topmost end; bottommost end may be set with /V_RANGE)
Default:
Current scroll position
Attribute:
/V_RANGE
Explanation:
FSET-V_RANGE
Sets the value of the bottommost position of the scroll handle in the vertical scroll bar. (This keyword is valid only when the event GRAB_V_SCROLL event is enabled [see GETEVENT].)
Arguments:
Value associated with bottommost position of the scroll handle (the value must be greater than or equal to 0; if n handle positions are desired, use the value n-1)
Default:
Total number of pixels that the window can be scrolled (not the height of the window)
Attribute:
/V_SCROLL
Explanation:
FSET-V_SCROLL
Sets the vertical scroll position of the displayed contents of the window. (This keyword is ignored if it is specified with FOPEN and the window already exists.)
Arguments:
Vertical offset (in pixels) in the bitmap to the first row to display (the value must be greater than or equal to zero)
Default:
/V_SCROLL 0

Using FSET With Serial Lines

The following specifications can be used as arguments to directly ATTACH a serial line:

LOCAL.SERIAL:n
Local serial line n on the local CPU. For Adept CPU boards, n = 1 or 2 (or 3 for the AWC board).

SERIAL:n Global serial line n on the Adept SIO board. For Adept SIO board, n = 1, 2, 3, 4 (4 cannot be used if MCP is installed).

As a convenience, the following synonyms may be used:

KERMIT The serial line currently configured for Kermit protocol.

MONITOR The serial line currently configured for use as the monitor terminal.

The keywords listed in FSET Serial Line Attributes may appear in the keyword list string.
Table 2-5. FSET Serial Line Attributes
Attribute
Argument
Description
FSET-PARITY

NONE
No parity generation
/PARITY
EVEN
Use even parity

ODD
Use odd parity
FSET-STOP_BITS
/STOP_BITS
1 or 2
Use 1 or 2 stop bits per byte
FSET-LENGTH
/BYTE_LENGTH
7 or 8
Use 7 or 8 bits per byte
FSET-FLOW
/FLOW
NONE
No flow control
XON_XOFF
Detect and generate XON/XOFF (turn off modem)
MODEM
Use RTS/CTS modem control (turn off XON/XOFF)
FSET-DTR
/DTR
OFF
Turn off the DTR modem signal
ON
Turn on the DTR modem signal
FSET-MULTIDROP
/MULTIDROP
OFF
Do not use multidrop mode
ON
Use multidrop mode (valid only for LOCAL.SERIAL:1 on Adept CPUs)
FSET-FLUSH
/FLUSH
OFF
Disable recognition of Ctrl+O for flushing output
ON
Enable recognition of Ctrl+O for flushing output
FSET-SPEED
/SPEED
Note: the corresponding information in the V+ Language Reference Guide is not correct, and should be as noted here.
110, 300, 600, 1200, 2400, 4800, 7200, 9600, 19200, 38400
Select the indicated baud rate.
For the following pairs of serial ports, a baud rate of 19200 is incompatible with a baud rate of 7200 or 38400 on a pair-wise basis

030: LOCAL.SERIAL:1 and LOCAL.SERIAL:2
SIO: SERIAL:1 and SERIAL:4
SERIAL:2 and SERIAL:3

Drivers for KERMIT, DDCMP, and NETWORK do not support all modes indicated by the keywords; they ignore those that are not supported.

Using FSET With NFS and TCP

The following AdeptNet devices may be referenced with the fset instruction:

NFS Network File System

TCP Transmission Control Protocol

You can use the attributes listed in FSET Attributes for AdeptNet when accessing these devices with the FSET instruction.

Table 2-6. FSET Attributes for AdeptNet
Attribute
Description
FSET-ADDRESS
/ADDRESS
IP address. (Applies only to the TCP device.)
FSET-MOUNT
/MOUNT
Defines the name to be used for an NFS server remote disk. (Applies only to the NFS device.)
FSET-NODE
/NODE
Node name.
FSET-PATH
/PATH
Path for NFS server remote disk. (Applies only to the NFS device.)

You may define new nodes on the network using the FSET program instruction to access a logical unit that has been attached to the TCP device. The string used with the FSET instruction has the same format as that used with the NODE statement in the V+ configuration file (see the later example).

You may also define new remote mounts, using the FSET program instruction to access a logical unit that has been attached to the NFS device. The string used with the FSET instruction has the same format as that used with the MOUNT statement in the V+ configuration file (see the later example).

Example s
Graphics

The following FSET instruction causes a pull-down menu to be displayed under the menu-bar item just selected by the user (assuming that the array element event[2] has been set by a GETEVENT instruction that detected a menu event):

FSET (lun) "/PULLDOWN", event[2], $menu[event[2]] 

This instruction requires that string array elements $menu[n] be defined for each of the menu items displayed on the menu bar. The following line shows how a pull-down list with four items could be defined for the first item on the menu bar. (Note that the menu items can have different lengths, they can consist of multiple words, and there is a space between the single quotes delineating items.)

$menu[1] = "'Item #1' 'Second Item' 'One more item' 'Last item'" 

The following instruction takes control of the vertical scroll bar away from the window manager. The vertical scroll bar is set to return values from 0 to 10. The initial position of the scroll-bar handle is at the top (zero), and each time the up-arrow or down-arrow icon is clicked, the value of the scroll-bar handle position changes by 2 units.

FSET (lun) "EVENT GRAB_V_SCROLL/V_RANGE 10/V_HANDLE 0/V_ARROWINC 2" 

The following example attaches to serial line 2 and sets the baud rate to 2400:

ATTACH (slun, 4) "SERIAL:2" 
FSET (slun) "/SPEED 2400" 
AdeptNet

Define a new node called SERVER2 with the IP address 192.168.144.102:

ATTACH (lun, 4) "TCP"
FSET (lun) "/NODE 'SERVER2' /ADDRESS 192 168 144 102" 

Define a new NFS mount with the disk name DISK2 to access the exported directory /a of the node (server) called SERVER1:

ATTACH (lun, 4) "NFS"
FSET (lun) "/MOUNT 'DISK2' /NODE 'SERVER1' /PATH '/a'"  
Related Keyword s

FOPEN (program instruction)

IOSTAT (real-valued function)

Syntax
GAIN.SET-I

Please submit comments to: techpubs@adept.com

Last modified on: 07/08/2004
Copyright © 2004 by Adept Technology, Inc.
All rights reserved.