beautypg.com

Processing discovered devices – Echelon i.LON SmartServer 2.0 User Manual

Page 210

background image

i.LON SmartServer 2.0 Programmer’s Reference

14-10

Option Description

STATUS_CANCEL
STATUS_PENDING
STATUS_DONE
STATUS_FAIL
STATUS_INVOKE

When this property is STATUS_PENDING, the network
scan is ongoing. When this property is STATUS_DONE,
the network scan is finished. See Checking the Network
Scan Status
for more information.

An E_LonString type with a LonFormat attribute that must be
set to <”UCPTscan”>. This property must be set to
NST_ILON_DOMAIN.

14.1.3.2.1 Checking the Network Scan Status

After you initiate the network scan, you can check its status to see whether it is still being performed or
it has been completed. The following example demonstrates how to check the status of a network
scan:


Net

To check the network scan status, you supply the InvokeCmd function one element with a
LON_Network_Scan_Command_Invoke xsi type and a LONNetworkEScanCommand attribute that is
set to “GetScan”. The element only requires the of the network being scanned.

The InvokeCmd function returns the status of the network scan.


0

Net

ScanOnce
2009-12-09T17:52:19.570-08:00

LonFormat="UCPTstatus">STATUS_DONE


NST_ILON_DOMAIN
0

14.1.3.2.2 Processing Discovered Uncommissioned Devices

When you scan a network for uncommissioned devices, the SmartServer automatically generates a
Data Log named “/#DeviceDiscovery” that includes entries for each uncommissioned
device discovered by the network scan. Each entry includes a Net/VirtCh/iLON
System/VirtFb/LonDiscoveryMessage
data point that contains the program ID and Neuron ID of a
discovered device. You will need to parse the program ID and Neuron ID from each data point, get
the device template for each device based off the program ID, and then create and install the devices.
The C#, VB, and JAVA programming example for discovering and installing uncommissioned devices
in Chapters 21 and 22 demonstrate how to do this.

You can periodically read the data log for uncommissioned devices while the network scan is ongoing.
This approach lets you begin processing uncommissioned devices without waiting; however, it is more
complex. This is because you need to process the in the HEADER of the last