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

from Soti.Connect.SemanticEngine.Conversions import Converter

print("Loading cabSensorTypeToGeneric Converter")

class cabSensorTypeToGeneric(Converter):

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




plugin = cabSensorTypeToGeneric("cabSensorTypeToGeneric")

store.AddConverter(plugin)