Initializing a remote full client application – Echelon LNS User Manual
Page 66
LNS Programmer's Guide
52
within the Networks collection. The name to use is specified by the
Network object’s Name property. The following code fetches an existing
network called “Building76” from the global database.
Dim MyNetwork as LcaNetwork
Set MyNetwork = MyNetworks.Item("Building 76")
3. Call
the
Open() method on the Network retrieved in step 2 to open its
LNS network database.
MyNetwork.Open()
4. Optionally repeat steps 2 and 3 to open more networks. Once you have
opened a network, you should follow the tasks described in the Opening a
System section later in this chapter to configure and open the system.
Initializing a Remote Full Client Application
This section describes how to initialize a Full client application. This includes the
following steps:
1. Selecting the Remote Access Mode
2. Specifying the License Mode
3. Opening the Object Server
4. Selecting a Network Interface
5. Opening a Network
Table 4.2 includes sample code that you could use to incorporate each of these tasks. See
the sections following Table 4.2 for more information on each task.
Table 4.2 Initializing a Full Client Application
Task Sample
Code For More
Information,
See..
Selecting
the Access
Mode
ObjectServer.RemoteFlag = True
ObjectServer.Flags = lcaFlagsUseNSI
Specifying
the
License
Mode
ObjectServer.SetCustomerInfo(CustomerID,CustomerKey)
Opening
the Object
Server
ObjectServer.Open()
Selecting
a Network
Interface
Dim NICollection as LcaNetworkInterfaces
Dim SelectedNI as LcaNetworkInterface
Set NICollection = ObjectServer.NetworkInterfaces
Set SelectedNI = NICollection.Item("LON1")
Set ObjectServer.ActiveRemoteNI = SelectedNI