Commit #7: eventHandler and event queue are unique between two apps now. (Similar...
authoramiraj <amiraj.95@uci.edu>
Tue, 9 Jul 2019 20:31:06 +0000 (13:31 -0700)
committeramiraj <amiraj.95@uci.edu>
Tue, 9 Jul 2019 20:31:06 +0000 (13:31 -0700)
31 files changed:
Extractor/extractedObjectsApp1.groovy
Extractor/extractedObjectsApp2.groovy
Extractor/outGlobal.groovy
GlobalVariables/GlobalVariablesBothApps.groovy
GlobalVariables/GlobalVariablesEachApp.groovy
Methods/eventHandler.groovy
Runner.py
bin/main/App1.class [new file with mode: 0644]
bin/main/App2.class [new file with mode: 0644]
bin/main/ContactSensor/Contacting.class [new file with mode: 0644]
bin/main/ContactSensor/Contacts.class [new file with mode: 0644]
bin/main/Event/Event.class [new file with mode: 0644]
bin/main/Location/LocationVar.class [new file with mode: 0644]
bin/main/Location/Phrase.class [new file with mode: 0644]
bin/main/Lock/Locking$_lock_closure1.class [new file with mode: 0644]
bin/main/Lock/Locking$_unlock_closure2.class [new file with mode: 0644]
bin/main/Lock/Locking.class [new file with mode: 0644]
bin/main/Lock/Locks$_lock_closure1.class [new file with mode: 0644]
bin/main/Lock/Locks$_unlock_closure2.class [new file with mode: 0644]
bin/main/Lock/Locks.class [new file with mode: 0644]
bin/main/Logger/Logger.class [new file with mode: 0644]
bin/main/Switch/Switches$_off_closure2.class [new file with mode: 0644]
bin/main/Switch/Switches$_on_closure1.class [new file with mode: 0644]
bin/main/Switch/Switches.class [new file with mode: 0644]
bin/main/Switch/Switching$_off_closure2.class [new file with mode: 0644]
bin/main/Switch/Switching$_on_closure1.class [new file with mode: 0644]
bin/main/Switch/Switching.class [new file with mode: 0644]
bin/main/appTouch/Touched.class [new file with mode: 0644]
bin/main/main$_closure1.class [new file with mode: 0644]
bin/main/main.class [new file with mode: 0644]
main.groovy

index c3e09ad47f04b1d9f085ea346d78654a83868369..d20521795ac307505d28f9ed762b0fc632fbba4e 100644 (file)
@@ -5,7 +5,7 @@ def contact
 //Global variable for number!
 def minutesLater = 1
 //Global variable for number!
 //Global variable for number!
 def minutesLater = 1
 //Global variable for number!
-def secondsLater = 2
+def secondsLater = 1
 //Global variable for recipients!
 def recipients = ['AJ']
 //Global variable for phone number!
 //Global variable for recipients!
 def recipients = ['AJ']
 //Global variable for phone number!
index 4363a1859b578445b4c942b2857175483cef5ac9..77277fefb97a0ad9a41c9b87223ebea4b6d6863d 100644 (file)
@@ -7,7 +7,7 @@ def lock1
 //Global variable for mode!
 def newMode = "away"
 //Global variable for number!
 //Global variable for mode!
 def newMode = "away"
 //Global variable for number!
-def waitfor = 10
+def waitfor = 1
 //Global Object for functions in subscribe method!
 def installed = this.&installed
 //Global Object for functions in subscribe method!
 //Global Object for functions in subscribe method!
 def installed = this.&installed
 //Global Object for functions in subscribe method!
index b22c362b3154f091ae89497afc9bccc3e8f5ad9a..c1c09181fb46862c40dd0087828fd9257da9fa4f 100644 (file)
@@ -3,4 +3,4 @@
 //Global Object for class contactSensor!
 @Field def contactObject = new Contacting(sendEvent, 1)
 //Global Object for class Switch!
 //Global Object for class contactSensor!
 @Field def contactObject = new Contacting(sendEvent, 1)
 //Global Object for class Switch!
