//By Model Checker
def setValue(LinkedHashMap eventDataMap) {
if (eventDataMap["value"] != carbonMonoxideDetectors[0].currentCarbonMonoxideValue) {
+ this.carbonMonoxideLatestValue = eventDataMap["value"]
+ this.carbonMonoxide = eventDataMap["value"]
+ this.currentCarbonMonoxideValue = eventDataMap["value"]
carbonMonoxideDetectors[0].setValue(eventDataMap["value"])
- this.carbonMonoxideLatestValue = carbonMonoxideDetectors[0].carbonMonoxideLatestValue
- this.carbonMonoxide = carbonMonoxideDetectors[0].currentCarbonMonoxideValue
- this.currentCarbonMonoxideValue = carbonMonoxideDetectors[0].currentCarbonMonoxideValue
sendEvent(eventDataMap)
}
}
def find(Closure Input) {
carbonMonoxideDetectors.find(Input)
}
+ def sort(Closure Input) {
+ carbonMonoxideDetectors.sort(Input)
+ }
def collect(Closure Input) {
carbonMonoxideDetectors.collect(Input)
}