SATGUI Reference

Layout of SATGUI Applications

The base directory for a SAT application must be defined in an exported environment variable called SATHOME. Under this directory the following directories must exist:-

$SATHOME config
log
process
screen
Application configuration files.
Server log files.
Processes associated with interface actions.
Screen definition files.

Configuration

Under the config directory the following files must exist:-

config
profiles
users
Application configuration file.
User profiles.
User login information.


config

The config file contains parameters to set the size of the application window, the application title and the number of server logs to be kept.

Example:

#==========================#
# Demo application config. #
#==========================#

title="Demo"   # Application window title.
port=9881      # Application server port.

This file is a source-run script used by the server startup script (satguistart). Therefore normal (Bourne/Korn) shell script syntax conventions apply.

The title will appear in the title bar of the application window.

The port number must be unique for the host/application. Which port numbers are free to be used will depend on the host. There are no hard and fast rules, but port numbers above 9000 are generally free.


profiles

The profiles file contains the user login profile configuration. Each user must have a login profile assigned in the users file. The profiles file must contain an entry for each action, which specifies for each profile the level of access that the user has.

Format:

action profile:access profile:access ...

actionName of action.
profileName of profile (String not containing spaces).
accessAccess for profile to action (1=Read-Only 2=Update).

An entry for each action must exist in this file.

When a user attempts to invoke an action the server checks to see if there is a matching profile specified for the action entry in the profiles file. If a match is found the access sets the default GUI state (1=disabled 2=normal). If no match is found, the server will display a red "Access Denied" message at the bottom of the application window.

Example:

#============================#
# Demo application profiles. #
#============================#

main        full:2 view:2
displayhost full:2 view:1
addhost     full:2

In this example three actions are defined (main, displayhost, addhost).

Remember: Where there is no matching profile the user has no access to the action.

NOTE: The access is passed as parameter 2 to the action process.


users

The users file contains the login details for the users to be allowed access to the application.

Format:

user:password:profile:printer

userUser ID (String not containing spaces).
passwordPassword (String not containing spaces).
profileProfile (String not containing spaces).
printerUnix name of printer to be assigned to the user (May be left blank).

NOTE: The user is passed as parameter 1 and the printer as parameter 3 to the action process.

Example:

#=========================#
# Demo application users. #
#=========================#

adrian:mysecret:full:printer01
john:verysecret:view:printer02
mary:keepquiet:full:


log

This directory contains the application server log files.

The log filenames have the following format:-

log.yyyymmdd


process

This directory contains the action processes.

These files must contain executable code, and have execute permissions for the application user.

The server always passes the following parameters to a process:-

  1. User ID from users file.
  2. Access level for the screen/process from profiles file.
  3. Printer from users file (null values are allowed).
Parameters 4 onwards are those specified for the SAT/DL action. The first parameter for the SAT/DL action will be parameter 4 for the process, the second will be parameter 5, and so on.


screen

This directory contains the action screen files.

These files must contain SAT/DL commands only, and have read access for the application user.

Application Screen Layout

The "Application Title" is set using the configuration file, setTitle and newScreen.

The "Application Screen" is where the main application appears. The addDisplayItem commands create items (Entry boxes, buttons etc.) in this area.

The "Message Line" is set using setMessage. Some SATGUI internal facilities (Entry validations, permissions errors etc.) also write to the Message Line.

Starting Application Server

Make sure that SATHOME is set/exported with the correct path for the application.

Start the server by running the satguistart script.

Starting Application Client

satgui.exe host port (Windows)
satgui host port (Linux)
satgui.tcl host port (Source)

hostName of Unix host running application server.
portPort used by application server.

The best method to start the SATGUI client, under Windows NT/9x, is to set-up a desktop shortcut. The "target" for the shortcut should be something like:

"C:\Program Files\SATiSOFT\satgui.exe" myhost 9883

SATGUI Development Tool

This section will be expanded shortly

The SATGUI Development Tool (SATGUITOOL) is a simple interactive tool to assist in designing SATGUI screen layouts. This is a stand-alone program which allows screen layouts to be tried on a PC/Workstation without the need to have an application server running.

When SATGUITOOL is started, using the Windows -or- Linux executables, two windows are created (TCL/TK programmers will recognise this!!):-

SAT/DL commands entered into the "Console" will immediately update the "Tool" window. If actions are specified for buttons, entries -or- multi-list items, the action/parameters which would be sent to the server (if executed by satgui.exe) are displayed in the "Console" window.

To start SATGUITOOL using the source code


Copyright © 2001
Adrian Davis.