Echelon OpenLNS User Manual

Page 657

Advertising
background image

OpenLNS Programmer's Reference

620

unique user names.
If you use this method to add a network variable to a collection

on a static

LonMarkObject

or a device’s main interface, then the

LCA#119 lcaErrInterfaceNotModifyable exception will be

thrown, unless the device supports the addition of dynamic

network variables to static

LonMarkObject

objects. You can

check if a

LonMarkObject

is static or dynamic by reading the

object’s

IsDynamic

property.

Availability

Local, full, and lightweight clients.

Syntax

newNV = networkVariables.Add nvName, nvType, nvDirection,

nvOptions, memberNumber, manufacturerAssigned

Element

Description

newNV

The

NetworkVariable

object

returned by the function. This is

the newly defined network

variable.

networkVariables

The

NetworkVariables

collection

object being acted upon.

nvName

The name of the network variable

you are adding. The name can be a

maximum of 16 characters, and it

must not start with a number. In

addition, it cannot include square

brackets ([]), commas (,), or periods

(.).

nvType

A

TypeSpec

object identifying the

type of the network variable being

added.

nvDirection

The direction of the network

variable being added (input or

output). The valid values for this

element, which are contained in the

ConstNvDirections constant, are as

follows:
0 lcaNvDirectionInput
This value indicates that a network

variable is an input network

variable.
1 lcaNvDirectionOutput
This value indicates that a network

variable is an output network

variable.

nvOptions

The options to use when adding the

network variable to the collection.

These options determine the

default messaging service to be

Advertising