Coded VTScada Thin Client Server Lists
The following is an advanced process, to be used only by experienced VTScada developers when dealing with complex server configurations. For most situations, it is easier to use the option in the Connection Addresses tab of the Thin Client/Server Setup dialog to define a custom list for one or more servers.
If you do not have experience writing code with the VTScada scripting language and do not have a good understanding of Thin Client Server configuration in general, do not proceed in this topic.
By design, steps that would be known to an experienced VTScada programmer are not included in the following procedure. Example code is not provided.
In multi-server installations, VTScada Thin Client Server lists are shared between servers, just as all other services are shared. The server list defines a "cluster" of servers that communicate with each other to share thin client sessions. (VTS/IS Clusters and Server Lists) The default behavior is that when a thin client connects to a VTScada Thin Client server, it is provided with this list.
By writing code, you can supply a custom server list to a thin client when that thin client connects to the Thin Client Server. Note that a thin client can change-over to another Thin Client Server in the same cluster, but cannot cross cluster boundaries.
To supply a custom list to a client upon connection, create a variable or a subroutine module at the Code scope, declared as VICServerList. If you supply a variable, your application must initialize it to an array of Thin Client Servers that will be passed to the thin client when it connects. If you supply a subroutine, then that subroutine is called when a thin client connects and returns an array of servers that will be passed to the thin client.
If using a subroutine, it must have two parameters:
( Realm { The realm to which the client is connecting }; Servers { The array of server names in the cluster }; )
Servers is a one-dimensional array of server names, as supplied to the VTScada Thin Client/Server Setup dialog, under the Server Setup tab.
The elements of the Servers array are server names with an optional port number (default 80), a comma and the character U or S for unsecure HTTP or secure HTTPS).
The array returned by the subroutine or the array initialized during startup must be a one-dimensional array consisting of the server names to be passed to the thin client. Each array element consists of the server name, optionally with a port number, a comma and the character U for unsecure HTTP or S for secure HTTPS. For example:
"myserver.example.com:80,U"
This runs on the server to which the client is making the initial connect request. If done via a web browser, this will be on the workstation that services that URL request.