1 //Create a class for aeon key fob
3 import Timer.SimulatedTimer
6 import gov.nasa.jpf.vm.Verify
8 public class AeonKeyFobs {
9 private int deviceNumbers
10 private List aeonKeyFobs
13 //For one device(We cannot have obj.id)-> We should have obj[0].id
14 private String id = "aeonKeyFobID0"
15 private String label = "aeonKeyFob0"
16 private String displayName = "aeonKeyFob0"
19 AeonKeyFobs(Closure sendEvent, int deviceNumbers) {
20 this.sendEvent = sendEvent
21 this.deviceNumbers = deviceNumbers
24 aeonKeyFobs.add(new AeonKeyFob(id, label, displayName))
28 def setValue(LinkedHashMap eventDataMap) {
29 aeonKeyFobs[0].setValue(eventDataMap)
30 sendEvent(eventDataMap)
33 //Methods for closures
34 def count(Closure Input) {
35 aeonKeyFobs.count(Input)
40 def each(Closure Input) {
41 aeonKeyFobs.each(Input)
43 def sort(Closure Input) {
44 aeonKeyFobs.sort(Input)
46 def find(Closure Input) {
47 aeonKeyFobs.find(Input)
49 def collect(Closure Input) {
50 aeonKeyFobs.collect(Input)
55 def eventsSince(Date dateObj) {
56 return aeonKeyFobs[0].eventsSince()