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 def event = new Event(value, name, deviceId, descriptionText, displayed, linkText, linkText, isStateChange, unit, data)
16 if (app2.functionList[i] instanceof String) {
17 String toCall = app2.functionList[i]
21 app2.functionList[i](event)
25 for (int i = 0;i < app1.eventList.size();i++) {
26 if (app1.eventList[i] == name) {
27 def event = new Event(value, name, deviceId, descriptionText, displayed, linkText, linkText, isStateChange, unit, data)
28 if (app1.functionList[i] instanceof String) {
29 String toCall = app1.functionList[i]
33 app1.functionList[i](event)