Index

EventMapper

  1. Description
  2. Configuration
  3. Example

Translate any event into one or more new events.

Description

This event handler is typically used to map from one event name to a more user friendly event name, i.e. convert WebBrick UDP events from WebBrick and channel numbers to location and device connected.

Configuration

The handler specific element in this case is called newEvent, this has two attributes for the new event type and source. There may be an other_data element and a copy_other_data element, the other_data contains attributes to be attached to the event, the copy_other_data specifies attributes to be copied from the originating event. The newEvent element may be repeated.

Example

<?xml version="1.0" encoding="utf-8"?>
<eventInterfaces>
    <eventInterface module='EventHandlers.EventMapper' name='EventMapper'>
        <eventtype type='http://id.webbrick.co.uk/events/webbrick/DO'>
            <eventsource source='webbrick/100/DO/5'>
                <event>
                    <params>
			<testEq type='int' name='state'> 
			    <value>0<value/>
			</testEq>
                    </params>
                    <newEvent source='boiler/IsOff' type='internal'>
                    </newEvent>
                </event>
                <event>
                    <params>
			<testEq name='state'> 
			    <value>1<value/>
			</testEq>
                    </params>
                    <newEvent source='boiler/IsOn' type='internal'>
                    </newEvent>
                </event>
            </eventsource>
        </eventtype>
    </eventInterface>
</eventInterfaces>

This example creates boiler/IsOn and bolier/IsOff events from WebBrick digital outputs.