-@Field def switchObject = new Switching(sendEvent, 2)
+@Field def switchObject = new Switching(sendEvent, 1)
index dea126a4f83ee0573c5fa4f16b8d394d01cf475f..0c6751b1299ca768bba4d0e155d4ba4093ad7a18 100644 (file)
@@ -1,9 +1,10 @@
 //Create a global variable for send event
 @Field def sendEvent = {eventDataMap -> 
 //Create a global variable for send event
 @Field def sendEvent = {eventDataMap -> 
-                       app1.eventHandler(eventDataMap)
-                       app2.eventHandler(eventDataMap)
+                       eventHandler(eventDataMap)
                        }
 //Object for location
 @Field def locationObject = new LocationVar()
 //Object for touch
 @Field def appObject = new Touched(sendEvent, 0)
                        }
 //Object for location
 @Field def locationObject = new LocationVar()
 //Object for touch
 @Field def appObject = new Touched(sendEvent, 0)
+//Create a global list for events
+@Field def evt = []
index 7d44e0c1efc5db8fba08c9fc6c8fe10c8774dc5c..2b6544cd497c325e87da21635e183b8d4a683554 100644 (file)
@@ -14,5 +14,3 @@ def eventList = []
 def timersFuncList = []
 //Create a global list for timer schedulers
 def timersList = []
 def timersFuncList = []
 //Create a global list for timer schedulers
 def timersList = []
-//Create a global list for events
-def evt = []
index eee7a25df54da0936718499ce3ca5237154570e8..5c8fc2d0b6285b75ffae09b89057d536c437ef17 100644 (file)
@@ -9,9 +9,23 @@ def eventHandler(LinkedHashMap eventDataMap) {
        def isStateChange = eventDataMap["isStateChange"]
        def unit = eventDataMap["unit"]
        def data = eventDataMap["data"]
        def isStateChange = eventDataMap["isStateChange"]
        def unit = eventDataMap["unit"]
        def data = eventDataMap["data"]
-       
-       for (int i = 0;i < eventList.size();i++) {
-               if (eventList[i] == name) {
+       def minSize
+       def smallest
+
+       //make search efficient
+       if (app1.eventList.size() == app2.eventList.size()) {
+               minSize = app1.eventList.size()
+               smallest = "equal"
+       } else if (app1.eventList.size() < app2.eventList.size()) {
+               minSize = app1.eventList.size()
+               smallest = "app1"
+       } else {
+               minSize = app2.eventList.size()
+               smallest = "app2"
+       }
+
+       for (int i = 0;i < minSize;i++) {
+               if (app1.eventList[i] == name) {
                        evt.add(new Event())
                        evt[-1].value = value
                        evt[-1].name = name
                        evt.add(new Event())
                        evt[-1].value = value
                        evt[-1].name = name
@@ -23,7 +37,57 @@ def eventHandler(LinkedHashMap eventDataMap) {
                        evt[-1].isStateChange = isStateChange
                        evt[-1].unit = unit
                        evt[-1].data = data
                        evt[-1].isStateChange = isStateChange
                        evt[-1].unit = unit
                        evt[-1].data = data
-                       functionList[i](evt[-1])
+                       app1.functionList[i](evt[-1])
+               }
+               if (app2.eventList[i] == name) {
+                       evt.add(new Event())
+                       evt[-1].value = value
+                       evt[-1].name = name
+                       evt[-1].deviceId = deviceId
+                       evt[-1].descriptionText = descriptionText
+                       evt[-1].displayed = displayed
+                       evt[-1].linkText = linkText
+                       evt[-1].displayName = linkText
+                       evt[-1].isStateChange = isStateChange
+                       evt[-1].unit = unit
+                       evt[-1].data = data
+                       app2.functionList[i](evt[-1])
                }
        }
                }
        }
+
+       if (smallest == "app1") {
+               for (int i = minSize;i < app2.eventList.size();i++) {
+                       if (app2.eventList[i] == name) {
+                               evt.add(new Event())
+                               evt[-1].value = value
+                               evt[-1].name = name
+                               evt[-1].deviceId = deviceId
+                               evt[-1].descriptionText = descriptionText
+                               evt[-1].displayed = displayed
+                               evt[-1].linkText = linkText
+                               evt[-1].displayName = linkText
+                               evt[-1].isStateChange = isStateChange
+                               evt[-1].unit = unit
+                               evt[-1].data = data
+                               app2.functionList[i](evt[-1])
+                       }
+               }
+       } else if (smallest == "app2") {
+               for (int i = minSize;i < app1.eventList.size();i++) {
+                       if (app1.eventList[i] == name) {
+                               evt.add(new Event())
+                               evt[-1].value = value
+                               evt[-1].name = name
+                               evt[-1].deviceId = deviceId
+                               evt[-1].descriptionText = descriptionText
+                               evt[-1].displayed = displayed
+                               evt[-1].linkText = linkText
+                               evt[-1].displayName = linkText
+                               evt[-1].isStateChange = isStateChange
+                               evt[-1].unit = unit
+                               evt[-1].data = data
+                               app1.functionList[i](evt[-1])
+                       }
+               }
+       }       
 }
 }
