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 8c1992cd4065996444a755ce629826dbc1a2ca02..db90c564479fd7d837faeb91818dfd4822582c45 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 bc805e1266bafb1d1f402ec8c7638bab13345648..1e8e68e226263d79acfd2c68ff046cb166f91cae 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 8aca5e2a66c50bee42ff20a8ce466299101a855b..dd82b663cd5b9625842fe96ea66dfcb44842844d 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 33dd1fe65d39c1bed0a933ef177a7f36029eaee0..b2b5e1a8379ab3d32ffdef4a29f219fe830f1a84 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 2eb9d745bb74b47379d8dc3fc5016d2607991320..9a682610d0814b45b434d7ab332b4b56c8d519aa 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 d96b978d774579c4f7efcb2519d86d8b4adb9985..39dfeaa8ab3c8d3a3fb84a4bc269c82a07f0e309 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 489200dbf0a43907d3556cef56f50c528d7a5834..b8fba79c363f683418856d43f92300c962b0208c 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 25818009adfd0ba480940322ed19e9fc60713c61..9cb85cd30da7c05682b249b7fb540b8c25e296a3 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 a3f2b8dff1409b68958ad937d738dc69e3099585..553ed86da28e29c33fdd8479a1e1df28f3bb58d1 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 1f3e9746b0086bb3c8d14dfaf93ed99e8ca412c1..0da46af6a3689bf46213bd607b6a8caa838e1262 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 661e87071817dcfe68ff1051c509ff03890e54ab..e9034b151d03551d0cf981cc4cd7412ea38574ae 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 ea75ef3e4863611aa4ed92cd989eebd382cf8c96..8ebf46b8aff74d91e5777a5bda9c371513866945 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 85167131551b73f787be48e6525bb806a5e2db8c..764aa3e9c505d0c405933f12b2b7489eb2d38abe 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 960c66b5a7574912c9d9149074c2066824e847bb..bce3fc7d40612d6139e29c67317e41163df47b3a 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 cf610900283de8442923c8493909feecaffe409c..4b4f1937a233243b71fe653e4142cc6102363151 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 cb13242c3d622d9087797f570186379cc923aaa7..05721d5b1ec58da4a5d29fcda8e556d27def909f 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 8b6bc4bfa76e58dfdf8b0d6241becaf55225d278..17da9b5b6105db3062859a37614691378901bf8d 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 07e1c305b7a4a28e2f94dcfef08d22bb03e59df1..d9615e2f8a64110f92506ee0b6999f2517e06a7d 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 9c49eb9bc0dfdc68d384c55ce9d4ee796d7130e5..32895c804919fcd27475f0d3539d24f227415268 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 e9d5da2f67b6c87057cc915d970fb9dbb83a1dc1..2bbc41d5706704716753b6c2ec91bd7b350050a3 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 2ef8cec28f8b0bebfd640103524550f14e041e92..369a8ac1fd2b7f444377d73df8a5fbec2397b1db 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 fa6d78cccc36225717787752409b0acd333947ff..cc709fe704b507f0cf161124947767c1aab26f90 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 5a4ef48e77bd6bc5b51d0de6b2bbf27e0c082d38..8c57869b54aadf78c3271ebc78409fc401f18cdf 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 3990109beda158ce7c7af3aa06938cefe72d4f74..4ace3612708741914db1dd0d13f155c5b065836e 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 18602034e8771a7e2d07407ec2269d74c43d1b8b..15119cc38c6bd9e4484c5f4a23eb3cc8f46298d2 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 19f5d6f696ef3f2c486412a8e9c97be7c3430045..24d7b16abaf76a9c85a86120ceefd14328541218 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 f12bffd66dbd259ad7bc625d2cfe9f4866248659..b4c1e7b479db74a88d92b745589af409d0d0801b 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 184f2a081506d8e9ea4b6ca527a56a4829108e1d..236d746faca82d88f1240e06872d48a302b1640b 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))
        }