Commenting out the Verify API calls in the object instantiation to avoid state explos...
authorrtrimana <rtrimana@uci.edu>
Tue, 30 Jul 2019 18:24:38 +0000 (11:24 -0700)
committerrtrimana <rtrimana@uci.edu>
Tue, 30 Jul 2019 18:24:38 +0000 (11:24 -0700)
28 files changed:
AccelerationSensor/AccelerationSensors.groovy
Alarm/Alarms.groovy
Battery/Batteries.groovy
BeaconSensor/BeaconSensors.groovy
CarbonMonoxideDetector/CarbonMonoxideDetectors.groovy
ColorControl/ColorControls.groovy
ContactSensor/ContactSensors.groovy
DoorControl/DoorControls.groovy
EnergyMeter/EnergyMeters.groovy
IlluminanceMeasurement/IlluminanceMeasurements.groovy
ImageCapture/ImageCaptures.groovy
Lock/Locks.groovy
MotionSensor/MotionSensors.groovy
MusicPlayer/MusicPlayers.groovy
PowerMeter/PowerMeters.groovy
PresenceSensor/PresenceSensors.groovy
RelativeHumidityMeasurement/RelativeHumidityMeasurements.groovy
RelaySwitch/RelaySwitches.groovy
SleepSensor/SleepSensors.groovy
SmokeDetector/SmokeDetectors.groovy
SpeechSynthesis/SpeechSynthesises.groovy
StepSensor/StepSensors.groovy
Switch/Switches.groovy
SwitchLevel/SwitchLevels.groovy
TemperatureMeasurement/TemperatureMeasurements.groovy
Thermostat/Thermostats.groovy
Valve/Valves.groovy
WaterSensor/WaterSensors.groovy

index 8c1992c..db90c56 100644 (file)
@@ -24,14 +24,14 @@ public class AccelerationSensors {
                this.deviceNumbers = deviceNumbers
                this.accelerationSensors = []
 
-               def init = Verify.getBoolean()
+               /*def init = Verify.getBoolean()
                if (init) {
                        this.acceleration = "inactive"
                        this.accelerationLatestValue = "inactive"
                } else {
                        this.acceleration = "active"
                        this.accelerationLatestValue = "active"
-               }
+               }*/
                accelerationSensors.add(new AccelerationSensor(id, label, displayName, this.acceleration, this.accelerationLatestValue))
        }
 
index bc805e1..1e8e68e 100644 (file)
@@ -25,7 +25,7 @@ public class Alarms {
                this.deviceNumbers = deviceNumbers
                this.alarms = []
 
-               def init = Verify.getBoolean()
+               /*def init = Verify.getBoolean()
                if (init) {
                        this.alarm = "off"
                        this.currentAlarm = "off"
@@ -34,7 +34,7 @@ public class Alarms {
                        this.alarm = "on"
                        this.currentAlarm = "on"
                        this.alarmLatestValue = "on"
-               }
+               }*/
                alarms.add(new Alarm(sendEvent, id, label, displayName, this.alarm, this.currentAlarm, this.alarmLatestValue))
        }
                
index 8aca5e2..dd82b66 100644 (file)
@@ -23,8 +23,8 @@ public class Batteries {
                this.deviceNumbers = deviceNumbers
                this.batteries = []
 
-               def init = Verify.getIntFromList(30, 50, 70)
-               this.battery = init
+               //def init = Verify.getIntFromList(30, 50, 70)
+               //this.battery = init
 
                batteries.add(new Battery(id, label, displayName, this.battery))
        }
index 33dd1fe..b2b5e1a 100644 (file)
@@ -24,14 +24,14 @@ public class BeaconSensors {
                this.deviceNumbers = deviceNumbers
                this.beaconSensors = []
 
-               def init = Verify.getBoolean()
+               /*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))
        }
 
index 2eb9d74..9a68261 100644 (file)
@@ -24,7 +24,7 @@ public class CarbonMonoxideDetectors {
                this.deviceNumbers = deviceNumbers
                this.carbonMonoxideDetectors = []
                
-               def init = Verify.getInt(0,2)
+               /*def init = Verify.getInt(0,2)
                if (init == 0) {
                        this.carbonMonoxide = "clear"
                        this.carbonMonoxideLatestValue = "clear"
@@ -34,7 +34,7 @@ public class CarbonMonoxideDetectors {
                } else {
                        this.carbonMonoxide = "tested"
                        this.carbonMonoxideLatestValue = "tested"               
-               }
+               }*/
                carbonMonoxideDetectors.add(new CarbonMonoxideDetector(id, label, displayName, this.currentCarbonMonoxideValue, this.carbonMonoxideLatestValue))
        }
 
