Selecting the access mode, Specifying the license mode, Selecting the – Echelon LNS User Manual

Page 67: Specifying the, License mode

Advertising
background image

LNS Programmer's Guide

53

Task Sample

Code For More

Information,

See..

Opening a

Network

Dim MyNetworks as LcaNetworks

Dim MyNetwork as LcaNetwork

ObjectServer.RemoteFlag = True
Set MyNetworks = ObjectServer.Networks
Set MyNetwork=NetworksCollection.Item("Building 75")

MyNetwork.Open()

Opening a

Network on

page 55

Selecting the Access Mode

As described in Selecting the Access Mode on page 49, each application must have some
means of determining whether it will run as a remote or local client. To specify the access

mode for a Full client, follow these steps:

1. If the PC running your application has not previously opened the network

you plan to use, or if the Network Service Device your application is using

is on a different channel than it was last time the network was opened,
select remote operation by setting the ObjectServer object's
RemoteFlag property to True.

ObjectServer.RemoteFlag = True

2. Set

the

ObjectServer object's Flags property to lcaFlagsUseNSI.

This indicates that the Full client application will use a network interface

to access the LNS Server:

ObjectServer.Flags = lcaFlagsUseNSI

NOTE: The lcaFlagsUseNSI and lcaFlagsUseTCP flags are

mutually exclusive.

NOTE: The first time you open a network with a remote Full client application, 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 long time, since the LNS

Object Server must search the network for all accessible servers. After the first time you
have opened a network, you can generally bypass this process by changing the way you

initialize your Full client application. For instructions on this, see Opening a Network on

page 55.

Specifying the License Mode

The last step you should take before opening the LNS Object Server is to set the licensing

mode. The licensing mode determines how the LNS Object Server will track the addition
of devices to a network by your application. You can set the licensing mode to either

Demonstration Mode, or Standard Mode. Demonstration Mode is used by default, but you
must use the Standard Mode once your application begins normal operation.

To enable the Standard Mode, set your customer identification information by calling
the SetCustomerInfo() method on the ObjectServer, as shown below:
ObjectServer.SetCustomerInfo(CustomerID, CustomerKey)
The CustomerID and CustomerKey parameter supplied to the function refer to the

customer identification and key numbers that are printed on the back cover of the LNS

Advertising