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

Page 72: Remote access, Specifying the, License mode

Advertising
background image

LNS Programmer's Guide

58

Task Sample

Code For More

Information,

See..

Opening

the Object

Server

ObjectServer.Open()

Opening the

Object Server

on page 58

Opening a
Network

Dim Networks as LcaNetworks
Dim MyNetwork as LcaNetwork

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

MyNetwork.Open()

Opening a
Network
on

page 59

Selecting the Remote 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 Lightweight client, follow these steps:

1. Set

the

ObjectServer object's Flags property to lcaFlagsUseTCP.

This sets the network transport mode, and indicates that the Lightweight

client will access the LNS Server via a TCP/IP connection:

ObjectServer.Flags = lcaFlagsUseTCP

NOTE: The lcaFlagsUseNSI and lcaFlagsUseTCP

flags are

mutually exclusive.

2. Select remote operation by setting the ObjectServer object's

RemoteFlag property to True. This will cause the Networks collection to

contain all remote networks have been entered into the Windows

Registry on the PC running your application after the Object Server has
been opened:

ObjectServer.RemoteFlag = True

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. Remote Lightweight client applications must
always operate in Standard Mode. 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

Application Developer’s Kit CD-ROM jewel case. For more information on LNS licensing,

and for more details on the differences between Standard Mode and Demonstration
Mode, see Chapter 13, LNS Licensing.

Advertising