index 2d32581177891961f8996684c3492959ea20fa09..0514c39842c402457c87facad62671ec51ada089 100644 (file)
--- a/Runner.py
+++ b/Runner.py
@@ -42,6 +42,10 @@ Out.write("import Location.Phrase\n")
 Out.write("import appTouch.Touched\n")
 Out.write("import Event.Event\n")
 Out.write("\n")
 Out.write("import appTouch.Touched\n")
 Out.write("import Event.Event\n")
 Out.write("\n")
+Out.write("//Global eventHandler\n")
+for line in eventHandler:
+       Out.write(line)
+Out.write("\n")
 Out.write("//GlobalVariables for both Apps\n")
 for line in GlobalVariablesBothApps:
        Out.write(line)
 Out.write("//GlobalVariables for both Apps\n")
 for line in GlobalVariablesBothApps:
        Out.write(line)
@@ -84,8 +88,6 @@ for line in sendNotificationToContacts:
        Out.write("\t"+line)
 for line in sendSms:
        Out.write("\t"+line)
        Out.write("\t"+line)
 for line in sendSms:
        Out.write("\t"+line)
-for line in eventHandler:
-       Out.write("\t"+line)
 Out.write("\n")
 Start = 0
 for line in App1:
 Out.write("\n")
 Start = 0
 for line in App1:
@@ -145,8 +147,6 @@ for line in sendNotificationToContacts:
        Out.write("\t"+line)
 for line in sendSms:
        Out.write("\t"+line)
        Out.write("\t"+line)
 for line in sendSms:
        Out.write("\t"+line)
-for line in eventHandler:
-       Out.write("\t"+line)
 Out.write("\n")
 Start = 0
 for line in App2:
 Out.write("\n")
 Start = 0
 for line in App2:
