read_existing_point (symbol) read_point (symbol)
The value of a point in the Cascade DataHub. If the point is unavailable then nil is returned. For read_existing_point, if the point does not exist than nil is returned. For read_point, if the point does not exist then the point is created and a default value is returned.
These functions makes a call to the Cascade DataHub to retrieve the point whose name is the same as the symbol. If the point does not exist in the datahub, read_existing_point returns nil and does not create the point. read_point will create a point in the datahub if necessary, whose value and confidence are both zero. If the point name is pre-qualified with a domain name and a colon (:), this function will search that domain's datahub rather than the datahub for the default domain.
This example uses data points entered in the write_point reference entry example.
Gamma> init_ipc("reader","rq"); t Gamma> read_point(#my); 600 Gamma> read_point(#dog); 130 Gamma> read_point(#has); 140 Gamma> read_point(#fleas); 150 Gamma> read_existing_point(#cat); nil Gamma> read_point(#cat); 0 Gamma>
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.