e2172cc44f7a70e371a7818d3e54df1d923e43bb
[smartthings-infrastructure.git] / appTouch / Touched.groovy
1 //Create a class for Touch sensor
2 package appTouch
3
4 public class Touched{
5         def fun
6         private int isTouched
7
8         Touched(Closure sendEvent, int isTouched) {
9                 fun = sendEvent
10                 this.isTouched = isTouched
11         }
12
13         //By Model Checker
14         def setValue(LinkedHashMap eventDataMap) {
15                 println("The application is Touched!")
16                 this.isTouched = 1 //Do we need this?
17                 fun(eventDataMap)
18         }
19 }