diff --git a/bin/main/App1.class b/bin/main/App1.class
new file mode 100644 (file)
index 0000000..796d062
Binary files /dev/null and b/bin/main/App1.class differ
diff --git a/bin/main/App2.class b/bin/main/App2.class
new file mode 100644 (file)
index 0000000..22dbf9b
Binary files /dev/null and b/bin/main/App2.class differ
diff --git a/bin/main/ContactSensor/Contacting.class b/bin/main/ContactSensor/Contacting.class
new file mode 100644 (file)
index 0000000..5f5e0b1
Binary files /dev/null and b/bin/main/ContactSensor/Contacting.class differ
diff --git a/bin/main/ContactSensor/Contacts.class b/bin/main/ContactSensor/Contacts.class
new file mode 100644 (file)
index 0000000..51bed71
Binary files /dev/null and b/bin/main/ContactSensor/Contacts.class differ
diff --git a/bin/main/Event/Event.class b/bin/main/Event/Event.class
new file mode 100644 (file)
index 0000000..2f7f0e2
Binary files /dev/null and b/bin/main/Event/Event.class differ
diff --git a/bin/main/Location/LocationVar.class b/bin/main/Location/LocationVar.class
new file mode 100644 (file)
index 0000000..6b600fd
Binary files /dev/null and b/bin/main/Location/LocationVar.class differ
diff --git a/bin/main/Location/Phrase.class b/bin/main/Location/Phrase.class
new file mode 100644 (file)
index 0000000..9c29d56
Binary files /dev/null and b/bin/main/Location/Phrase.class differ
diff --git a/bin/main/Lock/Locking$_lock_closure1.class b/bin/main/Lock/Locking$_lock_closure1.class
new file mode 100644 (file)
index 0000000..516079e
Binary files /dev/null and b/bin/main/Lock/Locking$_lock_closure1.class differ
diff --git a/bin/main/Lock/Locking$_unlock_closure2.class b/bin/main/Lock/Locking$_unlock_closure2.class
new file mode 100644 (file)
index 0000000..90197ad
Binary files /dev/null and b/bin/main/Lock/Locking$_unlock_closure2.class differ
diff --git a/bin/main/Lock/Locking.class b/bin/main/Lock/Locking.class
new file mode 100644 (file)
index 0000000..9e966cf
Binary files /dev/null and b/bin/main/Lock/Locking.class differ
diff --git a/bin/main/Lock/Locks$_lock_closure1.class b/bin/main/Lock/Locks$_lock_closure1.class
new file mode 100644 (file)
index 0000000..ca70ed1
Binary files /dev/null and b/bin/main/Lock/Locks$_lock_closure1.class differ
diff --git a/bin/main/Lock/Locks$_unlock_closure2.class b/bin/main/Lock/Locks$_unlock_closure2.class
new file mode 100644 (file)
index 0000000..6a77013
Binary files /dev/null and b/bin/main/Lock/Locks$_unlock_closure2.class differ
diff --git a/bin/main/Lock/Locks.class b/bin/main/Lock/Locks.class
new file mode 100644 (file)
index 0000000..93aa14a
Binary files /dev/null and b/bin/main/Lock/Locks.class differ
diff --git a/bin/main/Logger/Logger.class b/bin/main/Logger/Logger.class
new file mode 100644 (file)
index 0000000..492d200
Binary files /dev/null and b/bin/main/Logger/Logger.class differ
diff --git a/bin/main/Switch/Switches$_off_closure2.class b/bin/main/Switch/Switches$_off_closure2.class
new file mode 100644 (file)
index 0000000..973337d
Binary files /dev/null and b/bin/main/Switch/Switches$_off_closure2.class differ
diff --git a/bin/main/Switch/Switches$_on_closure1.class b/bin/main/Switch/Switches$_on_closure1.class
new file mode 100644 (file)
index 0000000..cd4028c
Binary files /dev/null and b/bin/main/Switch/Switches$_on_closure1.class differ
diff --git a/bin/main/Switch/Switches.class b/bin/main/Switch/Switches.class
new file mode 100644 (file)
index 0000000..d246380
Binary files /dev/null and b/bin/main/Switch/Switches.class differ
diff --git a/bin/main/Switch/Switching$_off_closure2.class b/bin/main/Switch/Switching$_off_closure2.class
new file mode 100644 (file)
index 0000000..7fdefd3
Binary files /dev/null and b/bin/main/Switch/Switching$_off_closure2.class differ
diff --git a/bin/main/Switch/Switching$_on_closure1.class b/bin/main/Switch/Switching$_on_closure1.class
new file mode 100644 (file)
index 0000000..29e4146
Binary files /dev/null and b/bin/main/Switch/Switching$_on_closure1.class differ
diff --git a/bin/main/Switch/Switching.class b/bin/main/Switch/Switching.class
new file mode 100644 (file)
index 0000000..60f69f8
Binary files /dev/null and b/bin/main/Switch/Switching.class differ
diff --git a/bin/main/appTouch/Touched.class b/bin/main/appTouch/Touched.class
new file mode 100644 (file)
index 0000000..563a7e4
Binary files /dev/null and b/bin/main/appTouch/Touched.class differ
diff --git a/bin/main/main$_closure1.class b/bin/main/main$_closure1.class
new file mode 100644 (file)
index 0000000..b5c9a14
Binary files /dev/null and b/bin/main/main$_closure1.class differ
diff --git a/bin/main/main.class b/bin/main/main.class
new file mode 100644 (file)
index 0000000..c1a6055
Binary files /dev/null and b/bin/main/main.class differ
index 299e6e4a40c52832e9c5c093de3afed0f26127cd..b08146d504111bc87618f29f4504da16d3595b75 100644 (file)
@@ -15,16 +15,112 @@ import Location.Phrase
 import appTouch.Touched
 import Event.Event
 
 import appTouch.Touched
 import Event.Event
 
