readpt

readpt — reads a point from the Cascade DataHub.

Synopsis

readpt [-bh] [-d domain] [pointname]...

Arguments

pointname

The name of the point to retrieve information for. Multiple points can be specified.

-b

Brief output. Print only the point name and value.

-d domain

The domain name of the desired datahub. This replaces the default, which is "default".

-h

Print a help message and exit.

Returns

On success, information on the requested points; on error, a message.

Description

The readpt utility will retrieve the value of a point from any available Cascade DataHub. If a point cannot be found a new point will be created in the DataHub it was queried from. The domain can be specified with -d, or by qualifying the pointname, as in domain:pointname (the latter technique overriding the former).

[Note]

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

Dependencies

nserve, datahub

See Also

datahub, writept

Example

[sh]$  readpt LIC02_sp
  Point: LIC02_sp 
  Value: 55
  Conf: 100
  Lock: 0
  Secur: 0
  
[sh]$  readpt -d control m23onoff
  Point: m23onoff
  Value: 1
  Conf: 100
  Lock: 0
  Secur: 0
  
[sh]$  readpt -b control:m23onoff
  Point: m23onoff
  Value: 1