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