Merge branch 'master' of ssh://plrg.eecs.uci.edu/home/git/smartthings-infrastructure
authorrtrimana <rtrimana@uci.edu>
Fri, 9 Aug 2019 00:43:46 +0000 (17:43 -0700)
committerrtrimana <rtrimana@uci.edu>
Fri, 9 Aug 2019 00:43:46 +0000 (17:43 -0700)
IlluminanceMeasurement/IlluminanceMeasurements.groovy
Location/LocationVar.groovy
Switch/Switch.groovy
Switch/Switches.groovy

index dbeae2a..cf013ff 100644 (file)
@@ -11,8 +11,8 @@ public class IlluminanceMeasurements {
        private String id = "illuminanceMeasurementsID0"
        private String label = "illuminanceMeasurements0"
        private String displayName = "illuminanceMeasurements0"
-       private int illuminance = 50000
-       private int currentIlluminance = 50000
+       private int illuminance = 5
+       private int currentIlluminance = 5
 
                
        IlluminanceMeasurements(Closure sendEvent, int deviceNumbers, boolean init) {
@@ -21,11 +21,11 @@ public class IlluminanceMeasurements {
                this.illuminanceMeasurements = []
 
                if (init) {
-                       this.illuminance = 50000
-                       this.currentIlluminance = 50000
+                       this.illuminance = 5
+                       this.currentIlluminance = 5
                } else {
-                       this.illuminance = 60000
-                       this.currentIlluminance = 60000
+                       this.illuminance = 20000
+                       this.currentIlluminance = 20000
                }
 
                illuminanceMeasurements.add(new IlluminanceMeasurement(id, label, displayName, this.illuminance))
index a114c1f..99f3429 100644 (file)
@@ -47,10 +47,12 @@ class LocationVar {
 
        //By Model Checker
        def setValue(LinkedHashMap eventDataMap) {
-               def sentMode = eventDataMap['value']
-               println("The location is changed to $sentMode!")
-               this.mode = sentMode
-               sendEvent(eventDataMap)
+               if (this.mode != eventDataMap['value']) {
+                       def sentMode = eventDataMap['value']
+                       println("The location is changed to $sentMode!")
+                       this.mode = sentMode
+                       sendEvent(eventDataMap)
+               }
        }
 
        def currentValue(String deviceFeature) {
index e017b55..4e28c34 100644 (file)
@@ -2,6 +2,10 @@
 package Switch
 import Timer.SimulatedTimer
 
+//JPF's Verify API
+import gov.nasa.jpf.vm.Verify
+
+
 public class Switch {
        private String id
        private String label
index a0e191c..c27440d 100644 (file)
@@ -2,6 +2,10 @@
 package Switch
 import Timer.SimulatedTimer
 
+//JPF's Verify API
+import gov.nasa.jpf.vm.Verify
+
+
 public class Switches {
        int deviceNumbers       
        List switches