HTML automatically generated with rman
Table of Contents


outXparam - output key processing routines for the NEMO user interface


#include <stdinc.h>#include <getparam.h>string outdefv[]={
    "key1=d\n     Example double",
    "key2=2i\n    Example 2 integers",

void outparam (string name, string value)void outiparam(string name, int
   value)void outlparam(string name, long   value)void outdparam(string
name, double value)void outfparam(string name, float  value)void outbparam(string
name, bool   value)
void outiparams(string, int, int *)void outlparams(string,
int, long *)void outdparams(string, int, double *)void outfparams(string,
int, float *)void outbparams(string, int, bool *)


These functions provide a simple and uniform mechanism for passing small amounts of information in a persistent database between NEMO programs. It is part of the command line processing package (see also getparam(3NEMO) ), and activated by the user by passing a set of output-keywords to the system keyword outkeys=. These names must be selected from a set of pre-registered output-keyword names that the programmer has defined for each program, much like the program keywords. In fact, much like the defv[] array of strings, the output keys are stored in the outdefv[] array of strings, which the same "key=value\nhelp" syntax, except the default value now encodes the type of the parameter (double,float,long,int,bool), preceded by an optional number count in case it is an array.

For example outdparam("rms",3.0) would store a single value of 3.0 (in double precision) in the "rms" slot. outfparams("a",4,a) would store 4 floats in the "a" keyword.

See Also

getparam(3NEMO) , nemokeys(1NEMO)


In this example the rms noise in a map is used as an input parameter for another program. Previously we would have to parse the ascii output of a program, e.g.
  % set noise=‘ccdstat in=map1.ccd  | grep dispersion | awk ’{print $6}’‘
but if the programmer of ccdstat made the rms and mean legal output keys, these can now be requested to be exported in a small parameter database, viz.
  % ccdstat in=map1.ccd    outkeys=rms,mean
  % set noise=‘nemokeys rms format=%10.5f‘
  % ccdmom in=map1.ccd clip=$noise
this example still shows that data values are transferred in ascii mode (rms to $noise) and passed into another program. More ideal would be to allow the user interface to directly input data in their (now even type checked) native format, e.g. (note this has not been implemented)
  % ccdmom in=map1.ccd clip=\$rms
Currently this would confuse the user interface, since \$rms would refer to a program keyword, not the internal value of a output key.


$NEMODEF/nemokeys.dat        where NEMO stores the output keys


Peter Teuben, Dustin Chertoff

Update History

24-apr-02    document created, no code written yet    Peter Teuben

Table of Contents