SATGUI Reference
S@
Home SATGUI SATSHELL SATFORM SATFILTER SATREPORT SATMYSQL License Download Examples Contact
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 application title, port to be used and whether security is enabled.

Example:

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

title="Demo"   # Application window title.
port=9881      # Application server port.
security="on"  # Application prompts for user/password.

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

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.

When security is set to "on" users will be prompted for a user/password when connecting to the application. When security is set to "off" users will connect without authentication, provided that the following entries exist in the users and profiles files:-

users

user:password:full:NP

Note: A default printer may be specified in place of "NP".

profiles

*:full:normal

Note: The access may also be set to "disabled".


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 entries which identify each action which specify for a profile, the level of access that the user has.

Format:

action:profile:access

actionName of action.
profileName of profile (String not containing spaces).
accessAccess for profile to action (normal/disabled).

There must be at least one entry which identifies each application action 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 default GUI state is set to the access value (normal/disabled). If no match is found, the server will display a red "Access Denied" message at the bottom of the application window.

Wildcards ("*") maybe used in the action and profile fields.

Example 1:

main:full:normal
main:view:normal
displayhost:full:normal
displayhost:view:disabled
addhost:full:normal

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

Example 2:

main:*:normal
display*:full:normal
display*:view:disabled
print*:*:normal
This example uses wildcards.

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 (Specify "NP" if no printer).

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

Example:

adrian:mysecret:full:printer01
john:verysecret:view:printer02
mary:keepquiet:full:NP
satadmin:hush:full:printer01


log

This directory contains the application server log file.

The log filenames have the following format:-

gui.log


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 ("NP" if no printer).
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

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!!):-

NOTE: The "Console" window may appear on top of the "Tool" Window.

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) are displayed in the "Console" window.

To start SATGUITOOL using the source code

To load/run files containing SAT/DL code

In addition to entering SAT/DL commands at the "Console" prompt, files containing SAT/DL code can be loaded/run using SATGUITOOL.

Or NOTES:


Copyright © 2003 Adrian Davis.