External smartserver data point methods, List() – Echelon i.LON SmartServer 2.0 User Manual
Page 232
218
Appendix A - Programmer’s Reference
External SmartServer Data Point Methods
In an FPM application, you can use the List() method with a specific xSelect syntax to obtain a list
of external data points on the SmartServer. External data points include those data points on the
internal SmartServer device [i.LON App (Internal)] and the data points of the external devices
connected to the SmartServer.
After a data point ID is obtained with the List() method, you can use the Read() and Write()
methods in an FPM application to evaluate and update the data point. In addition, you can use the
get()
methods described in the FPM Application Data Point Property Methods section in this
appendix to read the properties of the external data points on the SmartServer.
Notes: Using the List(), Read(), and Write()methods in an FPM application may significantly
impact the performance of the SmartServer; therefore, it is recommended that you use these methods
sparingly.
List()
SYNTAX
STATUS List(const string& rsXSelect, FPM::FpmItemColl_t&
rListUniqueIndexes);
In the string parameter, you specify an xSelect statement to be used to filter the external data
points on the SmartServer by name. The format used for a data point name is as follows:
<network>/<channel>/<device>/<functional block>/<data point>. This means that, for example,
you can obtain all the data points of the Digital Output 1 functional block on the SmartServer. To
do this, you would specify an xSelect statement that acquires all unique data points with names
starting with “
Net/LON/i.LON App/Digital Input 1”
.
In the rListUniqueIndexes parameter, you specify the collection of structures that contain
item IDs that are to be used in the Read routine.
The STATUS value returned by this method can either be ERROR or OK
EXAMPLE
The following example demonstrates a List()method that obtains the data points in the digital
output functional block of a lamp that is connected to the SmartServer.
FpmItemInfoColl_t items;
if ((List("//Item[starts-with(
UCPTname,\”Net/LON/Lamp/Digital Output/\”)]", items)) == OK)
{
//insert code here
}
After the list of the data points in the digital output functional block is acquired, the properties of
the listed data points can be obtained using the get() data point property methods. The
following example demonstrates how to get the properties of the data points returned by the
List()
method.
FpmItemInfoColl_t::iterator itEnd = items.end();
for(FpmItemInfoColl_t::iterator it = items.begin();
it != itEnd; ++it)
{
CFpmItemInfo &v = (*it);
printf("UCPTname: %s :: UCPTaliasName: %s :: UCPTindex: [%d]
:: ItemCfgDepth: %d \n",