Echelon LNS User Manual

Page 71

Advertising
background image

LNS Programmer's Guide

57

In any of these cases, your client application should resort to using the
Networks collection. Once opened, the entry for the network in the
RemoteNetworks collection will be repaired.

3. Get the network to be opened. In this case, you need to specify the

network to be opened by the Network object’s RemoteNetworkName

property. The default value for the RemoteNetworkName property is

r_<Network Name>, where <NetworkName> represents the value
assigned to the Network object’s Name property. For example, if the Name
property is set to HVAC, the name in the RemoteNetworks collections

will be r_HVAC.

Dim MyNetwork as LcaNetwork

Set MyNetwork = NetworksCollection.Item("r_Building 75")

4. Call

the

Network object’s Open() method to open its LNS network

database. The LNS Server utility must be running on the PC containing

the LNS network database, or the operation will fail.

MyNetwork.Open()

5. 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 Lightweight Client Application

This section describes how to initialize a Lightweight client application. This includes the

following steps:

1. Selecting the Remote Access Mode

2. Specifying the License Mode

3. Opening the Object Server

4. Opening a Network

Table 4.3 includes sample code that you could use to incorporate each of these tasks. See

the sections following Table 4.3 for more information on each task.

Table 4.3 Initializing a Lightweight Client Application

Task Sample

Code For More

Information,

See..

Selecting

the

Remote
Access

Mode

ObjectServer.RemoteFlag = True
ObjectServer.Flags = lcaFlagsUseTCP

Selecting the

Remote Access

Mode on page
58

Specifying

the

License

Mode

ObjectServer.SetCustomerInfo(CustomerID,CustomerKey)

Specifying the

License Mode

on page 58

Advertising