[sh]$ writept test1 25
[sh]$ readpt test1 Point: test1 Value: 25 Time: Jun 14 10:43:38.896 Conf: 100 Lock: 0 Secur: 0
These tests establish that you can read and write data points to the Cascade DataHub. The syntax for writept and readpt are described in the Utilities reference, and their source code is listed in the Writing data to the Cascade DataHub and Reading from the Cascade DataHub appendicies of the Cogent C API manual.
The simplest way to shut down the DataHub is to send a kill -9 command for the DataHub's process ID. A more graceful and orderly method is to send the exit command using the lsend utility, like this:
[sh]$ ps -aux
...
name 19350 0.0 0.3 3160 1612 ? S 16:37 0:00 datahub
name 19354 0.0 0.1 2856 868 pts/0 R 16:39 0:00 ps -aux
[sh]$ lsend 19350
/dh/19350> exit()
</dh/19350 no longer reachable>
/dh/19350(disconnected)>Ctrl-C
[sh]$ ![]() | If the DataHub shuts down in any way other than using lsend, it takes Linux or QNX a couple of minutes, more or less, to free up the TCP socket that the DataHub was using. So if you kill the DataHub, you'll have to wait a couple of minutes before attempting to restart it. |
Copyright © 1995-2006 by Cogent Real-Time Systems, Inc. All rights reserved.