piut_setservernode

This function sets the active PI Server node where the data for the subsequent PI-API calls will be resolved. Passing a NULL server string will result in resetting to the default server. The first time a server is specified, there may be a delay as a connection is established. The number of concurrently active servers is limited by the network protocol being used, the operating system, and the hardware platform.

C format

int32 piut_setservernode(

char PIPTR * servername );

Returns

>0

System Error (typically network related)

0

Success

-1

Server name is not the same as the PI Home node (DEC VAX only)

Arguments

servername(passed)

Name of the PI Server node

Usage Notes

The piut_setservernode is used to allow concurrent access to multiple nodes. The call is only expensive if forcing an initial connection where it may suspend the calling program until timing out.

A PINet node can only be connected to one server so in essence this call merely verifies that the passed server name is that of the PI Home node.

Note: Calling piut_setservernode after initial connection does not verify connection status to the server name passed. See PI Connect for further details.

Enabling Operational Intelligence