beautypg.com

Creating fpm application licenses – Echelon i.LON SmartServer 2.0 User Manual

Page 19

background image

i.LON SmartServer 2.0 Programming Tools User’s Guide

5

iLonSystemWbdEnd image on your SmartServer to iLonSystem, reboot the SmartServer, create a
debug configuration of your FPM in the i.LON SmartServer 2.0 Programming Tool and upload it to
your SmartServer, and then connect the Workbench debugger to the iLonSystemWbd or
iLonSystemWbdEnd image on your computer via the target server. For more information on how to
do this, see Chapter 5, Creating FPMs.

If you are not using Wind River Workbench to debug your FPMs, you can still perform some
debugging by adhering to the following guidelines when developing your FPMs:

1. Physically connect the computer running the i.LON SmartServer 2.0 Programming Tool to the

i.LON console port using an RS-232 null modem cable. This enables you to use a Terminal
emulator such as Windows HyperTerminal to view the i.LON console port and debug your FPMs
during runtime. After the FPM is initialized you can use Telnet to view the i.LON console port.

2. Back up the FPM project frequently. Always make a back up after you make significant changes

to an FPM application and successfully compile it.

3. Bracket comments around those portions of the FPM application that you have written. For

example, you can do the following:

//

mycode – begin --------------------------------------

out1

= in1 + in2;

//

mycode – end ----------------------------------------

4. Add your user help functions to the UFPT<FPM>_Utils.cpp file (this file is created when you

create a new FPM project). This further isolates your code for debugging, and it enables you to
port the code over to another FPM project.

5. Insert printf()statements in your code frequently. This enables you to do some debugging

with the console port of the i.LON during runtime, as the console port will receive the printf
()

statements. For example, you can do the following:

printf ("[%s

%i] value of %s: %d",

__FILE__,

__LINE__,

in1.GetDpPropertyAsString(FPM::Dp::cfgUCPTname),
*in1);
Note: The console port displays the status of your FPM during a reboot.

It is especially important to follow these guidelines because the compiler errors you may receive may
only have a generic description that does not indicate which line of code caused the error. In addition,
the errors may not appear on the actual line of code causing the error; instead, an error may appear one
or two lines above the incorrect code.

Creating FPM Application Licenses

You can create FPM application 1icenses and make your FPMs available to customers, who can
implement your third-party FPMs on their SmartServers. To create FPM application 1icenses, you
need to create an FPM licensing tool, enable license validation in your FPM application, build a release
version of your licensed FPM, use the i.LON License Generator program to create FPM license files,
and then provide the FPM licenses and other required files to customers. Customers must order a
separate FPM application license from you to use one of your licensed FPMs on their SmartServers.

The i.LON SmartServer 2.0 Programming Tools includes an i.LON License Generator that you can use
to create your own FPM application licensing tool. The i.LON License Generator includes the i.LON
License Generator user interface, a sample security DLL file (LicenseSecurityHMACMD5.dll), and a
sample XML file (iLONLicenseGenValuesSample.xml) that provides the structure and sample pre-
defined values of the i.LON License Generator user interface. To create your FPM application
licensing tool, you need to build a security DLL file named LicenseSecurity.dll, and create a license
generator configuration file named iLONLicenseGenValues.xml that has pre-defined values for the
i.LON License Generator user interface. Note that if you cannot build the security DLL file, you can