//By Model Checker
def setValue(LinkedHashMap eventDataMap) {
if (eventDataMap["value"] != motionSensors[0].motion) {
+ this.motionLatestValue = eventDataMap["value"]
+ this.motion = eventDataMap["value"]
+ this.currentMotion = eventDataMap["value"]
motionSensors[0].setValue(eventDataMap["value"])
- this.motionLatestValue = motionSensors[0].motionLatestValue
- this.motion = motionSensors[0].motion
- this.currentMotion = motionSensors[0].motion
sendEvent(eventDataMap)
}
}
def find(Closure Input) {
motionSensors.find(Input)
}
+ def sort(Closure Input) {
+ motionSensors.sort(Input)
+ }
def collect(Closure Input) {
motionSensors.collect(Input)
}