Opening a network, Opening a, Network – Echelon LNS User Manual
Page 69: N. for instructions on this, see opening a network
LNS Programmer's Guide
55
Dim SelectedNI as LcaNetworkInterface
Set SelectedNI = NICollection.Item("LON1")
3. Set the remote network interface for the LNS application to the network
interface selected in step 2.
ObjectServer.ActiveRemoteNI = SelectedNI
Note that before you use a network interface, you may need to
configure the network interface with the L
ON
W
ORKS
Interfaces
application in the Windows control panel. For more information on
this, and for general information on the various network interfaces
you can use with LNS, see Chapter 11, LNS Network Interfaces.
Opening a Network
This section describes how to connect to a network with a Full client application. You
cannot create new networks with Full client applications. The LNS Server utility must
be running on the PC containing the LNS databases (i.e. the LNS Server PC) to open a
network as a Full client.
The steps required to open a network with a remote Full client application vary,
depending on whether a remote Full client application using your Network Service
Device has opened the network before. If a remote Full client application has not
previously accessed the network to be opened with your Network Service Device, follow
these steps:
1. Get
the
ObjectServer object's Networks collection. The LNS Object
Server will need to query the network to determine what remote
networks are currently opened in all connected LNS Servers. This may
take a few moments, since the LNS Object Server must search for all
accessible servers.
Dim MyNetworks as LcaNetworks
Set MyNetworks = ObjectServer.Networks
2. Get the network to be opened. You need to specify the network to be
opened by the Network object’s Name property, which was specified when
the network was created, or by using the object’s numerical index within
the Networks collection.
Dim MyNetwork as LcaNetwork
Set MyNetwork = MyNetworks.Item(“Building 75”)
3. Call
the
Network object’s Open() method to open its LNS network
database. The LNS Server must be running on the PC containing the
LNS network database, or the operation will fail.
MyNetwork.Open()