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

from Soti.Connect.SemanticEngine.Conversions import Converter

print("Loading GenericToMPXSensorType Converter")

class GenericToMPXSensorType(Converter):

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




plugin = GenericToMPXSensorType("GenericToMPXSensorType")

store.AddConverter(plugin)