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

from Soti.Connect.SemanticEngine.Conversions import Converter

print("Loading BrotherPJMediaSensorTypeToGeneric Converter")

class BrotherPJMediaSensorTypeToGeneric(Converter):

    def Execute(self, args):
        res = ""
        if int(args[0]) <= 85:
            res = "None"
        elif int(args[0]) <= 170:
            res = "Gap"
        elif int(args[0]) <= 255:
            res = "Mark"
        return res




plugin = BrotherPJMediaSensorTypeToGeneric("BrotherPJMediaSensorTypeToGeneric")

store.AddConverter(plugin)