Infrastructure compatible with 2 types of switches.(Normal switches and otherVsGeneri...
[smartthings-infrastructure.git] / MotionSensor / MotionSensors.groovy
index 0ae021a9531fc10f5d3255a7ce3e848f9d90a4d3..5c03ebf677c2cf90700d63c2d859e8129b5966a0 100644 (file)
@@ -2,6 +2,9 @@
 package MotionSensor
 import Timer.SimulatedTimer
 
+//JPF's Verify API
+import gov.nasa.jpf.vm.Verify
+
 public class MotionSensors {
        private int deviceNumbers
        private List motionSensors
@@ -63,7 +66,10 @@ public class MotionSensors {
        def collect(Closure Input) {
                motionSensors.collect(Input)
        }
-
+       
+       def currentState(String deviceFeature) {
+               currentValue(deviceFeature)
+       }
 
        def currentValue(String deviceFeature) {
                motionSensors[0].currentValue(deviceFeature)//It is called if we have only one device
@@ -74,7 +80,11 @@ public class MotionSensors {
        }
 
        def statesSince(String info, Date dateObj) {
-               return motionSensors[0].statesSince(info, dateObj)
+               return motionSensors[0].statesSince()
+       }
+
+       def eventsSince(Date dateObj) {
+               return motionSensors[0].statesSince()
        }
 
        def getAt(int ix) {