1 //Create a class for location variable
5 private int contactBookEnabled
12 private List phoneNumbers
15 private Phrase helloHome
17 LocationVar(Closure sendEvent) {
18 this.hubs = [[id:0, localIP:"128.195.204.105"]]
19 this.modes = [[name: "home"],[name: "away"],[name: "night"]]
21 this.helloHome = new Phrase()
22 this.contactBookEnabled = 1
23 this.contacts = ['AJ']
24 this.phoneNumbers = [9495379373]
25 this.sendEvent = sendEvent
26 this.timeZone = TimeZone.getTimeZone("America/New_York")
31 def setValue(LinkedHashMap eventDataMap) {
32 def sentMode = eventDataMap['value']
33 println("The location is changed to $sentMode!")
35 sendEvent(eventDataMap)