Periodically locate new webbricks and read current status from all of them.
Description
This event interface discovers webbricks and then peridocally reads there status and creates events for them. The UDP events from webbricks should provide the current status but the U in UDP stands for unrealiable so we periodically check them. (UDP is very light weight in network terms hence it used)
This event handler will generate any of the events defined for webbricks. See information on Webbricks.
Configuration
Part 1
<eventInterface module='EventHandlers.WebbrickStatusQuery' name='WebbrickStatusQuery'>
<eventtype type="">
<eventsource source="time/second" >
<event>
<params>
<!-- every 5 seconds -->
<testEq name="second" value="0"/<
<testEq name="second" value="5"/<
<testEq name="second" value="10"/<
<testEq name="second" value="15"/<
<testEq name="second" value="20"/<
<testEq name="second" value="25"/<
<testEq name="second" value="30"/<
<testEq name="second" value="35"/<
<testEq name="second" value="40"/<
<testEq name="second" value="45"/<
<testEq name="second" value="50"/<
<testEq name="second" value="55"/<
</params>
<scan/>
</event>
Part 2
<event>
<params>
<!-- every 30 seconds -->
<testEq name="second" value="1"/<
<testEq name="second" value="31"/<
</params>
<recover>Go and see whether missing webbricks have returned.</recover>
</event>
</eventsource>
Part 3
<eventsource source="time/runtime" >
<event>
<params>
<testEq name="elapsed" value="5"/<
</params>
<webbrick address="10.100.100.100"/>
</event>
</eventsource>
Part 4
<eventsource source="time/minute" >
<event>
<discover address="10.255.255.255"/>
</event>
</eventsource>
</eventtype>
Part 5
<eventtype type="http://id.webbrick.co.uk/events/webbrick/AA">
<eventsource source="" >
<event>
<discoverFound />
</event>
</eventsource>
</eventtype>
<eventtype type="http://id.webbrick.co.uk/events/webbrick/AT">
<eventsource source="" >
<event>
<discoverFound />
</event>
</eventsource>
</eventtype>
<eventtype type="http://id.webbrick.co.uk/events/webbrick/NN">
<eventsource source="" >
<event>
<discoverFound />
</event>
</eventsource>
</eventtype>
<eventtype type="http://id.webbrick.co.uk/events/webbrick/SS">
<eventsource source="" >
<event>
<discoverFound />
</event>
</eventsource>
</eventtype>
</eventInterface>
Generally this will not need changing.
- The first part is used to trigger a scan every 5 seconds.
- The second part is used to trigger recovery of webbricks thaat have gone away every 30 seconds.
- The third part forecably adds webbricks to the scan list after the WebBrick Gateway has been running for 5 seconds.
- The fourth part is used to start discovery once a minute.
- The fifth part is used to select the events that cause a webbrick to be seen/discovered.
