Load, Load o – Echelon OpenLNS User Manual

Page 77

Advertising
background image

OpenLNS Programmer's Reference

40

Load

Summary

Loads the application image specified by the AppImagePath

property into a device.
This method loads the application image specified by the

AppImagePath property into a device. The application image

must be in the binary format used by OpenLNS, (an APB file

type).
A transaction is started implicitly when this method is called.

If OpenLNS detects an error while the load is in progress, it

automatically cancels the transaction. If the transaction is

canceled after the download has begun, the application

device will be left in the applicationless state.
The state of the device at the end of the application loading

process depends on the state of the device before the process

began and the image that was loaded, as follows:

If the device was applicationless or unconfigured (for

example, did not have a network address) before the

loading process began, OpenLNS leaves the device in the

unconfigured state.

If the device was configured and the application that was

previously in the device and the application that was

loaded have the same program ID (and thus the same

external interface), OpenLNS restores the device’s

network image (address and connection information) to

the state it was in before the application load started.

If the device was configured, and the application that was

previously in the device and the application that was

loaded do not have the same program ID (and thus may

not have the same external interface), the Object Server

leaves the device in the unconfigured state. This will

cause the NS, #38 lcaErrNsProgramidMismatch

exception to be generated. In this case, you should

upgrade the device’s interface with the Upgrade method

before you load the new application. This will ensure that

the program IDs of the device and the new application

match.

If the device had been previously commissioned, and the

device's old application image and its new application

image have the same program ID but a different external

interface, the OpenLNS Object Server will leave the

device in the unconfigured state, and the NS, #59

lcaErrNsProgramIntfMismatch exception will be thrown.

Per LonMark guidelines, LNS requires that each

program ID be associated with only one external

interface. This means that all components and properties

of each external interface using a given program ID must

be identical. However, LNS may not detect all violations

of this rule, as it would be very time consuming to

validate this on every commission or after every

Advertising