+//Global eventHandler
+/////////////////////////////////////////////////////////////////////
+def eventHandler(LinkedHashMap eventDataMap) {
+       def value = eventDataMap["value"]
+       def name = eventDataMap["name"]
+       def deviceId = eventDataMap["deviceId"]
+       def descriptionText = eventDataMap["descriptionText"]
+       def displayed = eventDataMap["displayed"]
+       def linkText = eventDataMap["linkText"]
+       def isStateChange = eventDataMap["isStateChange"]
+       def unit = eventDataMap["unit"]
+       def data = eventDataMap["data"]
+       def minSize
+       def smallest
+
+       //make search efficient
+       if (app1.eventList.size() == app2.eventList.size()) {
+               minSize = app1.eventList.size()
+               smallest = "equal"
+       } else if (app1.eventList.size() < app2.eventList.size()) {
+               minSize = app1.eventList.size()
+               smallest = "app1"
+       } else {
+               minSize = app2.eventList.size()
+               smallest = "app2"
+       }
+
+       for (int i = 0;i < minSize;i++) {
+               if (app1.eventList[i] == name) {
+                       evt.add(new Event())
+                       evt[-1].value = value
+                       evt[-1].name = name
+                       evt[-1].deviceId = deviceId
+                       evt[-1].descriptionText = descriptionText
+                       evt[-1].displayed = displayed
+                       evt[-1].linkText = linkText
+                       evt[-1].displayName = linkText
+                       evt[-1].isStateChange = isStateChange
+                       evt[-1].unit = unit
+                       evt[-1].data = data
+                       app1.functionList[i](evt[-1])
+               }
+               if (app2.eventList[i] == name) {
+                       evt.add(new Event())
+                       evt[-1].value = value
+                       evt[-1].name = name
+                       evt[-1].deviceId = deviceId
+                       evt[-1].descriptionText = descriptionText
+                       evt[-1].displayed = displayed
+                       evt[-1].linkText = linkText
+                       evt[-1].displayName = linkText
+                       evt[-1].isStateChange = isStateChange
+                       evt[-1].unit = unit
+                       evt[-1].data = data
+                       app2.functionList[i](evt[-1])
+               }
+       }
+
+       if (smallest == "app1") {
+               for (int i = minSize;i < app2.eventList.size();i++) {
+                       if (app2.eventList[i] == name) {
+                               evt.add(new Event())
+                               evt[-1].value = value
+                               evt[-1].name = name
+                               evt[-1].deviceId = deviceId
+                               evt[-1].descriptionText = descriptionText
+                               evt[-1].displayed = displayed
+                               evt[-1].linkText = linkText
+                               evt[-1].displayName = linkText
+                               evt[-1].isStateChange = isStateChange
+                               evt[-1].unit = unit
+                               evt[-1].data = data
+                               app2.functionList[i](evt[-1])
+                       }
+               }
+       } else if (smallest == "app2") {
+               for (int i = minSize;i < app1.eventList.size();i++) {
+                       if (app1.eventList[i] == name) {
+                               evt.add(new Event())
+                               evt[-1].value = value
+                               evt[-1].name = name
+                               evt[-1].deviceId = deviceId
+                               evt[-1].descriptionText = descriptionText
+                               evt[-1].displayed = displayed
+                               evt[-1].linkText = linkText
+                               evt[-1].displayName = linkText
+                               evt[-1].isStateChange = isStateChange
+                               evt[-1].unit = unit
+                               evt[-1].data = data
+                               app1.functionList[i](evt[-1])
+                       }
+               }
+       }       
+}
+
 //GlobalVariables for both Apps
 //Create a global variable for send event
 @Field def sendEvent = {eventDataMap -> 
 //GlobalVariables for both Apps
 //Create a global variable for send event
 @Field def sendEvent = {eventDataMap -> 
-                       app1.eventHandler(eventDataMap)
-                       app2.eventHandler(eventDataMap)
+                       eventHandler(eventDataMap)
                        }
 //Object for location
 @Field def locationObject = new LocationVar()
 //Object for touch
 @Field def appObject = new Touched(sendEvent, 0)
                        }
 //Object for location
 @Field def locationObject = new LocationVar()
 //Object for touch
 @Field def appObject = new Touched(sendEvent, 0)
