#If counter >= 5 that means it is not found, so it must be appTouch
if (counter >= 5):
Temp = "Touched"
- eventMap.append(Temp)
- Temp = GetToken(F)
-
+ if Temp not in eventMap:
+ eventMap.append(Temp)
+
#Check and analyze capabilities for physical interaction
AnalyzeCapabilities(Temp, appName)
+
Temp = GetToken(F)
#Warn if there is a potential for physical interaction
AnalyzePhysicalInteraction(app1Capabilities, app2Capabilities)
AnalyzePhysicalInteraction(app2Capabilities, app1Capabilities)
+
+
def AnalyzeCapabilities(Temp, appName):
#Illuminance related
if (Temp == "capability.switch" or
if ("capability.soundSensor" in app1Capab) and ("capability.musicPlayer" in app2Capab or
"capability.alarm" in app2Capab or "capability.speechSynthesis" in app2Capab):
print ("\nWARNING: Potential PHYSICAL CONFLICT (sound) detected between App1 and App2!\n")
-
+
def ExtractEvents(extractedEvents):
global eventMap
extractedEvents.write("Random random = new Random(42)\n")