Commit #8: New version of extractor with running the preferences method make things...
[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
8         NfcTouch(Closure sendEvent, int isTouched) {
9                 this.sendEvent = sendEvent
10                 this.isTouched = isTouched
11         }
12
13         //By Model Checker
14         def setValue(LinkedHashMap eventDataMap) {
15                 println("NFC is Touched!")
16                 this.isTouched = 1 //Do we need this?
17                 sendEvent(eventDataMap)
18         }
19 }