projects
/
smartthings-infrastructure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Infrastructure compatible with 2 types of switches.(Normal switches and otherVsGeneri...
[smartthings-infrastructure.git]
/
MotionSensor
/
MotionSensors.groovy
diff --git
a/MotionSensor/MotionSensors.groovy
b/MotionSensor/MotionSensors.groovy
index 0ae021a9531fc10f5d3255a7ce3e848f9d90a4d3..5c03ebf677c2cf90700d63c2d859e8129b5966a0 100644
(file)
--- a/
MotionSensor/MotionSensors.groovy
+++ b/
MotionSensor/MotionSensors.groovy
@@
-2,6
+2,9
@@
package MotionSensor
import Timer.SimulatedTimer
package MotionSensor
import Timer.SimulatedTimer
+//JPF's Verify API
+import gov.nasa.jpf.vm.Verify
+
public class MotionSensors {
private int deviceNumbers
private List motionSensors
public class MotionSensors {
private int deviceNumbers
private List motionSensors
@@
-63,7
+66,10
@@
public class MotionSensors {
def collect(Closure Input) {
motionSensors.collect(Input)
}
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
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) {
}
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) {
}
def getAt(int ix) {