F = open("Extractor/App.groovy", "r")
-Out = open("Extractor/ExtractedObjects.groovy", "w+")
+Out = open("Extractor/extractedObjects.groovy", "w+")
Temp = GetToken(F)
Objects = []
if (Multiple != "" and Multiple == "true"):
g = raw_input("Enter the number of locks to control: (1, 2, or 3)\n")
Out.write("//Global Object for class lock!\n")
- Out.write("@Field def %s = new locking(" % Object)
+ Out.write("@Field def %s = new Locking(sendEvent, " % Object)
Out.write("%s)\n" % g)
elif (Multiple == "" or Multiple == "false"):
Out.write("//Global Object for class lock!\n")
- Out.write("@Field def %s = new locking(1)\n" % Object)
+ Out.write("@Field def %s = new Locking(sendEvent, 1)\n" % Object)
#elif (Type == "capability.alarm"):
#elif (Type == "capability.battery"):
if (Multiple != "" and Multiple == "true"):
g = raw_input("Enter the number of contactSensors to monitor: (1, 2, or 3)\n")
Out.write("//Global Object for class contactSensor!\n")
- Out.write("@Field def %s = new contacting(" % Object)
+ Out.write("@Field def %s = new Contacting(sendEvent, " % Object)
Out.write("%s)\n" % g)
elif (Multiple == "" or Multiple == "false"):
Out.write("//Global Object for class contactSensor!\n")
- Out.write("@Field def %s = new contacting(1)\n" % Object)
+ Out.write("@Field def %s = new Contacting(sendEvent, 1)\n" % Object)
#elif (Type == "capability.doorControl"):
#elif (Type == "capability.energyMeter"):
if (Multiple != "" and Multiple == "true"):
g = raw_input("Enter the number of switches to control: (1, 2, or 3)\n")
Out.write("//Global Object for class switch!\n")
- Out.write("@Field def %s = new switching(" % Object)
+ Out.write("@Field def %s = new Switching(sendEvent, " % Object)
Out.write("%s)\n" % g)
elif (Multiple == "" or Multiple == "false"):
Out.write("//Global Object for class switch!\n")
- Out.write("@Field def %s = new switching(1)\n" % Object)
+ Out.write("@Field def %s = new Switching(sendEvent, 1)\n" % Object)
#elif (Type == "capability.switchLevel"):
#elif (Type == "capability.temperatureMeasurement"):