Infrastructure that works for all the locks' group!
[smartthings-infrastructure.git] / BeaconSensor / BeaconSensors.groovy
index 24bcfc8dfa3e6c57b3de0afced91b174442ded63..33dd1fe65d39c1bed0a933ef177a7f36029eaee0 100644 (file)
@@ -2,6 +2,9 @@
 package BeaconSensor
 import Timer.SimulatedTimer
 
+//JPF's Verify API
+import gov.nasa.jpf.vm.Verify
+
 public class BeaconSensors {
        private int deviceNumbers
        private List beaconSensors
@@ -21,6 +24,14 @@ public class 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))
        }