Delete functions, Delete functions -12, 4 delete functions – Echelon i.LON 100 e2 Internet Server User Manual

Page 42

Advertising
background image

After its initial invocation, you can use the AlarmGeneratorSet function to overwrite the

values of the global properties defined for the Alarm Generator application. You can also use
it to add new Alarm Generators to the XML file, or to overwrite the configuration of exisiting

Alarm Generators.
Each time you create an Alarm Generator (or any item or instance of an

i.

LON 100

application) using the Set method, the item will be assigned an index number. You will use

that index number to identify that Alarm Generator when writing to its configuration later,
or when referencing it from other functions.
When using the Set function to create an item such as an Alarm Generator, you shoud

consider using output supplied by the corresponding Get function as the basis for your input.
The following procedure describes how you might do so using the Alarm Generator functions.

You could use this algorithm when programming any of the

i.

LON 100 applications.

1) Invoke the AlarmGeneratorList function to generate a list of Alarm Generators that have

been added to the

i.

LON 100. This list includes the index number of each Alarm

Generator.

2) Invoke the AlarmGeneratorGet function, using the list returned by the

AlarmGeneratorList function as the input. The function will return the configuration of

each Alarm Generator included in the list output.

3) Review the output from step 2, and choose an Alarm Generator to serve as your “default”

Alarm Generator. The AlarmGeneratorGet output for this Alarm Generator will serve as

the basis for the next Alarm Generator you create. Modify the values of each property in
the string returned by AlarmGeneratorGet to match the configuration you want for the

new Alarm Generator. This will be more efficient than building the input string for the

Set function from scratch.

NOTE: You must increment the index number assigned to the Alarm Generator, or

remove the index number property from the string created in this step, when using this
algorithm. Otherwise, the next step of this procedure will overwrite the configuration of

the default Alarm Generator you have chosen. Chapters 5-13 describe this in more detail.

4) Invoke the AlarmGeneratorSet function, using the modified string created in Step 3 as

input. The new item is successfully created, without recreating an input string that

defines an entire Alarm Generator configuration from scratch, and with minimal risk of

format errors. Chapters 5-13 will clarify the benefits of this algorithm.

4.6.4 Delete Functions

Use the Delete functions to delete items from an application. For example, use the

AlarmGeneratorDelete function to delete an Alarm Generator. Or, use the DataServerDelete
function to delete a data point.
You must reference the item to be deleted by its index number in the input you supply to the

function.

i.

LON 100 Internet Server Program

4-12

mer’s Reference

Advertising