Commit #9: extension to the infrastructure with more devices + minor changes in extra...
[smartthings-infrastructure.git] / NfcTouch / NfcTouch.groovy
1 //Create a class for Touch sensor
2 package NfcTouch
3
4 public class NfcTouch{
5         def sendEvent
6         private int isTouched
7         private String displayName = "NfcTouch0"
8
9         NfcTouch(Closure sendEvent, int isTouched) {
10                 this.sendEvent = sendEvent
11                 this.isTouched = isTouched
12         }
13
14         //By Model Checker
15         def setValue(LinkedHashMap eventDataMap) {
16                 println("NFC is Touched!")
17                 this.isTouched = 1 //Do we need this?
18                 sendEvent(eventDataMap)
19         }
20 }