Typespec, Typespec o, Typespec ob – Echelon OpenLNS User Manual

Page 973: G typespec, E typespec ob, E typespec

Advertising
background image

OpenLNS Programmer's Reference

936

The OpenLNS network interface that the

OpenLNS Server is attempting to use is not

property configured. Recommission the

NetworkServiceDevice of the System object

by calling the
System.NetworkServiceDevice.

AppDevice

.Commission

method.

Data Type

Integer.

Read/Write

Read only.

Added to API

LNS Release 3.0.

TypeSpec

The TypeSpec object contains a group of properties that OpenLNS uses to identify the type a

network variable should use. You can write new values to these properties to change the

network variable’s type if the network variable’s

ChangeableTypeSupport

property is set to

lcaNvChangeableTypeSdOnly (1) or lcaNvChangeableTypeSCPT (2).
To change a network variable’s type, follow these steps:

1. Access the network variable’s TypeSpec object through the TypeSpec property of the

NetworkVariable object.

2. Set the program ID, scope, and name of the new type you want to use by writing to the

ProgramId, Scope, and TypeName properties of the TypeSpec object.

3. Optionally, invoke the Lookup method on the TypeSpec object to make sure that the

program ID, scope and name entered in step 2 reference a valid type.

4. Read the IsComplete property to make sure that the TypeSpec object is complete. This

step is only necessary if you are creating a new network variable, or changing a network

variable’s type from a type that was received from another network variable.

5. Pass the modified TypeSpec object back to the TypeSpec property of the network

variable. At this point, OpenLNS will use the values entered in step 2 to find the

definition of the type in the resource files, and assign values to the Index, Length, and

ObjectType properties of the TypeSpec object.

If

OpenLNS

is unable to find the resource file for the program ID entered in step 2,

the LCA #154 lcaErrUnavailableResourceFiles exception will be thrown.

If

OpenLNS

finds the resource file but is unable to find the type name referenced in

step 2, the LCA #155 lcaErrNotFoundInResourceFiles exception will be thrown.

Make sure that the network variable can support the new type before assigning it.

If the length of the new type is too long for the network variable, the LCA#156

lcaErrTypeLengthTooLong exception will be thrown.

The following table summarizes the TypeSpec object.

Description

Contains a group of properties that OpenLNS uses to identify

the type a network variable should use.

Added to API

LNS Release 3.20.

Accessed Through

NetworkVariable

object.

Default Property

None.

Advertising