TOC PREV NEXT INDEX

Put your logo here!


10 REFERENCE

Only the most important man pages are described in this chapter. All man pages are available on-line.

10.1 PANELS

10.1.1 xxinsStartup

NAME
xxinsStartup - configure and start XXXX main application


SYNOPSIS
xxinsStartup


DESCRIPTION
This script starts the XXXX startup configuration panel
and then starts XXXX if the START button is pressed.
The user can set several options in the startup panel
before starting XXXX:

Telescope (TCS):
- Available: select if the telescope can be accessed or not.

Instrument (ICS):
- Available: normally true.
- WS Simulation: normally false, unless the instrument
is not available.
- User Interface: start the ICS stand-alone panel.

Detectors (DCS):
- Available: normally true; set to false, if the
detector should not be used.
- WS Simulation: normally false; set to true, if the
detector hardware is not available.
- User Interface: start the detector stand-alone panel.
- Start RTD: start the detector RTD.

Miscelaneous:
- Start BOB: start the BOB panel, normally true.
- Start OS Control: start the OS control panel.
- Start Alarm Display: start the alarm display.


FILES
xxmcfgSTART.cfg start configuration file
Located in $INS_ROOT/SYSTEM/COMMON/CONFIGFILES


EXAMPLES
xxinsStartup


SEE ALSO
xxinsStart xxinsStop




- - - - - -
Last change: 15/09/00-19:19


10.2 SCRIPTS

10.2.1 xxinsStart

NAME
xxinsStart - start XXXX application


SYNOPSIS
xxinsStart [-log] [-proc <appl>] [-panel <panel>]
[-restart] [-loglevel <n>]


DESCRIPTION
This script starts the XXXX application.
- Default panels are stopped.
- All subsystems are started.
- The Observation Software is started.
- Default panels are started.

Options:

no option: Check that OS and its subsystems are running,
start them if necessary.
Restart default panels.

-proc <name> Start the application <name>.
<name> may be the name of a subsystem
(e.g. ICS) or OS.
To obtain a list of known panels, use e.g.:
'xxinsStart -proc show'

-panel <name> Start the panel <name>.
To obtain a list of known panels, use e.g.:
'xxinsStart -panel show'

Option modifiers:

-restart Restart the application.
OS and subsystems are stopped, then restarted.
Only default panels are stopped and restarted.

-log Open a log window
(-log MUST always be the first option).


FILES
xxmcfgSTART.cfg start configuration file
xxmcfgINS.cfg instrument configuration file
Both are in $INS_ROOT/SYSTEM/COMMON/CONFIGFILES


EXAMPLES
xxinsStart -panel OS_CONTROL


SEE ALSO
xxinsStop




- - - - - -
Last change: 15/09/00-19:19


10.2.2 xxinsStop

NAME
xxinsStop - stop XXXX application


SYNOPSIS
xxinsStop [-log] [-proc <appl>] [-panel <panel>]
[-standby] [-loglevel <n>]


DESCRIPTION
This script stops the XXXX application.
- OS is placed in state STANDBY.
- All panels are stopped.
- OS and all subsystems are stopped.

Options:

no option: Place OS in state STANDBY, stop all panels
and stop OS and all subsystems.

-proc <name> Stop the application <name>.
<name> may be the name of a subsystem
(e.g. ICS) or OS.
To obtain a list of known panels, use e.g.:
'xxinsStop -proc show'

-panel <name> Stop the panel <name>.
To obtain a list of known panels, use e.g.:
'xxinsStop -panel show'

-standby Only place OS in state STANDBY.
Leave all panels and processes running.

Option modifiers:

-log Open a log window
(-log MUST always be the first option).


FILES
xxmcfgSTART.cfg start configuration file
xxmcfgINS.cfg instrument configuration file
Both are in $INS_ROOT/SYSTEM/COMMON/CONFIGFILES


EXAMPLES
xxinsStop -panel OS_CONTROL


SEE ALSO
xxinsStart




- - - - - -
Last change: 15/09/00-19:19

10.3 TCL CLASSES

10.3.1 stooAPPLICATION

NAME
stooAPPLICATION - start/stop an application


SYNOPSIS
stooAPPLICATION app


DESCRIPTION
stooAPPLICATION is the base class for applications
started/stopped by a main VLT application.


PUBLIC METHODS
Config <rep> <prefix>
Configure the application.

Start
Start the application.
All processes directly owned by this object are started.

Stop
Stop the application.
All processes directly owned by this object are stopped.

