Creating and redistributing plug ins overview, Installing the developer’s kit, Creating and redistributing plug-ins overview – Echelon LNS Plug-in User Manual

Page 16

Advertising
background image

Creating and Redistributing Plug-ins Overview

You can use the LNS Plug-in Framework Developer’s Kit to create an LNS device plug-in and create
an installation project for your plug-in so that you can provide it to users.

To create a new plug-in, you need to first install the Microsoft .NET Framework Version 2.0
Redistributable Package. You then need to install the LNS Plug-in Framework Developer’s Kit and an
LNS Turbo plug-in director application such as the LonMaker Tool Turbo Edition (3.2 or later) if they
are not already installed on your computer. You need a director application to test your plug-in during
development.

After the required software is installed on your computer, you can begin creating your plug-in. To do
this, you create a new C# or VB.NET plug-in project with Microsoft Visual Studio 2005 (or later),
create the plug-in source files (for the plug-in server, plug-in object, and plug-in form derived classes),
and optionally implement command registration for the DeviceTemplate and LonMarkObject scoped
plug-in commands (note that this is not automatically implemented for you by the LNS Plug-in
Framework, version 1.1).

During the development of your plug-in, you can debug it by generating trace information and using
the OLE/COM ObjectViewer to display the registration information.

After you create your device plug-in, you can create an LNS plug-in installer based on the framework
so that you can redistribute your plug-in.

Note: During development, you can also refer to the ACME plug-in example that is installed on your
computer by the LNS Plug-in Framework Developer’s Kit. The ACME plug-in example is located in
the LonWorks\ObjectServer\Examples\PluginFramework folder on your computer, and it is provided
in both C# and VB.NET programming languages. For more information on using the ACME C#
plug-in example to view the behavior of a plug-in, see Appendix F, Running the ACME Example C#
Plug-in
.

Installing the Developer’s Kit

The LNS Plug-in Framework Developer’s Kit is automatically installed by the NodeBuilder FX tool,
and it is also available as a single-executable installer that you can download from the Echelon Web
site. To install the developer’s kit, follow these steps:

1. Install the Microsoft .NET Framework Version 2.0 Redistributable Package (or newer) if it is not

already installed on your computer. The LNS Plug-in Framework and example plug-in will not
install or run properly unless the .NET 2.0 Framework (or newer) is installed on your computer.
See Redistributing Your Plug-in later in this chapter for details. To check whether your computer
has this software and download it (if necessary), go to the Microsoft Windows Update Web page
at

http://update.microsoft.com

.

2. Install the LNS director application that will be used for plug-in testing. If not already set, this

will set the root directory for the LNS components (for most Echelon products, this directory will
appear by default at [Windows System Drive]\LonWorks, and is known as the LonWorks
directory). It will also install the LNS runtime that is required to successfully run the ACME
example plug-in.

3. If you do not have the NodeBuilder FX tool installed on your computer, download the LNS

Plug-in Developer’s Kit from the Echelon Web site at
http://

www.echelon.com/support/downloads

, and then install it.

4. After the LNS Plug-in Framework Developer’s Kit and other requirements have been installed

(either by installing the NodeBuilder FX tool, or downloading it from the Echelon and installing it
standlaone), the following folders will reside in the LonWorks directory on your computer.

Advertising