man1/poll_par3

Table of Contents

Name

poll_par3 - poll a list of parameters at a regular interval

Synopsis

poll_par3 <argument list>

Description

This program connects to dbman running on the host specified by the dbman_host argument.

It subscribes to the list of parameters contained in the file named by the conf argument.

The value of each parameter is written into the file pointed to by the file_name argument.

All parameters in the list are written as a whitespace separated set of fields terminated by a new line. Each time the list is written the previous contents of the file are lost i.e. there is only one line of information in the file and it is overwritten every time it is updated. The list is written to the file at the interval of one second unless overridden by the time argument.

This program was written to work with gstripchart which is part of the gnome desktop. The idea is to use this program to place the information in a file where gstripchart can find it. gstripchart is then configured (using it’s config file) to be aware of the number of parameters, their ranges, etc.

Arguments

--dbman_host <hn>

The host where dbman is running. If this argument is not supplied the default is localhost or the DBMAN_HOST environment variable.
--mngr <file>

A CONFLIST format file containing a list of AccelNET parameters to be subscribed to.
--mngr_pn <pn>

The program name to use when parsing the MNGRconf file.
--data_fn <file>

The pathname of the file used for logging.
--time <time>

This argument is optional. The default polling time is 1 sec. This may be overridden by specifying a value for this argument. A value of the form 1.5 means to poll every 1.5 secs.

The minimum value for time is 0.1 seconds.

The time value is quantized to 100mS.

--show_tbl

Enables printing of tables and other info to stderr.
--verbose

Sets the program loquacity. Can optionally be passed a number to change the amount of statements printed. Defaults to 1, passing 2 or higher would be considered to enable debugging information.
--help

Prints a brief help message.

Examples

This example outputs the values of the list of parameters specified by the MNGRconf file every 0.1 seconds.

poll_par3 --dbman_host csdev11 --mngr MNGRconf --data_fn data_file --time 0.1

The MNGRconf file looks like this.

poll_par|g1|read1 |0|TPS TK-1|GvmVR |
poll_par|g1|read2 |0|SETUP |Ispecies|
poll_par|g1|read3 |0|SETUP |Ospecies|

The contents of the data file look like this:

0.00 1.00 2.00

Notes

Please note that poll_par3 actually subscribes to the parameters and outputs the locally known copy of the value at the prescribed interval rather than actually polling dbman each time to obtain the value. This results in better efficency for AccelNET overall.

It might be better if the values were output in E format rather than F format.

10-04-2007 - this program is now more or less worthless because we haven’t used gstripchart for anything for several years because we now have pen_recorder(1) .

Manual page revision

$Id: poll_par3.1,v 1.3 2007/10/04 16:49:43 kitchen Exp $


Table of Contents