1 /////////////////////////////////////////////////////////////////////
2 def eventHandler(LinkedHashMap eventDataMap) {
3 def value = eventDataMap["value"]
4 def name = eventDataMap["name"]
5 def deviceId = eventDataMap["deviceId"]
6 def descriptionText = eventDataMap["descriptionText"]
7 def displayed = eventDataMap["displayed"]
8 def linkText = eventDataMap["linkText"]
9 def isStateChange = eventDataMap["isStateChange"]
10 def unit = eventDataMap["unit"]
11 def data = eventDataMap["data"]
13 for (int i = 0;i < app2.eventList.size();i++) {
14 if (app2.eventList[i] == name &&
15 (app2.valueList[i] == "" || app2.valueList[i] == value)) {
16 def event = new Event(value, name, deviceId, descriptionText, displayed, linkText, linkText, isStateChange, unit, data)
17 if (app2.functionList[i] instanceof String) {
18 String toCall = app2.functionList[i]
22 app2.functionList[i](event)
26 for (int i = 0;i < app1.eventList.size();i++) {
27 if (app1.eventList[i] == name &&
28 (app1.valueList[i] == "" || app1.valueList[i] == value)) {
29 def event = new Event(value, name, deviceId, descriptionText, displayed, linkText, linkText, isStateChange, unit, data)
30 if (app1.functionList[i] instanceof String) {
31 String toCall = app1.functionList[i]
35 app1.functionList[i](event)