mkdoit2 [ -o <outputfile> ] [ <inputfile> ... ]Users of the ARP Data Acquisition System will almost never need to invoke the compiler directly; the invocation is handled by appgen and make.
For compatibility with APPGEN, the input filename should end in ".doit". The doit script can be generated as part of the general make process by adding a line to the .spec file such as:
abcdoit : abc.doitThe resulting script is designed to work with most if not all standard experimental configurations as specified in the Experiment.config file. Invoking the script should start up the instrument or immediately attach to the instrument if it is already running. Multiple simultaneous invocations are safely arbitrated to avoid conflicts and deadlocks.
In addition, the script can take one of two optional arguments, "not" and "stop". "doit not" is used to prevent an instrument from starting up if it would do so automatically, such as in a flight configuration. (Up until now, users would need to explicitly issue the command "pick_file /dev/null", making sure that the environment variable "Experiment" was properly defined first. With the advent of the Experiment.config file, it is no longer necessary or desirable to have Experiment predefined, since it can be looked up in the file, but pick_file (and most of the other binary utilities) require this definition. By nesting this command within the doit script which reads Experiment.config, this process is simplified.)
"doit not" can also be used to "clean up" in the event that a disorderly shutdown has left some processes still running.
"doit stop" will shut down an instrument that is already running without requiring the full GSE program to be run. This is accomplished by running the command "startdbr quit" on the flight node with the appropriate Experiment definition from the configuration file.
display abcdisp abc client abccltspecifies that the display program "abcdisp" should be run and that it requires one screen which should be initialized with the scrdes file "abc.fld". The script will also invoke the keyboard client program "abcclt".
To add an algorithm, we could simply add the line:
algorithm abcalgo
Telemetry applications are classified into one or more of the categories display, extraction, or algorithm. For the purposes of mkdoit2, a display program is any TM client generated from a .fld file or a .tbl file. An algorithm is any TM client which accesses the command server using the "cic" functions, specifically cic_options() as referenced from /usr/local/include/oui/client.oui, which is true of any program generated from .tma source files. Extraction is used for any TM client that is not a display or algorithm, or for a display program for which additional command-line options are desired.
If it is necessary to list an application more than once, the "display" entry must come first. For example, a display program which also sends commands to the command server is actually both a display and an algorithm. In this case, it should be listed first as a display and next as an algorithm. It will appear in the output file with the display programs, but it will have been endowed with the command-line options required by command clients. You might also need to list a program as both display and extraction in order to specify a command-line option:
display abcdisp abc extraction abcdisp -h ABCD
In any case, the listing for "display" must come first. Note that the screen names listed must match those listed in the .spec file in name, number and order or strange problems will result.
There are numerous other options available listed in the Input Syntax below, and more will inevitably be added as time goes by, so stay tuned!
The playback option can be used to create a doit script which will run on previously logged data. The resulting script takes a run directory as an argument and invokes the rdr to playback the data. It is possible to run displays, algorithms and graphics in this mode, very much the same way as in real time, except that in playback you have the option of running everything fast forward or in slow motion in addition to real time.
In order to create a playback script from a realtime script, replace the client specification with the keyword "playback" and make sure any algorithms listed have the -p option (for Playback). You may also optionally specify the autostart keyword in order to have the data playback begin immediately without requiring a manually-entered "Telemetry Start" command.
Inetin is used to specify that the script should run the Inetin program to connect to a data stream on a remote system. As with Playback, this option replaces the client keyword, invoking PBclt instead. This configuration will also accept the autostart keyword. The resulting script requires that the variable RemoteHost be defined in Experiment.config.
Serin is used to specify that the script should run the serin program to connect to a data stream coming in on a serial port. As with Playback, this option replaces the client keyword, invoking PBclt instead. This configuration will also accept the autostart keyword.
In addition to reading the .doit input file, mkdoit2 reads the .fld files which are specified in each "display" statement. The following field contents are recognized:
The doit scripts generated by mkdoit2 have been carefully designed to operate properly either on standard QNX consoles or in QNX Windows wterm windows. Even invocations of rtg are safe, as the doit script checks to see if windows is running and only launches rtg if it is. Scripts can be invoked via the command line in a wterm shell exactly as they are invoked on a QNX console, but they can also be added to your personal windows configuration to be selectable from the "Programs" menu without first bringing up a shell.
In order to add a doit script to your menu, select "Properties..." from the Workspace menu. This brings up the list of menu items for editting. In the upper right corner, select "Personal" to bring up your private selections.
Suppose we wanted to add an entry to run the NO2 instrument using the script windoit with the menu entry, "Run NO2". Select the "Name:" field and enter "Run NO2". Then select the "Invocation String:" field and enter //9/home/no2/windoit.
Return to Manuals Guide
last updated: Thu Sep 23 10:42:22 2004 | webmaster@huarp.harvard.edu |
Copyright 2004 by the President and Fellows of Harvard College |