+//Create a global list for events
+@Field def evt = []
 
 //Extracted global objects for both Apps
 //Global Object for class lock!
 
 //Extracted global objects for both Apps
 //Global Object for class lock!
@@ -32,7 +128,7 @@ import Event.Event
 //Global Object for class contactSensor!
 @Field def contactObject = new Contacting(sendEvent, 1)
 //Global Object for class Switch!
 //Global Object for class contactSensor!
 @Field def contactObject = new Contacting(sendEvent, 1)
 //Global Object for class Switch!
-@Field def switchObject = new Switching(sendEvent, 2)
+@Field def switchObject = new Switching(sendEvent, 1)
 
 //Application #1
 class App1 {
 
 //Application #1
 class App1 {
@@ -48,7 +144,7 @@ class App1 {
        //Global variable for number!
        def minutesLater = 1
        //Global variable for number!
        //Global variable for number!
        def minutesLater = 1
        //Global variable for number!
-       def secondsLater = 2
+       def secondsLater = 1
        //Global variable for recipients!
        def recipients = ['AJ']
        //Global variable for phone number!
        //Global variable for recipients!
        def recipients = ['AJ']
        //Global variable for phone number!
@@ -90,8 +186,6 @@ class App1 {
        def timersFuncList = []
        //Create a global list for timer schedulers
        def timersList = []
        def timersFuncList = []
        //Create a global list for timer schedulers
        def timersList = []
-       //Create a global list for events
-       def evt = []
 
        //Methods
        /////////////////////////////////////////////////////////////////////
 
        //Methods
        /////////////////////////////////////////////////////////////////////
@@ -150,35 +244,6 @@ class App1 {
        def sendSms(long phoneNumber, String text) {
                println("Sending \""+text+"\" to "+phoneNumber.toString())
        }
        def sendSms(long phoneNumber, String text) {
                println("Sending \""+text+"\" to "+phoneNumber.toString())
        }
-       /////////////////////////////////////////////////////////////////////
-       def eventHandler(LinkedHashMap eventDataMap) {
-               def value = eventDataMap["value"]
-               def name = eventDataMap["name"]
-               def deviceId = eventDataMap["deviceId"]
-               def descriptionText = eventDataMap["descriptionText"]
-               def displayed = eventDataMap["displayed"]
-               def linkText = eventDataMap["linkText"]
-               def isStateChange = eventDataMap["isStateChange"]
-               def unit = eventDataMap["unit"]
-               def data = eventDataMap["data"]
-               
-               for (int i = 0;i < eventList.size();i++) {
-                       if (eventList[i] == name) {
-                               evt.add(new Event())
-                               evt[-1].value = value
-                               evt[-1].name = name
-                               evt[-1].deviceId = deviceId
-                               evt[-1].descriptionText = descriptionText
-                               evt[-1].displayed = displayed
-                               evt[-1].linkText = linkText
-                               evt[-1].displayName = linkText
-                               evt[-1].isStateChange = isStateChange
-                               evt[-1].unit = unit
-                               evt[-1].data = data
-                               functionList[i](evt[-1])
-                       }
-               }
-       }
 
        def installed(){
            initialize()
 
        def installed(){
            initialize()
@@ -284,7 +349,7 @@ class App2 {
        //Global variable for mode!
        def newMode = "away"
        //Global variable for number!
        //Global variable for mode!
        def newMode = "away"
        //Global variable for number!
-       def waitfor = 10
+       def waitfor = 1
        //Global Object for functions in subscribe method!
        def installed = this.&installed
        //Global Object for functions in subscribe method!
        //Global Object for functions in subscribe method!
        def installed = this.&installed
        //Global Object for functions in subscribe method!
@@ -317,8 +382,6 @@ class App2 {
        def timersFuncList = []
        //Create a global list for timer schedulers
        def timersList = []
        def timersFuncList = []
        //Create a global list for timer schedulers
        def timersList = []
-       //Create a global list for events
-       def evt = []
 
        //Methods
        /////////////////////////////////////////////////////////////////////
 
        //Methods
        /////////////////////////////////////////////////////////////////////
@@ -377,35 +440,6 @@ class App2 {
        def sendSms(long phoneNumber, String text) {
                println("Sending \""+text+"\" to "+phoneNumber.toString())
        }
        def sendSms(long phoneNumber, String text) {
                println("Sending \""+text+"\" to "+phoneNumber.toString())
        }
-       /////////////////////////////////////////////////////////////////////
-       def eventHandler(LinkedHashMap eventDataMap) {
-               def value = eventDataMap["value"]
-               def name = eventDataMap["name"]
-               def deviceId = eventDataMap["deviceId"]
-               def descriptionText = eventDataMap["descriptionText"]
-               def displayed = eventDataMap["displayed"]
-               def linkText = eventDataMap["linkText"]
-               def isStateChange = eventDataMap["isStateChange"]
-               def unit = eventDataMap["unit"]
-               def data = eventDataMap["data"]
-               
-               for (int i = 0;i < eventList.size();i++) {
-                       if (eventList[i] == name) {
-                               evt.add(new Event())
-                               evt[-1].value = value
-                               evt[-1].name = name
-                               evt[-1].deviceId = deviceId
-                               evt[-1].descriptionText = descriptionText
-                               evt[-1].displayed = displayed
-                               evt[-1].linkText = linkText
-                               evt[-1].displayName = linkText
-                               evt[-1].isStateChange = isStateChange
-                               evt[-1].unit = unit
-                               evt[-1].data = data
-                               functionList[i](evt[-1])
-                       }
-               }
-       }
 
        def installed()
        {
 
        def installed()
        {
@@ -443,3 +477,6 @@ class App2 {
 @Field def app2 = new App2(this)
 app1.installed()
 app2.installed()
 @Field def app2 = new App2(this)
 app1.installed()
 app2.installed()
+appObject.setValue([name: "Touched", value: "Touched", deviceId: 0, descriptionText: "",
+           displayed: true, linkText: "", isStateChange: false, unit: "", data: []])
+