extractedEvents.write(line)
event.close()
elif eventList[i] == "power":
- event = open("eventSimulator/powerMeterEvent.groovy", "r")
+ #Write two events subsequently
+ event = open("eventSimulator/powerMeterHighPowerEvent.groovy", "r")
+ for line in event:
+ extractedEvents.write(line)
+ event.close()
+ extractedEvents.write("\n\t\t\tbreak\n")
+ counter = counter + 1
+ extractedEvents.write("\t\tcase %d:\n" % counter)
+ event = open("eventSimulator/powerMeterLowPowerEvent.groovy", "r")
for line in event:
extractedEvents.write(line)
event.close()
println("Speech synthesis with id:$id, SPEAKING:\"$message\"!")
// As a conflict variable
if (oneUser) {
- oneUser = false
+ this.oneUser = false
} else {
- oneUser = true
+ this.oneUser = true
}
}
}
speechSynthesises[0].speak(message)
// As a conflict variable
if (oneUser) {
- oneUser = false
+ this.oneUser = false
} else {
- oneUser = true
+ this.oneUser = true
}
}
--- /dev/null
+ powerMeterObject.setValue([name: "power", value: "70"/*A number between 0 to 100 as a charge*/, deviceId: "powerMeterID0", descriptionText: "",
+ displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
--- /dev/null
+ powerMeterObject.setValue([name: "power", value: "30"/*A number between 0 to 100 as a charge*/, deviceId: "powerMeterID0", descriptionText: "",
+ displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])