write_existing_point, write_point

write_existing_point, write_point — write point values.

Syntax

write_existing_point (symbol, value, seconds?, nanoseconds?)
write_point (symbol, value, seconds?, nanoseconds?)

		

Arguments

symbol

A point name, as a symbol.

value

Any numeric or string expression.

seconds

Number of seconds since Jan 1st, 1970.

nanoseconds

Number of nanoseconds within the second.

Returns

t on success or nil on failure.

Description

These functions write a point value to the Cascade DataHub. If the point does not exist in the datahub, write_point will create the point and set its value. write_existing_point will return nil if the point does not exist.

Example

Gamma> init_ipc("writer","wq");
t
Gamma> write_existing_point("my",150);
nil
Gamma> write_point(#my,120);
t
Gamma> write_point(#dog,130,450000000);
t
Gamma> write_point("has",140);
t
Gamma> write_point("fleas",150,1210947,2134444);
t
Gamma> write_existing_point("my",600);
t
Gamma> 
		

These points can be viewed in the datahub (sorted in alphabetical order) using the dhview command at the shell prompt:

#     Point Name            Conf Value
1     dog                   100  130
2     fleas                 100  150
3     has                   100  140
4     my                    100  600

See Also

read_point, read_existing_point, register_point