IsActive
Returns 1 if the application is running, 0 otherwise.
Returns 1 if all processes directly owned by this object
are active.


IsStopped
Returns 1 if no application process is running, 0 otherwise.
Returns 1 if all processes directly owned by this object
are stopped.

Standby
The application is placed in state Standby.
(default: do nothing).


SEE ALSO
stooStart stooStop




- - - - - -
Last change: 08/11/02-18:27


10.3.2 stooBASE

NAME
stooBASE - base for Tcl/Tk scripts


SYNOPSIS
stooBASE name [-dbPoint <text>]
[-infoHeader <text>]
[-infoWidget <widget>]
[-loglevel <level>]


DESCRIPTION
stooBASE contains useful methods for scripts.
Usually this class is inherited by a class containing
the actual script functionality.


PARENT
stooLOG


PUBLIC METHODS
-


PUBLIC DATA
dbPoint: point used to access OLDB data.


PROTECTED METHODS
IsWsEnvActive [<envName>]
Returns 1 if the RTAP environment is active, 0 otherwise.

AccSelect <select>
Apply an SQL SELECT instruction on the ACC database.
Return the result set.

Dialog <text>
Pop ups a dialog to show the text.

GetOptions optionList options
Reads command line options.
The accepted options are listed in optionList,
e.g.: {-proc <name> -all}, with -all a boolean.
The corresponding public class variables are set,
e.g.: configure proc "<name>", configure all 0|1.

ExecCmd <name> <execCmd>
Executes the shell command <execCmd>.
Command <execCmd> is expected to return 0. If this is
not the case, then <name> is printed. ExecCmd returns
the return status of command <execCmd>.

GetProcessId <name> [<grepFilter>]
Returns the pid of the process <name>.

DbRead <attr>
DbWrite <attr> <value>
Read/write an OLDB attribute. dbPoint is used
as the attribute name prefix.

DbWait <attr> <value> [<secs>]
Waits <secs> secs. (default: 10) for attribute
<attr> to have value <value>. Returns 1 if
<attr> equal <value>, 0 otherwise.

SendCommand <env> <proc> <cmd> <pars> <timeout>
MsgCall <env> <proc> <cmd> <pars> ?timeout?
Send a command and wait for all replies.
SendCommand and MsgCall are identical, except for
their return values.
MsgCall returns the last reply, while SendCommand
returns a boolean indicating if the the command
was successful or not.

Sleep <secs>
Sleep <secs> seconds. The method updates Tk
during the sleep.

Logical2Num value
Converts 'T'/'F' to 1/0.



FILES
$VLTDATA/tmp/$infoHeader.log - READ -- log file


EXAMPLES
See stooINSTRUMENT.


SEE ALSO
stooStart stooStop




- - - - - -
Last change: 08/11/02-18:27


10.3.3 stooLOG

NAME
stooLOG - log utilities


SYNOPSIS
stooLOG name [-infoHeader <text>]
[-infoWidget <widget>]
[-loglevel <level>]


DESCRIPTION
stooLOG provides log utilities for scripts.


PUBLIC METHODS
SetWidget <widget>
Sets the widget where the logs should appear.


PUBLIC DATA
infoHeader: header printed by method Info.
infoWidget: widget used by method Info.
loglevel: loglevel used by method Debug.


PROTECTED METHODS
Exit [<text>]
Prints the text (if supplied) and terminates the script.

Debug <text> [<level>]
Prints text using the Info method if the loglevel
is greater or equal level. The default level is 1.

Info <text>
Prints the text to stdout and to the log file.

Warning <text>
Prints the text to stdout and to the log file
and sets the public variable warning to 1.

Log <text>
Prints the text to the log file.


FILES
$VLTDATA/tmp/$infoHeader.log - READ -- log file




- - - - - -
Last change: 08/11/02-18:27


10.3.4 stooPANEL

NAME
stooPANEL - panel


SYNOPSIS
ctooPANEL name -name <name> -procName <procName>


DESCRIPTION
stooPANEL allows to start/stop a panel.


PARENT
ctooOBJ_BASE stooLOG


PUBLIC METHODS
Config <cfg> <index>
Configure a panel from a configuration file.
<cfg> should be an instance of type ctooCONFIG.
The following config. FITS keywords are expected
and stored in the public data described below:
START.PANEL<index>.NAME -> name
START.PANEL<index>.EXECMD -> execCmd
START.PANEL<index>.DESC -> desc (optional)
START.PANEL<index>.DIR -> dir (optional)
START.PANEL<index>.STOP -> stop (optional)
START.PANEL<index>.DEFAULT -> default (optional)

