Changes in classes: new concept for latest value + all types of events generated...
[smartthings-infrastructure.git] / appTouch / Touched.groovy
index e2172cc44f7a70e371a7818d3e54df1d923e43bb..1d9e57fd18ff17c1cb95bc3e91ea931674aca6e4 100644 (file)
@@ -2,18 +2,22 @@
 package appTouch
 
 public class Touched{
-       def fun
+       def sendEvent
+       private String id
        private int isTouched
+       private String label
 
        Touched(Closure sendEvent, int isTouched) {
-               fun = sendEvent
+               this.sendEvent = sendEvent
                this.isTouched = isTouched
+               this.label = "app0"
+               this.id = "appID0"
        }
 
        //By Model Checker
        def setValue(LinkedHashMap eventDataMap) {
                println("The application is Touched!")
                this.isTouched = 1 //Do we need this?
-               fun(eventDataMap)
+               sendEvent(eventDataMap)
        }
 }