import ColorTemperature.ColorTemperatures
import Button.Button
import Button.Buttons
+import ThreeAxis.ThreeAxis
+import ThreeAxis.ThreeAxises
import Timer.SimulatedTimer
//GlobalVariables
@Field def buttonObject0
@Field def buttonObject1
@Field def buttonObject2
+//Global Object for class three axis!
+@Field threeAxisObjects = 0
+@Field def threeAxisObject0
+@Field def threeAxisObject1
+@Field def threeAxisObject2
//Global variables
extractedObjectsConstructorApp2.append(metaData['name']+" = obj.contactObject\n")
}
break
+ case "capability.threeAxis":
+ globalObjects.eachLine { line ->
+ if(line.contains("threeAxisObject")){
+ contains = 1
+ }
+ }
+
+ if (contains == 0)
+ globalObjects.append("@Field def threeAxisObject = new ThreeAxises(sendEvent, 1)\n")
+
+ if (threeAxisObjects == 0) {
+ threeAxisObject0 = metaData['name']
+ this[threeAxisObject0] = new ThreeAxises({}, 1)
+ } else if (threeAxisObjects == 1) {
+ threeAxisObject1 = metaData['name']
+ this[threeAxisObject1] = new ThreeAxises({}, 1)
+ } else if (threeAxisObjects == 2) {
+ threeAxisObject2 = metaData['name']
+ this[threeAxisObject2] = new ThreeAxises({}, 1)
+ }
+
+ threeAxisObjects=threeAxisObjects+1
+
+ settings.put(metaData['name'], new ThreeAxises({}, 1))
+
+ if (App == "App1") {
+ extractedObjectsApp1.append("//Object for class three axis!\n")
+ extractedObjectsApp1.append("def "+metaData['name']+"\n")
+ extractedObjectsConstructorApp1.append(metaData['name']+" = obj.threeAxisObject\n")
+ } else {
+ extractedObjectsApp2.append("//Object for class three axis!\n")
+ extractedObjectsApp2.append("def "+metaData['name']+"\n")
+ extractedObjectsConstructorApp2.append(metaData['name']+" = obj.threeAxisObject\n")
+ }
+ break
case "capability.doorControl":
globalObjects.eachLine { line ->
if(line.contains("doorControlObject")){
extractedObjectsApp2.append("def "+metaData['name']+" = \""+userInput+"\"\n")
}
break
+ case "boolean":
+ //def userInput = Math.abs(new Random().nextInt() % 2)
+ def userInput = true
+
+ if (boolVariables == 0) {
+ bool0 = metaData['name']
+ this[bool0] = userInput
+ } else if (boolVariables == 1) {
+ bool1 = metaData['name']
+ this[bool1] = userInput
+ } else if (boolVariables == 2) {
+ bool2 = metaData['name']
+ this[bool2] = userInput
+ } else if (boolVariables == 3) {
+ bool3 = metaData['name']
+ this[bool3] = userInput
+ } else if (boolVariables == 4) {
+ bool4 = metaData['name']
+ this[bool4] = userInput
+ } else if (boolVariables == 5) {
+ bool5 = metaData['name']
+ this[bool5] = userInput
+ }
+
+ if (boolVariables != 5)
+ boolVariables=boolVariables+1
+ else
+ boolVariables=0
+
+
+ settings.put(metaData['name'], metaData['name'])
+
+ if (App == "App1") {
+ extractedObjectsApp1.append("//Global variable for boolean!\n")
+ extractedObjectsApp1.append("def "+metaData['name']+" = \""+userInput+"\"\n")
+ } else {
+ extractedObjectsApp2.append("//Global variable for boolean!\n")
+ extractedObjectsApp2.append("def "+metaData['name']+" = \""+userInput+"\"\n")
+ }
+ break
case "bool":
//def userInput = Math.abs(new Random().nextInt() % 2)
def userInput = true
}
}
+def image(String data) {
+ println("//IGNORE--some image//")
+}
+
def page(LinkedHashMap metaData, Closure inputData) {
if (metaData.containsKey('name'))
println(metaData['name'])
println(paragraphText)
}
+def paragraph(LinkedHashMap metaData, String paragraphText) {
+ println(paragraphText)
+}
+
def section(String title, Closure inputData) {
println(title)
find(inputData) //Run the closure to extract inputMethods