Fixing a bug in event to variable mapping.
authorrtrimana <rtrimana@uci.edu>
Mon, 29 Jul 2019 17:47:01 +0000 (10:47 -0700)
committerrtrimana <rtrimana@uci.edu>
Mon, 29 Jul 2019 17:47:01 +0000 (10:47 -0700)
Extractor/ExtractorScript.py

index 8e10962718a296c4846b894aa2d11261e9d596ee..0e9539f84609079004eec1d85376b35ebc8227a8 100644 (file)
@@ -76,6 +76,8 @@ def ExtractFunctions(F, appName):
                        else:
                                app2Subscribe = True
                        Temp = GetToken(F)
+                       if (Temp == "("):
+                               Temp = GetToken(F)
                        variable = Temp
                        while (Temp != "\"" and Temp != "app" and Temp != "location"):
                                Temp = GetToken(F)
@@ -260,10 +262,13 @@ def ExtractEvents(extractedEvents):
                        event.close()
                        extractedEvents.write("\t\t\t}\n")
                elif eventList[i] == "carbonMonoxide":
+                       print eventVarMap
+                       print capabilityMap
+
                        #Check which capability
                        variable = eventVarMap[eventList[i]]
                        capability = capabilityMap[variable]
-       
+
                        #Write three events subsequently
                        extractedEvents.write("\t\t\tdef event = Verify.getInt(0,2)\n")
                        extractedEvents.write("\t\t\tif (event == 0) {\n")