index d96b978..39dfeaa 100644 (file)
@@ -24,7 +24,7 @@ public class ColorControls {
                this.deviceNumbers = deviceNumbers
                this.colorControls = []
 
-               def initHue = Verify.getIntFromList(30, 50, 70)
+               /*def initHue = Verify.getIntFromList(30, 50, 70)
                this.hue = initHue
                def initSat = Verify.getIntFromList(40, 50, 60)
                this.saturation = initSat
@@ -35,7 +35,7 @@ public class ColorControls {
                        this.color = "green"
                } else {
                        this.color = "blue"
-               }
+               }*/
 
                colorControls.add(new ColorControl(id, label, displayName, this.color, this.hue, this.saturation))
        }
index 489200d..b8fba79 100644 (file)
@@ -25,7 +25,7 @@ public class ContactSensors {
                this.deviceNumbers = deviceNumbers
                this.contacts = []
 
-               def initSensor = Verify.getBoolean()
+               /*def initSensor = Verify.getBoolean()
                if (initSensor) {
                        this.contactState = "closed"
                        this.currentContact = "closed"
@@ -41,7 +41,7 @@ public class ContactSensors {
                        this.alarmState = "armed"
                } else {
                        this.alarmState = "not armed"
-               }
+               }*/
                contacts.add(new ContactSensor(id, label, displayName, this.contactState, this.currentContact, this.alarmState, this.latestValue))
        }
 
index 2581800..9cb85cd 100644 (file)
@@ -24,14 +24,14 @@ public class DoorControls {
                this.deviceNumbers = deviceNumbers
                this.doorControls = []
                
-               def init = Verify.getBoolean()
+               /*def init = Verify.getBoolean()
                if (init) {
                        this.doorState = "closed"
                        this.doorLatestValue = "closed"
                } else {
                        this.doorState = "open"
                        this.doorLatestValue = "open"
-               }
+               }*/
                doorControls.add(new DoorControl(sendEvent, id, label, displayName, this.doorState, this.doorLatestValue))
        }
 
index a3f2b8d..553ed86 100644 (file)
@@ -23,8 +23,8 @@ public class EnergyMeters {
                this.deviceNumbers = deviceNumbers
                this.energyMeters = []
 
-               def init = Verify.getIntFromList(30, 50, 70)
-               this.energy = init
+               //def init = Verify.getIntFromList(30, 50, 70)
+               //this.energy = init
 
                energyMeters.add(new EnergyMeter(id, label, displayName, this.energy))
        }
index 1f3e974..0da46af 100644 (file)
@@ -23,8 +23,8 @@ public class IlluminanceMeasurements {
                this.deviceNumbers = deviceNumbers
                this.illuminanceMeasurements = []
 
-               def init = Verify.getIntFromList(40000, 50000, 60000)
-               this.illuminance = init
+               //def init = Verify.getIntFromList(40000, 50000, 60000)
+               //this.illuminance = init
 
                illuminanceMeasurements.add(new IlluminanceMeasurement(id, label, displayName, this.illuminance))
        }
index 661e870..e9034b1 100644 (file)
@@ -23,12 +23,12 @@ public class ImageCaptures {
                this.deviceNumbers = deviceNumbers
                this.imageCaptureSensors = []
 
-               def initAlarm = Verify.getBoolean()
+               /*def initAlarm = Verify.getBoolean()
                if (initAlarm) {
                        this.alarmState = "armed"
                } else {
                        this.alarmState = "not armed"
-               }
+               }*/
                imageCaptureSensors.add(new ImageCapture(id, label, displayName, this.image, this.alarmState))
        }
 
index ea75ef3..8ebf46b 100644 (file)
@@ -25,14 +25,14 @@ public class Locks{
                this.deviceNumbers = deviceNumbers
                this.locks = []
 
-               def init = Verify.getBoolean()
+               /*def init = Verify.getBoolean()
                if (init) {
                        this.lockState = "locked"
                        this.lockLatestValue = "locked"
                } else {
                        this.lockState = "unlocked"
                        this.lockLatestValue = "unlocked"
-               }
+               }*/
                locks.add(new Lock(sendEvent,id, label, displayName, this.lockState, this.lockLatestValue))
        }
 
index 8516713..764aa3e 100644 (file)
@@ -24,14 +24,14 @@ public class MotionSensors {
                this.deviceNumbers = deviceNumbers
                this.motionSensors = []
 
-               def init = Verify.getBoolean()
+               /*def init = Verify.getBoolean()
                if (init) {
                        this.motion = "inactive"
                        this.motionLatestValue = "inactive"
                } else {
                        this.motion = "active"
                        this.motionLatestValue = "active"
-               }
+               }*/
                motionSensors.add(new MotionSensor(id, label, displayName, this.motion, this.motionLatestValue))
        }
 
