man1/g_request

Table of Contents

Name

g_request - graphical database save/restore program

Synopsis

g_request <argument list>

Description

This program is a graphical database save/restore client. It connects to dbman and saves or restores files based on rules defined in it’s config file.

See the online help for program usage information.

Arguments

Argument processing is done using Unix long argument syntax

--dbman_host <hn>

The host where dbman(8) is running.
If this argument is not present the default is "localhost". The DBMAN_HOST environment variable is used if present.
--conf <fn>

The file from which to get the program’s configuration.
--user_help

Pathname to a site specific help file.

This file is be loaded in addition to the program’s help file and causes additional items to appear on the help menu.

--show_tbl

print various table’s information to stderr
--show_env

print settings of environment vars used by program to stderr
--verbose=<n>

Normally the program does it’s work silently. This causes it to print several messages on startup.

The argument is optional, if not given it defaults to 1.

--help

print the help info and exit.

Environment Variables

DBMAN_HOST

The host where dbman is running. Use this or use the --dbman_host option. if

both are present -dbman_host option overrides DBMAN_HOST

Configuration File Format

This file contains the information used to configure the program. Several types of entries are used in the file and are explained below. Each configuration entry starts with a keyword followed by one or more arguments.

The file may contain comments. The beginning of a comment is delimited by a pound sign (#) and continues to the end of the line. Comments may appear on a line by themselves or may be added to the end of a configuration directive.

The file may also contain blank lines.

Global Directives

All directives in this section start with the keyword default. These directives control global aspects of g_request’s operation.
wdir

This directive specifies a directory path for the base directory used to create directories in which to perform parameter set saves and restores.

Parameter sets can not be saved in the this directory. Rather, directories must be created below this directory in which parameters sets are stored.

script

The pathname to a directory containing the parameter lists g_request uses to request parameter sets (save them) from the database. The parameter sets consist of Label/RefName pairs.
notes

The filename g_request uses when creating the file used in notes mode. The file is created in the currently selected directory.

Script/Filename associations

All directives in this section start with the keyword script.

This directive creates an association between a parameter list file, the file created when the parameter set is uploaded from the database (i.e. the file that is used to save the parameter values in) and the filename that is used for the name of the saved parameter set when sending parameter sets to the database.

Sometimes, the saved file name is different than the file name that is used when sending data to the databaase. This is because a saved file may be used as input to a program such as an scaling program where a new dataset is created from the information uploaded from the running database.

Field 1 is the keyword i.e. script.

Field 2 is the script file name. This is appended to the the directory path named by the default script <path> directive explained above.

Field 3 is the file name of the file created in Save Mode. The file is created in the currently selected directory.

Field 4 is the file name of the parameter set sent to the database in Restore Mode. The file to be sent is taken from the currently selected directory.

The maximum number of entries in the script table is 50.

Entries in the script table must be unique, duplicate script names are not allowed.

Save Mode / Script associations

Directives in this section define buttons in Save Mode. All directives in this section start with the keyword request.

Field 1 is the keyword.

Field 2 is the text which appears on the button.

Field 3 associates a button with the name of a script defined above by the script directive.

The maximum number of entries in the request table is 50.

Restore Mode / Script associations

Directives in this section define buttons in Restore Mode. All directives in this section start with the keyword send.

Field 1 is the keyword

Field 2 is the text which appears on the button.

Field 3 associates a button with the name of a script defined above by the script directive.

The maximum number of entries in the send table is 50.

Script File Format

For each script directive in the configuration file there is a file containing a list of parameters to saved. These files are kept in a directory specified by the default script directive in the configuration file.

The file contains a series of lines each specifying the name of an AccelNET parameter. The format of each line in the file is: label|refname.

The file may contain comments. Comments are placed on lines in the file beginning with a pound sign (#). See reqpar_processor(3) for more information.

Examples

#
#    g_request configuration file
#
# setup
#
default wdir $HOME/tools/g_request/run
default script $USER_TREE/$CONF/ScaleLists
default notes notes
#
# script/file_name associations
#
#cmd script request_file send_file
#------- -------- ------------ --------
script S1sav S1sval S1sval
script MACHsav MACHsval MACHsval
script POSTsav POSTsval POSTsval
#
# request button/script associations
#
#cmd but_name script
#------- -------- ------------
request S1sav S1sav
request MACHsav MACHsav
request POSTsav POSTsav
#
# send button/file_name associations
#
#cmd but_name script
#------- -------- ---------
send S1sav S1sav
send MACHsav MACHsav
send POSTsav POSTsav

Xresources

When AccelNET is installed an .Xresources file is installed in the home directory of each user account. This file contains several directives which are used to control the colors within g_request.

The resources are specified in the manner of standard Xwindows resources i.e. the color values may be specified as a color name which appears in the rgb.txt file or may be specified as a color triple i.e. #rrggbb.

When experimenting with the colors it is necessary to either restart the Xserver to reload the .Xresources file or reload the .Xresources information by using the xrdb(1) command.

In both cases g_request must be restarted in order to load the newly updated resource information.

background
This is the program background color. This is used in most background areas of the program.
file_absent_color
This is the color the file select buttons use if there is no file corresponding to the button present in the currently selected directory.

If the resource specification is missing the color defaults to black.

file_present_color
This is the color the file select buttons use if there is a file present corresponding to the button in the currently selected directory.

If the resource specification is missing the color defaults to white.

here is an example:

g_request*background: #4040f0
g_request*file_absent_color: green
g_request*file_present_color: white

In the example the background color is specified as an RGB triple. The file_absent_color and file_present_color are specified as names in rgb.txt.

The xrdb command is used like this: xrdb .Xresources

Notes

The file names in the various directory windows are sorted in reverse alphnumeric order, i.e. the lexically highest one is at the top of the list.

When testing a new configuration file you should start the program on the command line and watch for error messages. The program will report to stderr errors such as duplicate lines in the script table or script/button relationships that it can’t resolve.

This manual page is becoming closer to usable :=)

See Also

dbmod_processor(3rmt)
reqpar_processor(3rmt)

Manual Page Revision

$Id: g_request.1,v 1.9 2007/09/10 17:02:20 kitchen Exp $


Table of Contents