Performing diagnostics on lonmarkobjects – Echelon LNS User Manual
Page 145
LNS Programmer's Guide
131
notify some other component of your application to perform a thorough test on any
suspect devices. For more guidelines on creating LNS event handlers, see Event
Handling on page 67.
Note that when a router becomes unattached, this will usually prevent LNS from
communicating with any devices on the far side of the router, and it will prevent
communication between devices on channels connected by the router. In this case, LNS
will generate an OnAttachmentEvent for the router, but not for each affected device.
Performing Diagnostics on LonMarkObjects
As described in Device Interfaces on page 104, each application device contains a group of
LonMarkObject objects that represent the LonMark Functional Blocks on that device.
The LNS Object Server recognizes LonMark Functional Blocks defined in devices that
conform to the LonMark Application-Layer Interoperability Guidelines, version 3.0 or
later. Each LonMarkObject has a Status property that reflects the current status of
the LonMark Functional Block represented by that specific LonMarkObject.
Each LonMarkObject also contains a SelfTestResults property. When your
application reads the SelfTestResults property, the device application will perform a
self-test on the LonMarkObject, and return an ObjectStatus object describing the
results of the self-test. If the self-test takes more than 20 seconds to complete, an
exception indicating failure will be raised. In this case, poll the SelfTestInProgress
property of the LonMarkObject until it returns False. Then, check the FailSelfTest
property to determine why the self-test failed. Another property (LonMarkAlarm)
indicates the current alarm status of the LonMarkObject object, if the object supports
alarms.
Figure 6.3 depicts these steps.