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

from Soti.IoT.SemanticEngine.Conversions import Converter

print("Loading GenericToMPXSensorType Converter")

class GenericToMPXSensorType(Converter):

	def Execute(self, myList=[], *args):
		if myList[0] == "None":
			res = 0
		elif myList[0] == "Gap":
			res = 21
		elif myList[0] == "Mark":
			res = 22
		return res




plugin = GenericToMPXSensorType("GenericToMPXSensorType")

store.AddConverter(plugin)