index 960c66b..bce3fc7 100644 (file)
@@ -28,7 +28,7 @@ public class MusicPlayers {
                this.deviceNumbers = deviceNumbers
                this.musicPlayers = []
 
-               def initLevel = Verify.getIntFromList(10, 20, 30)
+               /*def initLevel = Verify.getIntFromList(10, 20, 30)
                this.level = initLevel
                def initMute = Verify.getBoolean()
                if (initMute) {
@@ -57,7 +57,7 @@ public class MusicPlayers {
                        this.trackDescription = "someDescriptions"
                } else {
                        this.trackDescription = "someOtherDescriptions"
-               }
+               }*/
                musicPlayers.add(new MusicPlayer(sendEvent, id, label, displayName, this.level, this.mute, this.status, this.trackNumber, this.trackData, this.trackDescription))
        }
 
index cf61090..4b4f193 100644 (file)
@@ -23,8 +23,8 @@ public class PowerMeters {
                this.deviceNumbers = deviceNumbers
                this.powerMeters = []
 
-               def init = Verify.getIntFromList(30, 50, 70)
-               this.power = init
+               //def init = Verify.getIntFromList(30, 50, 70)
+               //this.power = init
 
                powerMeters.add(new PowerMeter(id, label, displayName, this.power))
        }
index cb13242..05721d5 100644 (file)
@@ -23,14 +23,14 @@ public class PresenceSensors {
                this.sendEvent = sendEvent              
                this.deviceNumbers = deviceNumbers
                this.presenceSensors = []
-               def init = Verify.getBoolean()
+               /*def init = Verify.getBoolean()
                if (init) {
                        this.presence = "not present"
                        this.presenceLatestValue = "not present"
                } else {
                        this.presence = "present"
                        this.presenceLatestValue = "present"
-               }
+               }*/
 
                presenceSensors.add(new PresenceSensor(id, label, displayName, this.presence, this.presenceLatestValue))
        }
index 8b6bc4b..17da9b5 100644 (file)
@@ -23,8 +23,8 @@ public class RelativeHumidityMeasurements {
                this.deviceNumbers = deviceNumbers
                this.humidityMeasurements = []
 
-               def init = Verify.getIntFromList(30, 50, 70)
-               this.humidity = init
+               //def init = Verify.getIntFromList(30, 50, 70)
+               //this.humidity = init
 
                humidityMeasurements.add(new RelativeHumidityMeasurement(id, label, displayName, this.humidity))
        }
index 07e1c30..d9615e2 100644 (file)
@@ -25,7 +25,7 @@ public class RelaySwitches {
                this.deviceNumbers = deviceNumbers
                this.relaySwitches = []
 
-               def init = Verify.getBoolean()
+               /*def init = Verify.getBoolean()
                if (init) {
                        this.switchState = "off"
                        this.currentSwitch = "off"
@@ -34,7 +34,7 @@ public class RelaySwitches {
                        this.switchState = "on"
                        this.currentSwitch = "on"
                        this.switchLatestValue = "on"
-               }
+               }*/
                relaySwitches.add(new RelaySwitch(sendEvent, id, label, displayName, this.switchState, this.currentSwitch, this.switchLatestValue))
        }
 
index 9c49eb9..32895c8 100644 (file)
@@ -22,12 +22,12 @@ public class SleepSensors {
                this.deviceNumbers = deviceNumbers
                this.sleepSensors = []
 
-               def init = Verify.getBoolean()
+               /*def init = Verify.getBoolean()
                if (init) {
                        this.sleeping = "sleeping"
                } else {
                        this.sleeping = "not sleeping"
-               }
+               }*/
                sleepSensors.add(new SleepSensor(id, label, displayName, this.sleeping))
        }
 
index e9d5da2..2bbc41d 100644 (file)
@@ -24,7 +24,7 @@ public class SmokeDetectors {
                this.deviceNumbers = deviceNumbers
                this.smokeDetectors = []
 
-               def init = Verify.getInt(0,2)
+               /*def init = Verify.getInt(0,2)
                if (init == 0) {
                        this.currentSmokeValue = "clear"
                        this.smokeLatestValue = "clear"
@@ -34,7 +34,7 @@ public class SmokeDetectors {
                } else {
                        this.currentSmokeValue = "tested"
                        this.smokeLatestValue = "tested"                
-               }
+               }*/
                smokeDetectors.add(new SmokeDetector(id, label, displayName, this.currentSmokeValue, this.smokeLatestValue))
        }
 
index 2ef8cec..369a8ac 100644 (file)
@@ -22,8 +22,8 @@ public class SpeechSynthesises {
                this.deviceNumbers = deviceNumbers
                this.speechSynthesises = []
 
-               def init = Verify.getIntFromList(30, 50, 70)
-               this.level = init
+               //def init = Verify.getIntFromList(30, 50, 70)
+               //this.level = init
 
                speechSynthesises.add(new SpeechSynthesis(id, label, displayName, this.level))
        }
