Here are very brief descriptions of (most of) the procs
in the ktcl tlib (library of Tcl procedures).
- Target
- (Target svc) opens a KTL service and tries to load the keyword
database cache file for that service
- doExpose
- (no args) This proc will perform one exposure using the Lick
standard CCD control subsystem keywords (EXPOSE, EXPOSIP, etc).
It will wait for each stage of the exposure to complete. A
person writing a script for automated exposures can just call
doExpose (one command) instead of doing all that ktl writing
and ktl waiting manually.
- findKWfile, findKpaths, findKroot, findKtcl
- The "findXXX" procs are crude heuristical attempts to locate
configuration files or directories in the kroot install scheme.
Any "real" ktl code would use the centralized makefile strategy
and get these paths from config.mk. I wrote these so that
wildcat scripts written by unofficial kroot developers had a hope
of self-configuration. They are weak. You've been warned.
- linkaKW
- This proc links a given keyword to an already-opened service,
only if it is not already linked. It detects readability,
writability, monitorability, and whether the keyword is
boolean, and makes decisions accordingly about the type
of linking to be done. It sets global variables which
the calling app can use later to decide how to handle
the keyword.
- mkProc
- (mkProc svc) This proc writes a proc. For a given service
svc it creates the illusion of a tcl/tk command object (like
a widget) with subcommands. After 'mkProc foo' has been run, there
is a new proc called foo, with subcommands like 'map', 'wait',
'near', etc. These procs are used (and documented) in the
ktauth tool and ktest scripts. This code migrated into ktcl
from ktest because I wanted access to the "wait" subcommand
and the opKW convenience function without loading all of
ktest.tlib.
- opKW
- If none of the subcommands created by mkProc is recognized then
the arguments to the "foo" proc are treated as a keyword directive,
thus 'esi EXPOSE 1' would be a write to the EXPOSE keyword for
the esi service, with a value of 1. opKW is the proc which
implements this keyword operation.
- readFITS
- (readFITS fp) This proc was stolen directly from Will Deich's
readFitsHdr.tcl script. It parses a FITS header and produces
a keyed list representing the values of the keywords in the FITS
header.
- registerSelf, defendSelf, yesImHere
- These three procs provide the simple X11 based registry
which can be used to prevent (e.g.) two copies of the same
Dashboard from running on the same display.
- useKW
- (useKW svc kwd) This is another migrant from ktest.tlib. It
will open the service if it is not already open, then call
linkaKW.
- waitFor
- (waitFor cvs time conditions) This proc is invoked from the proc
created by mkProc. It will wait for a maximum of 'time' seconds
for a set of keyword=value conditions to be true. See the ktauth
online help for the syntax. I wanted to make this function available
to non-ktest scripts.
De Clarke <de@ucolick.org>
Template Date: 1999/07/28 22:31:53