waiter

waiter — registers for exceptions with a Cascade DataHub and displays values as updates are received.

Synopsis

waiter [-hv] [-d domain] [-q queuename] [[pointname]...]

Arguments

-d domain

The domain name of the DataHub to write the point to.

-h

Print a help message and exit.

-q queuename

The name of the queue for point changes.

-v

Print debugging information.

pointname

The name of point(s) to register for exceptions. This argument is optional. If not supplied, all points in the DataHub will be displayed.

Returns

On success, prints a message indicating that the points named on the command line have been registered and the values of registered points when they change. On error, an error message.

Description

The waiter utility will register for exceptions on the named DataHub, or on the default DataHub if -d is not specified. If points are named on the command line, then only those points are expected. If no points are specified, then all points in the DataHub are registered, and any points created on the DataHub in future are also registered. Whenever a value change occurs on any registered point, waiter will generate a message to the console with information for that point.

If a point name is passed using the domain:pointname syntax then alternate domains can be registered without having to use the -d option. Points from multiple domains can be watched simultaneously using this notation. For example, this:

[sh]$ waiter mixer:Mixer_1_Weight

is the same as this:

[sh]$ waiter -d mixer Mixer_1_Weight
[Note]

The source code for this utility is normally installed in the /usr/cogent/src/datahub directory, and can also be viewed at the Registering for exceptions from the Cascade DataHub appendix of the Cogent C API manual.

Dependencies

qserve, nserve, datahub

See Also

Using the Cascade DataHub, datahub, readpt, writept

Example

[sh]$  waiter LIC02_sp LIC02_pv

Registers for exceptions on the points LIC02_sp and LIC02_pv in the default DataHub.

[sh]$  waiter -d control

Registers for exceptions for all points in the DataHub control.

If you have only two points, p3 and p4 in the database with values of 15 and 19 respectively, and you start waiter with no options, you will get output like this:

[sh]$  waiter 
Point: p3
Value: 15
Conf:  100, Lock: no, Time: Fri Sep 14 2001 14:56:43.888, Security: 0
Point: p4
Value: 19
Conf:  100, Lock: no, Time: Fri Sep 14 2001 14:56:25.529, Security: 0

Should the value of p4 change to 25, you would see the following on your console:

Point: p4
Value: 25
Conf:  100, Lock: no, Time: Fri Sep 14 2001 14:57:23.018, Security: 0