All event handlers/interfaces use a common structure for their configuration data.
Loader
The event interface loader looks in each XML configuration file for XML elements called EventInterface. This element has 2 or 3 attributes that control the loading of the event handler. (It is possible to develop custom handlers for bespoke applications). The contents of this element are used to configure the event handler.
Common event consumers
A lot of the event handlers use a common style to their configuration. This consists of one or more eventtype elements whose attribute type is either an empty string to match all possible event types or a specific event type, in the long term this will normally be the empty string.
Each eventtype element contains one or more eventsource elements that again may be the empty string or an event source string. This will not normally be blank, unless you are selecting all events of a specific event type.
Once the event has passed this first level filter there are one or more event elements that can contain a further level of filtering based on the other data of the source event and some event haandler specific data thaat controls what happens when the event passes all the filtering.
The third level filter uses the params element. See for further details in parameter filtering. See information on Events
Once an event has passed these 3 levels of filtering the event handler processes the event element. In some cases the event element is empty if the event handler requires no further data to perform its action.
Examples
<eventInterface module='EventHandlers.EventMapper' name='EventMapper' category='debug'>
<eventtype type="http://id.webbrick.co.uk/events/time/sunrise">
<eventsource source="" >
<event>
<newEvent type="http://id.webbrick.co.uk/events/state" source="background">
<other_data val='/static/images/backgrounds/day.png' val2='22.0'/>
</newEvent>
</event>
</eventsource>
</eventtype>
<eventInterface>
<eventInterface module='EventHandlers.EventMapper' name='EventMapper' category='debug'>
<eventtype type="">
<eventsource source="time/minute" >
<event>
<param>
<testEq name='minute' value='5' />
</param>
<newEvent type="http://id.webbrick.co.uk/events/state" source="background">
<other_data val='/static/images/backgrounds/day.png' val2='22.0'/>
</newEvent>
</event>
</eventsource>
</eventtype>
<eventInterface>
