projects
/
smartthings-infrastructure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Infrastructure that works for all the locks' group!
[smartthings-infrastructure.git]
/
BeaconSensor
/
BeaconSensors.groovy
diff --git
a/BeaconSensor/BeaconSensors.groovy
b/BeaconSensor/BeaconSensors.groovy
index 24bcfc8dfa3e6c57b3de0afced91b174442ded63..33dd1fe65d39c1bed0a933ef177a7f36029eaee0 100644
(file)
--- a/
BeaconSensor/BeaconSensors.groovy
+++ b/
BeaconSensor/BeaconSensors.groovy
@@
-2,6
+2,9
@@
package BeaconSensor
import Timer.SimulatedTimer
package BeaconSensor
import Timer.SimulatedTimer
+//JPF's Verify API
+import gov.nasa.jpf.vm.Verify
+
public class BeaconSensors {
private int deviceNumbers
private List beaconSensors
public class BeaconSensors {
private int deviceNumbers
private List beaconSensors
@@
-21,6
+24,14
@@
public class BeaconSensors {
this.deviceNumbers = deviceNumbers
this.beaconSensors = []
this.deviceNumbers = deviceNumbers
this.beaconSensors = []
+ def init = Verify.getBoolean()
+ if (init) {
+ this.presence = "not present"
+ this.presenceLatestValue = "not present"
+ } else {
+ this.presence = "present"
+ this.presenceLatestValue = "present"
+ }
beaconSensors.add(new BeaconSensor(id, label, displayName, this.presence, this.presenceLatestValue))
}
beaconSensors.add(new BeaconSensor(id, label, displayName, this.presence, this.presenceLatestValue))
}