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

Page 63

Advertising
background image

LNS Programmer's Guide

49

Table 4.1 Initializing a Local Client Application

Task Sample

Code For More

Information,

See…

Selecting

the Local

Access

Mode

ObjectServer.RemoteFlag = False

Selecting the Access

Mode on page 49

Specifying

the

License

Mode

ObjectServer.SetCustomerInfo(CustomerID,CustomerKey)

Specifying the

Licensing Mode on

page 49

Opening

the Object

Server

ObjectServer.Open()

Opening the Object

Server on page 50

Selecting

a Network
Interface

Dim NICollection as LcaNetworkInterfaces
Dim SelectedNI as LcaNetworkInterface

Set NICollection = ObjectServer.NetworkInterfaces
Set SelectedNI = NICollection.Item("LON1")

Selecting a

Network Interface
on page 50

Opening a

Network

Dim MyNetworks as LcaNetworks

Dim MyNetwork as LcaNetwork

Set NetworksCollection = ObjectServer.Networks
Set MyNetwork=NetworksCollection.Item("Building 76")

MyNetwork.Open()

Opening a Network

on page 51

Selecting the Access Mode

Each application must have some way of determining whether it will run as a remote or

local client. Sometimes, the access mode is user-determined, meaning that a user selects
a remote or local option as part of your application's start-up process. In other cases, you

might design your applications specifically for one form of operation.

To specify the LNS application access mode as local, set the ObjectServer object's
RemoteFlag property to False, as shown below:

ObjectServer.RemoteFlag = False

Specifying the Licensing 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)

Advertising