set_domain

set_domain — sets the default domain for future calls.

Syntax

set_domain (domain_name)

		

Arguments

domain_name

A string.

Returns

The domain_name argument.

Description

This function sets the default Cascade DataHub domain for all future calls to read_point, read_existing_point, register_point, register_existing_point, write_point and write_existing_point. The default domain can be overridden by explicitly placing the domain name at the beginning of the point name, separated by a colon (:). For example, a variable named tank_level in the default domain would have to be named acme:tank_level in the "acme" domain.

[Important]

There is a possibility of aliasing points. If the default domain is "acme" then the point tank_level and the point acme:tank_level refer to the same datahub point. If both of these names are used in a Gamma program then one of them will not behave correctly. It is the responsibility of the programmer to ensure that there is no aliasing in the assigned names, either by always explicitly naming a point's domain or by programming carefully.

Example

Gamma> set_domain("acme");
t
Gamma> read_point(#tank_level);
12.5
Gamma> set_domain("steamplant");
t
Gamma> read_point("tank_level");
4.35
Gamma> read_point("acme:tank_level");
12.5
		

See Also

read_point, read_existing_point, register_point, write_point, write_existing_point