Running the acme example c# plug in, Running the acme example c# plug-in – Echelon LNS Plug-in User Manual

Page 62

Advertising
background image

Running the ACME Example C# Plug-in

After installing the LNS Plug-in Framework Developer’s Kit, the ACME Example C# Plug-in will be
installed on your development computer in the same way as any LNS plug-in, which means that it will
be visible to all director applications. As a result, you may want to unregister the ACME Example C#
Plug-in to prevent networks that you create from registering the plug-in and popping up tracing
message boxes. To unregister the ACME Example C# Plug-in, run it in standalone mode from the
“Run ACME Example C# Plug-in” shortcut and press the unregister button. This will prevent
networks that you create from registering the plug-in and popping up tracing message boxes.

The ACME Example C# Plug-in demonstrates the behavior plug-ins and directors exhibit when the
plug-in is initially registered on a specific computer, and then registered within a specific LNS network
database on that computer. This plug-in and director behavior is described as follows:

• At plug-in installation, the plug-in installer creates Windows registry entries that tell the director

that the plug-in exists on the computer. As described in Chapter 2, Creating and Redistributing
LNS Device Plug-ins
, the contents of the registry entries for your plug-in will be determined by
simple table entries during plug-in development.

• When a director creates a new LNS database, it can choose to call a plug-in to have it register

itself to be used in that database.

• When a plug-in registers itself in a database, it puts database entries in that tell which objects the

plug-in can act on and what commands it can perform on those objects.

• Once the plug-in is registered in that database, the director can call the plug-in to execute those

commands on those objects

The ACME Example C# Plug-in example provides pop-up progress message boxes for each plug-in
API command issued, and also for some internal actions such as creating and destroying plug-in
objects. Note that this is not normally an interactive process and is only done in this example to show
the code execution order.

To observe the behavior of the ACME Example C# Plug-in, follow these steps:

1. Start the director application. This example uses the LonMaker tool as the direction application.

2. Create a new network database or open an existing database.

The following image shows the LonMaker tool plug-in registration window, which is shown by
default during the process of opening a network database. Notice that the ACME Example C#
Plug-in is shown to be in the Registration Pending state, which will be the case after the LNS
Plug-in Framework Developer’s Kit has been installed, you open a network database that already
exists (and therefore may have all of the other plug-ins registered already), and press the Register
button.

Advertising