Commit #6
[smartthings-infrastructure.git] / GlobalVariables / GlobalVariablesBothApps.groovy
diff --git a/GlobalVariables/GlobalVariablesBothApps.groovy b/GlobalVariables/GlobalVariablesBothApps.groovy
new file mode 100644 (file)
index 0000000..dea126a
--- /dev/null
@@ -0,0 +1,9 @@
+//Create a global variable for send event
+@Field def sendEvent = {eventDataMap -> 
+                       app1.eventHandler(eventDataMap)
+                       app2.eventHandler(eventDataMap)
+                       }
+//Object for location
+@Field def locationObject = new LocationVar()
+//Object for touch
+@Field def appObject = new Touched(sendEvent, 0)