setDefaultDomain

setDefaultDomain — sets the default domain.

Syntax

For C++:

ST_STATUS setDefaultDomain(LPCTSTR  domainname);

For Java and C#:

Exception setDefaultDomain(String  domainname);

Parameters

domainname

The name of the domain.

Returns

For C++:

    ST_OK if the command was successfully sent to the DataHub. Since the command is sent asynchronously, the actual success or failure of the command must be determined through the onSuccess or onError message handlers.

    ST_NO_TASK if a connection to the DataHub does not exist.

    ST_ERROR if the connection socket is unable to send the message.

Description

This method sets the name of the DataHub domain to be automatically associated with all unqualified point names (i.e., point names that do not specify a domain). Since in many applications there is a single domain to which most if not all points belong, this feature makes point references simpler and shorter. Points in other domains can still be referenced by qualifying the point name with a specific domain name (see qualifyName).

If the DataHub is not connected at the time this method is called, then the domain will be transmitted when the connection is established.

See Also

getDefaultDomain, qualifyName