import clr
clr.AddReference('Soti.IoT.SemanticEngine.Conversions')

from Soti.IoT.SemanticEngine.Conversions import Converter

print("Loading cabSensorTypeToGeneric Converter")

class cabSensorTypeToGeneric(Converter):

	def Execute(self, myList=[], *args):
		res = ""
		if myList[0] == "Top-Reflect":
			res = "Mark"
		elif myList[0] == "Gap Sensor":
			res = "Gap"
		elif myList[0] == "Continous media":
			res = "None"
		return res




plugin = cabSensorTypeToGeneric("cabSensorTypeToGeneric")

store.AddConverter(plugin)