List, get, set and delete functions, List functions, Get functions – Echelon i.LON 100 e2 Internet Server User Manual
Page 41: Set functions, List, get, set and delete functions -11, List functions -11, Get functions -11, Set functions -11, 6 list, get, set and delete functions, 1 list functions
LON 100 Internet Server Programmer’s Reference
4-11
4.6 List, Get, Set and Delete Functions
The SOAP interface for each
i.
LON 100 application contains a List function, a Get function, a
Set function, and a Delete function. Together, these functions make up a symmetric
interface. You can use the response from the List command as the input to the Get command.
You can use the response from the Get command as the input to the Set command. This
section provides an overview of this feature, and describes how you can take advantage of it
when using the SOAP interface.
NOTE: The SOAP interface for some applications contains additional SOAP functions you
can use to manage your XML files. These functions are listed later in this chapter, and
described in detail in Chapters 5-13.
4.6.1 List Functions
Use the List function to retrieve a list of all items created for an application. For example,
the AlarmGeneratorList function returns a list containing the index number, description,
last update time and functional block name of each Alarm Generator that you have added to
the
i.
LON 100, with custom SOAP applications or with the
i.
LON 100 Configuration
Software. Similarly, the DataLoggerList function returns a list containing the index number,
last update time, description and functional block name of each Data Logger that you have
added to the
i.
LON 100.
4.6.2 Get Functions
Use the Get function to retrieve the configuration of any items or instances that you have
added to an application. For example, you would use the AlarmGeneratorGet function to
retrieve the configuration of an Alarm Generator. Or, you would use DataLoggerGet to
retrieve the configuration of a Data Logger. You must reference the item whose configuration
is to be retrieved by its index number, which is defined when the item is created.
Now, consider a scenario where you have used the AlarmGeneratorList function to retrieve a
list containing the index number of each Alarm Generator that has been added to the
i.
LON
100. You could use the list as the input for the AlarmGeneratorGet function. The
AlarmGeneratorGet function would return the configuration of all the items included in the
list.
You can also use the Get function to retrieve the configuration of a single item, by supplying
the index number assigned to the item when it was created as input.
4.6.3 Set Functions
You can use the Set function to write to each of the XML files described in the previous
section. When you invoke the Set function for an application for the first time, the associated
XML file will be created in the /root/config/software directory of the
i.
LON 100, if it has not
already been created. All data defined in the input passed to the function will be added to the
XML file. Following this, you can use the Set function to add more data to the XML file, or to
overwrite existing data.
For example, the first time an application invokes the AlarmGeneratorSet function, the
AlarmGenerator.XML file will be created in the /root/config/software directory of the
i.
LON
100 (if it has not already been created by another application). The file will contain an
element for each Alarm Generator defined in the input passed to the function, as well as the
global configuration properties defined in the input passed to the function.