man1/poll_par4

Table of Contents

Name

poll_par4 - poll a list of parameters at a regular interval

Synopsis

poll_par4 <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. The list is written to the file at the interval specified by comm3 in the config file.

Arguments

--dbman_host <hn>

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

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 <filename>

The pathname of the file used for logging.
--show_tbl

Enables printing of table info where available 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 help message.

Configuration File

All entries in the file are in group1.
comm1 - required
Logging is enabled when the value of this parameter is equal to CONFLIST.Preset.
comm2 - required
A reset is performed when the value of this parameter is equal to CONFLIST.Preset.
comm3 - required
The time between logging lines. If Label and RefName are NULL the value comes from the Preset field. If Label and RefName are valid AccelNET parameters the value is taken from the database.
int0 - optional
Specifys the maximum number of lines to put in the output file. This bounds the logging file so that it won’t grow to fill the entire disk. It should be set to a value greater than the number of lines expected for logging.

If this parameter isn’t present the file size is unlimited.

read1 -
All parameters which fall under read1 are logged as part of the output. The parameters should be enumerated using the index field.

Config File Example

poll_par4|g1|comm1 |0|RADIATE |TimerSR |2.0
poll_par4|g1|comm2 |0|RADIATE |InitSC |1.0
#
# get deltaT from the database
#poll_par4|g1|comm3 |0|POLL |deltaT |
# get deltaT from the Preset field
poll_par4|g1|comm3 |0|NULL |NULL |1.0
#
poll_par4|g1|int0 |0|NULL |NULL |10
#
#    the parameter list
#
poll_par4|g1|read1 |0|SETUP |TotPartE|
poll_par4|g1|read1 |1|SRS L1-1|CR |
poll_par4|g1|read1 |2|SRS L2-1|CR |

Output File Format

The program writes several fields into the output file followed by the fields listed in the read1 section of the config file.

The fixed fields are: line number, date, and deltaT. These are followed by the logging parameters.

line number is simply the line number in the file.

date is the date and time when the logging line was written.

deltaT is the time that has elapsed since the last line was written.

The fields in the file are separated by a comma.

The AccelNET parameters are formatted according to their CrtKey.

Here is a portion of the output file generated using the config given above:

0, Tue Nov 14 14:34:39 2000, 0.000007, 0.000, 0.00e+00, 0.00e+00
1, Tue Nov 14 14:34:40 2000, 1.010009, 0.000, 0.00e+00, 0.00e+00
2, Tue Nov 14 14:34:41 2000, 1.009999, 0.000, 0.00e+00, 0.00e+00

Notes

Please note that poll_par4 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.

This program doesn’t handle the Ldisp datatype correctly.

Manual page revision

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


Table of Contents