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

from Soti.IoT.SemanticEngine.Conversions import Converter

print("Loading MPXSensorTypeToGeneric Converter")

class MPXSensorTypeToGeneric(Converter):

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




plugin = MPXSensorTypeToGeneric("MPXSensorTypeToGeneric")

store.AddConverter(plugin)