Merge branch 'master' of ssh://plrg.eecs.uci.edu/home/git/smartthings-infrastructure
[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 String id
7         private int isTouched
8         private String label
9         private String name
10
11
12         Touched(Closure sendEvent, int isTouched) {
13                 this.sendEvent = sendEvent
14                 this.isTouched = isTouched
15                 this.label = "app0"
16                 this.id = "appID0"
17                 this.name = "app0"
18         }
19
20         //By Model Checker
21         def setValue(LinkedHashMap eventDataMap) {
22                 println("The application is Touched!")
23                 this.isTouched = 1 //Do we need this?
24                 sendEvent(eventDataMap)
25         }
26 }