- this.smoke = smoke
- this.currentSmokeValue = smoke
- this.smokeLatestValue = smokeLatestValue
- }
-
- def setValue(String value) {
- this.smokeLatestValue = smoke
- println("the smoke detector with id:$id is triggered to $value!")
- this.smoke = value
- this.currentSmokeValue = value
- }
-
-
- def currentValue(String deviceFeature) {
- if (deviceFeature == "smoke") {
- return currentSmokeValue
- }
- }