index fa6d78c..cc709fe 100644 (file)
@@ -23,10 +23,10 @@ public class StepSensors {
                this.deviceNumbers = deviceNumbers
                this.stepSensors = []
 
-               def initGoal = Verify.getIntFromList(1000, 2000, 3000)
+               /*def initGoal = Verify.getIntFromList(1000, 2000, 3000)
                this.goal = initGoal
                def initSteps = Verify.getIntFromList(0, 1, 2)
-               this.steps = initSteps
+               this.steps = initSteps*/
 
                stepSensors.add(new StepSensor(id, label, displayName, this.steps, this.goal))
        }
index 5a4ef48..8c57869 100644 (file)
@@ -26,7 +26,7 @@ public class Switches {
                this.deviceNumbers = deviceNumbers
                this.switches = []
 
-               def initLevel = Verify.getIntFromList(30, 50, 70)
+               /*def initLevel = Verify.getIntFromList(30, 50, 70)
                this.currentLevel = initLevel
                def init = Verify.getBoolean()
                if (init) {
@@ -37,7 +37,7 @@ public class Switches {
                        this.switchState = "on"
                        this.currentSwitch = "on"
                        this.switchLatestValue = "on"
-               }
+               }*/
 
                switches.add(new Switch(sendEvent, id, label, displayName, this.switchState, this.currentSwitch, this.currentLevel, this.switchLatestValue))
        }
index 3990109..4ace361 100644 (file)
@@ -27,7 +27,7 @@ public class SwitchLevels {
                this.deviceNumbers = deviceNumbers
                this.switchLevels = []
 
-               def initLevel = Verify.getIntFromList(30, 50, 70)
+               /*def initLevel = Verify.getIntFromList(30, 50, 70)
                this.level = initLevel
                def init = Verify.getBoolean()
                if (init) {
@@ -38,7 +38,7 @@ public class SwitchLevels {
                        this.switchState = "on"
                        this.currentSwitch = "on"
                        this.switchLatestValue = "on"
-               }
+               }*/
                switchLevels.add(new SwitchLevel(sendEvent, id, label, displayName, this.level, this.switchState, this.switchLatestValue))
        }
 
index 1860203..15119cc 100644 (file)
@@ -21,8 +21,8 @@ public class TemperatureMeasurements {
                this.deviceNumbers = deviceNumbers
                this.temperatureMeasurements = []
 
-               def initTemp = Verify.getIntFromList(30, 50, 70)
-               this.temperature = initTemp
+               //def initTemp = Verify.getIntFromList(30, 50, 70)
+               //this.temperature = initTemp
        
                temperatureMeasurements.add(new TemperatureMeasurement(id, label, displayName, this.temperature))
        }
index 19f5d6f..24d7b16 100644 (file)
@@ -38,7 +38,7 @@ public class Thermostats{
                this.deviceNumbers = deviceNumbers
                this.thermostats = []
 
-               def initTemperature = Verify.getIntFromList(60, 66, 70)
+               /*def initTemperature = Verify.getIntFromList(60, 66, 70)
                this.temperature = initTemperature
                
                def initCoolingSetpoint = Verify.getIntFromList(70, 80, 90)
@@ -81,7 +81,7 @@ public class Thermostats{
                } else {
                        this.thermostatMode = "off"
                        this.currentThermostatMode = "off"
-               }
+               }*/
 
                thermostats.add(new Thermostat(sendEvent, id, label, displayName, this.temperature, this.currentCoolingSetpoint, 
                                                this.currentHeatingSetpoint, this.coolingSetpoint, this.thermostatSetpoint, this.heatingSetpoint, this.coolingSetpointRange,
index f12bffd..b4c1e7b 100644 (file)
@@ -24,14 +24,14 @@ public class Valves {
                this.deviceNumbers = deviceNumbers
                this.valves = []
                
-               def init = Verify.getBoolean()
+               /*def init = Verify.getBoolean()
                if (init) {
                        this.valve = "closed"
                        this.valveLatestValue = "closed"
                } else {
                        this.valve = "open"
                        this.valveLatestValue = "open"
-               }
+               }*/
                valves.add(new Valve(sendEvent, id, label, displayName, this.valve, this.valveLatestValue))
        }
 
index 184f2a0..236d746 100644 (file)
@@ -22,12 +22,12 @@ public class WaterSensors {
                this.deviceNumbers = deviceNumbers
                this.waterSensors = []
 
-               def init = Verify.getBoolean()
+               /*def init = Verify.getBoolean()
                if (init) {
                        this.water = "dry"
                } else {
                        this.water = "wet"
-               }
+               }*/
                waterSensors.add(new WaterSensor(id, label, displayName, this.water))
        }