Compatibility case 2 – devices that support old a – Echelon LNS User Manual

Page 39

Advertising
background image

LNS Programmer's Guide

25

and the value of the SCPTnvType configuration property will be updated to inform the

device of the network variable type.

For ideal performance, an application using

versions of LNS prior to LNS Turbo Edition

should modify the SnvtId property first, and then the SCPTnvType configuration

property. The operations should be performed in the same transaction. However,
applications using LNS Turbo Edition and later should use the TypeSpec property for all

network variable type changes, since this method supports user-defined types and

standard types, is more efficient, and does not require the application to explicitly

manage the SCPTnvType configuration properties.

Compatibility Case 2 – Devices That Support Old and New Style
NV Type Management

Consider a device that supports both the old SI/SD method of network variable type

modification, and can read the SCPTnvType configuration property. Such an application

should:

1. Define the default value of the network variable with its type_category

set to NVT_CAT_NUL.

2. Honor the SI/SD value if the configuration property’s type_category is

NVT_CAT_NUL (i.e. use the SNVT_ID stored on the device). Otherwise,

honor the value of the configuration property.

First, consider the device being managed by an application using an LNS version prior to

Turbo Edition that does not update the SCPTnvType configuration property. Changes to
the network variable type will result in updating the SI/SD data on the device. The

application device will then use the SI/SD information because the value of the
SCPTnvType configuration property value will remain invalid.

Now consider how an upgrade to Turbo Edition will affect this application. LNS will

recognize that the configuration property value is invalid (its type_category set to

NVT_CAT_NUL) or unknown, so LNS will continue to use the SI/SD to inform the device

of the network variable type. A replace or recommission operation on the device will set
the SI/SD information to be updated, based on the type assigned to the network variable

in the LNS database. Changing the network variable type to a standard type in the LNS

database will cause LNS to update the SCPTnvType configuration property
automatically and to stop updating the SI/SD data for the network variable. The

application will honor the configuration property. Changing the network variable type to

0 (indicating a non-standard type) will cause LNS to update the SCPTnvType
configuration property with a category of NVT_CAT_NUL, and set the SI/SD value in the

physical device to 0.

Next, consider a device being managed by an application that uses the SCPTnvType

configuration property properly, using an LNS version prior to Turbo Edition. In this
case, the application device honors the value of the SCPTnvType configuration property,

since it is valid. When upgrading to LNS Turbo Edition, the LNS database conversion

will recognize that the configuration property is valid, and will update the network
variable type based on that value. A subsequent replace operation will not update the

SI/SD data for that network variable.

Advertising