Echelon OpenLNS User Manual

Page 576

Advertising
background image

OpenLNS Programmer's Reference

539

Add

Summary

Defines a new

Network

object. You can create a new

network, or import an existing network.

Availability

Local, full, and lightweight clients.

Syntax

networkObject = networksColl.Add(networkName,

databasePath, createDatabase)

Element

Description

networkObject

The newly defined

Network

object.

networksColl

The

Networks

collection object.

networkName

A String representing the name of the

new network. This name is also

applied to the network’s

System

object, and can be no longer than 16

characters. If you enter a name that is

longer than 16 characters, the LCA,

#23 lcaErrDatabasePathTooLong

exception will be thrown.

databasePath

A String containing the path for the

network database. You can enter an

absolute path or a relative path here.

Full clients may not invoke this

method. Lightweight clients may

invoke the method, but no network is

actually created. Instead, an entry is

added within the client computer’s

server list. In this case, the

databasePath parameter specifies the

IP address and port for the server, e.g.

"lns://myServer:2540", and the

createDatabase parameter is ignored.

Entries may be removed using the

Networks collection object’s RemoveEx

method.
You can specify the dataBasePath

parameter as an absolute path or as a

relative path. If you specify the

databasePath parameter as a relative

path, OpenLNS will automatically

make it an absolute path by

prepending the current working

directory to it.
For example, if you enter "Network01"

as the databasePath element, and the

current working directory is "C:\LM,"

the new database would be located in

C:\LM\Network01" folder.
Note: The complete database path

Advertising