Opening the object server, Selecting a network interface, Opening the object – Echelon LNS User Manual

Page 64: Selecting a

Advertising
background image

LNS Programmer's Guide

50

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.

Opening the Object Server

Once you have set the network access mode and licensing mode, you can open the Object

Server, as shown below:
ObjectServer.Open()
This opens the LNS global database. An application can determine or change the location

of the global database, which is stored in the Windows System Registry, by accessing the
ObjectServer object’s DatabasePath property. If the value of this property is

changed, the Windows Registry will be updated automatically. By default, the path
value is set to the following by the LNS software setup program:
[Windows Drive]\L

ON

W

ORKS

\ObjectServer\Globaldb

Note that interoperable LNS applications should not modify the global database path,

since all LNS applications running on the PC must share the global database, and

changing the path may cause other applications to be unable to access the global

database.

NOTE: If you will be opening any networks with an LNS application that is running as a

Windows service, then the first application to open the LNS Object Server must also be
running as a Windows service. In addition, if a network is to be opened by an LNS

application that is running as Windows service, then that network and system must be
opened by an LNS application that is running as Windows service before it is opened

with an LNS application running as a user process. For more information on this, consult
the help pages for the Open() methods of the Network and ObjectServer objects in

the LNS Object Server Reference help file.

Selecting a Network Interface

When operating locally, an LNS application may run while physically attached to a

network, or while detached from the network. To run attached, the LNS application must

select the network interface it will use to communicate with the network. To run
detached, the LNS application must explicitly de-select the previously selected network

interface.

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.

The engineered mode installation scenario described in Chapter 5 of this document splits

the process of installing L

ON

W

ORKS

devices on a network into two stages — a definition

stage and a commissioning stage. During the definition stage, a network interface is not
required. So, when using the engineered mode installation scenario, your application

does not need to specify a network interface. This is referred to as engineered mode. If the

network interface has never been assigned, the system will start in engineered mode. If a
network interface has been previously assigned, the application must explicitly deselect
that network interface to start in engineered mode (by setting the NetworkInterface

Advertising