Application developer’s kit include files, Exception codes – Echelon LNS User Manual
Page 34
LNS Programmer's Guide
20
LNS Turbo Edition servers and clients do not interoperate with clients and servers of
other LNS versions. When updating an LNS site with a central server and remote
clients, the LNS Server PC must be updated first. LNS server-independent mode,
introduced in LNS 3.0, will allow any remote clients that run only in server-independent
mode to be stopped, updated, and restarted some time after the server is updated.
Remote clients that do not operate in server-independent mode should be updated when
the LNS Server PC is. Live updates of LNS servers or clients are not supported, and
server-independent mode is the only LNS client mode that does not require a constant
client-server connection, so this is the only distributed update scenario that Echelon
supports. For more information on server-independent mode, see Independent Clients on
page 41.
Application Developer’s Kit Include Files
The LNS Turbo Edition Application Developer’s Kit has changed from previous LNS
versions in that it does not install any include files or “class wrapper” files for using the
OCX with C++ projects. There were two problems with these files:
• Only C++ was supported. None of the other supported development
environments, such as Visual Basic 6.0, could use the C++ include files.
• With the same definitions in two places (the include files and on the OCX), the
definitions sometimes became inconsistent.
The recommended solution in this and all subsequent releases is to provide all of the
necessary constants on the OCX interface, accessible to C++ users through the #import
“lcaobjsv.ocx” named_guids rename_namespace("lca") directive. For more
information on this, see Chapter 4. As an alternative, you could generate the old class
wrapper files within your project. For more information on this, see Appendix B, LNS,
MFC and ATL.
Remember that if you are not using C++ to develop your LNS application, you can
continue accessing the OCX as in your previous version of LNS.
Exception Codes
As new features are added or defects fixed, some existing LNS features will add new
exception codes to provide more useful information about new or modified failure cases.
For example, prior to Turbo Edition, LNS threw the
SRSTS_NEURON_VERSION_MISMATCH exception (from the obsolete include file
ns_srsts.h) when an attempt to load an application image into a device failed because the
Neuron model number or the system image version number of the device did not match
that of the linked application. LNS will now distinguish these two exception cases. The
following new exception codes have been defined:
lcaErrNsNeuronModelMismatch
"Incompatible Neuron model number."
lcaErrNsFirmwareVersionMismatch
"Incompatible firmware version number."
The
lcaErrNsFirmwareVersionMismatch
value maps to the (now obsolete)
SRSTS_NEURON_VERSION_MISMATCH code, since it is more likely that the system
image version number would differ than the neuron model number.