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

from Soti.Connect.SemanticEngine.Conversions import Converter

print("Loading MPXSensorTypeToGeneric Converter")

class MPXSensorTypeToGeneric(Converter):

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




plugin = MPXSensorTypeToGeneric("MPXSensorTypeToGeneric")

store.AddConverter(plugin)