Commit #8: New version of extractor with running the preferences method make things...
[smartthings-infrastructure.git] / NfcTouch / NfcTouch.groovy
diff --git a/NfcTouch/NfcTouch.groovy b/NfcTouch/NfcTouch.groovy
new file mode 100644 (file)
index 0000000..617704d
--- /dev/null
@@ -0,0 +1,19 @@
+//Create a class for Touch sensor
+package NfcTouch
+
+public class NfcTouch{
+       def sendEvent
+       private int isTouched
+
+       NfcTouch(Closure sendEvent, int isTouched) {
+               this.sendEvent = sendEvent
+               this.isTouched = isTouched
+       }
+
+       //By Model Checker
+       def setValue(LinkedHashMap eventDataMap) {
+               println("NFC is Touched!")
+               this.isTouched = 1 //Do we need this?
+               sendEvent(eventDataMap)
+       }
+}