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. |
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.
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 ...
action | Name of action. |
profile | Name of profile (String not containing spaces). |
access | Access 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).
NOTE: The access is passed as parameter 2 to the action process.
The users file contains the login details for the users to be allowed access to the application.
Format:
user:password:profile:printer
user | User ID (String not containing spaces). |
password | Password (String not containing spaces). |
profile | Profile (String not containing spaces). |
printer | Unix 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:
This directory contains the application server log files.
The log filenames have the following format:-
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:-
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)
host | Name of Unix host running application server. |
port | Port 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