Start
Start a panel executing <execCmd>
A PID file $VLTDATA/tmp/<envName>.<procName>.pid is
associated to the panel.
If there is an error, then <desc> is printed along
with the error string.

Stop
Stops a panel killing the process <execName>.
If <execName> is empty, then <procName> is used to
search for the panel.
If <execName> is '-nokill', then only the pid in the
associated PID file is used to stop the panel.
If there is an error, then <desc> is printed along
with the error string.


PUBLIC DATA
name: panel name
execCmd: command to start the panel
desc: panel description (default: name)
dir: directory, where the pacel should be started
(default: current directory)
stop: stop panel before starting new one (default: 0).
default: start by default (default: 1).

The following data are provided only for special cases:
procName: part of the *.pid file (default: first word of execCmd)
envName: part of the *.pid file (default: $RTAPENV)
execName: alternative process name, used to stop the panel
grepFilter: grep filter used to find the panel to be stopped

Normally only name, execCmd and desc need to be set.


FILES
$VLTDATA/tmp/<envName>.<procName>.pid -- lock file


CAUTIONS
If optional options are used, then these must be
specified _after_ the option used as default value.
E.g. option -desc must be specified _after_ option -name.




- - - - - -
Last change: 08/11/02-18:27


10.3.5 stooPROCESS

NAME
stooPROCESS - process


SYNOPSIS
stooPROCESS name <options>


DESCRIPTION
stooPROCESS allows to start/stop processes.


PARENT
ctooOBJ_BASE stooLOG


PUBLIC METHODS
Start [<nocheck>]
Start process <name>.
<desc> is only used to print debug information.
The command <execCmd> is assumed to start the process
<procName> in the environment <envName>.
A PID file $VLTDATA/tmp/<envName>.<procName>.pid is
associated to the process. It contains the PID of the
process.

If the PID file already exists, then an error is issued.
If the PID file does not exist and a <execCmd> is supplied,
then the command is started with seq_waitTillActive.
PING commands are sent to the process until the process
is active or the default timeout (in msecs.) is reached.
If the process does not create the PID file, then the
PID file is created.
If the public variable useXterm is not 0, then the process
is executed in an xterm (for debugging). The xterm is
positioned according to the xtermPos value (1-4).

If <nocheck> is 1, then the method does not send PING
commands to the process to check if it has started
(i.e. this function does not wait, it returns
immediately). IsActive should be called to check
if the process started without problems.

Stop
Stop process <name>.
The EXIT command is sent to the process.
If the PID file $VLTDATA/tmp/<env>.<procName>.pid exists,
then a 'kill <pid>' signal is sent to the process.
The PID file is deleted.
<desc> is only used to print debug information.

IsActive [<timeout>] [<period>]
Send PING commands to process <procName> in environment
<envName> until the process answers or the timeout is
reached. The default period of the PINGs is 1 sec.
The method returns 1 if the process answers, 0 otherwise.
<desc> is only used to print debug information.

SendCommand <cmd> <pars> <timeout>
MsgCall <cmd> <pars> ?timeout?
Send a command and wait for all replies.
SendCommand and MsgCall are identical, except for
their return values.
MsgCall returns the last reply, while SendCommand
returns a boolean indicating if the the command
was successful or not.


PUBLIC DATA
name: process name
execCmd: command to start the process (default: name)
desc: process description (default: name)

procName: CCS process name (default: name)
envName: CCS environment (default: $RTAPENV)
startTimeout: timeout to wait the process to come up during
Start (default: 10000 msec).
wsSimOption: if the parent application option -wsSimulation
is true, then the wsSimOption contents is
appended to execCmd to start the process
in WS simulation (default: "").
xtermPos: xterm position (0-4)
(default: 0 = process never started in an xterm)
useXterm: start process in an xterm (if xtermPos = 1..4)
(default: 0).


FILES
$VLTDATA/tmp/<envName>.<procName>.pid -- lock file


CAUTIONS
If optional options are used, then these must be
specified _after_ the option used as default value.
E.g. option -desc must be specified _after_ option -name.




- - - - - -
Last change: 08/11/02-18:27







___oOo___



Quadralay Corporation
http://www.webworks.com
Voice: (512) 719-3399
Fax: (512) 719-3606
sales@webworks.com
TOC PREV NEXT INDEX