Example #1
0
 def __init__(self, device, name, unitX, minUnitX, maxUnitX,
              minRawX, maxRawX, unitY, minUnitY, maxUnitY, minRawY,
              maxRawY):
     InputWidget.__init__(self, device, name)
     self.valueX =\
         CorbomiteValue(unitX, minUnitX, maxUnitX, minRawX, maxRawX)
     self.valueY =\
         CorbomiteValue(unitY, minUnitY, maxUnitY, minRawY, maxRawY)
     self.valueToSend = (self.valueX.minRaw, self.valueY.minRaw)
     self.kind = 'tin'
Example #2
0
 def __init__(self, frame, parentDevice):
     toks = frame.split()
     CorbomiteWidget.__init__(self, frame, parentDevice,
                              [CorbomiteValue(toks[2], toks[3], toks[4],
                                              toks[5], toks[6]),
                               CorbomiteValue(toks[7], toks[8], toks[9],
                                              toks[10], toks[11])])
     self.trace = []
     self.x = None
     self.y = None
Example #3
0
 def __init__(self,
              device,
              name,
              unit,
              minUnit,
              maxUnit,
              minRaw,
              maxRaw,
              receiveCallbacks=[]):
     OutputWidget.__init__(self, device, name, receiveCallbacks)
     self.value = CorbomiteValue(unit, minUnit, maxUnit, minRaw, maxRaw)
     self.lastValue = self.value.minRaw
     self.kind = 'aout'
Example #4
0
class AnalogOut(OutputWidget):
    def __init__(self, device, name, unit, minUnit, maxUnit, minRaw, maxRaw,
                 receiveCallbacks=[]):
        OutputWidget.__init__(self, device, name, receiveCallbacks)
        self.value = CorbomiteValue(unit, minUnit, maxUnit, minRaw, maxRaw)
        self.lastValue = self.value.minRaw
        self.kind = 'aout'

    def addReceiver(self, receiveCallback):
        self.receiveCallbacks.append(receiveCallback)

    def getInfo(self):
        return self.value.getInfoString()
Example #5
0
class AnalogOut(OutputWidget):
    def __init__(self,
                 device,
                 name,
                 unit,
                 minUnit,
                 maxUnit,
                 minRaw,
                 maxRaw,
                 receiveCallbacks=[]):
        OutputWidget.__init__(self, device, name, receiveCallbacks)
        self.value = CorbomiteValue(unit, minUnit, maxUnit, minRaw, maxRaw)
        self.lastValue = self.value.minRaw
        self.kind = 'aout'

    def addReceiver(self, receiveCallback):
        self.receiveCallbacks.append(receiveCallback)

    def getInfo(self):
        return self.value.getInfoString()
Example #6
0
class AnalogIn(InputWidget):
    def __init__(self, device, name, unit, minUnit, maxUnit, minRaw, maxRaw):
        InputWidget.__init__(self, device, name)
        self.value = CorbomiteValue(unit, minUnit, maxUnit, minRaw, maxRaw)
        self.valueToSend = self.value.minRaw
        self.kind = 'ain'

    def setRawValue(self, value):
        self.value.setRaw(int(value))
        self.valueToSend = self.value.getRaw()
        self.send()

    def valueToSendString(self):
        return str(self.valueToSend)

    def assignValue(self, value):
        self.value.setUnit(value)
        self.valueToSend = self.value.getRaw()

    def getInfo(self):
        return self.value.getInfoString()
Example #7
0
class AnalogIn(InputWidget):
    def __init__(self, device, name, unit, minUnit, maxUnit,
                 minRaw, maxRaw):
        InputWidget.__init__(self, device, name)
        self.value = CorbomiteValue(unit, minUnit, maxUnit, minRaw, maxRaw)
        self.valueToSend = self.value.minRaw
        self.kind = 'ain'

    def setRawValue(self, value):
        self.value.setRaw(int(value))
        self.valueToSend = self.value.getRaw()
        self.send()

    def valueToSendString(self):
        return str(self.valueToSend)

    def assignValue(self, value):
        self.value.setUnit(value)
        self.valueToSend = self.value.getRaw()

    def getInfo(self):
        return self.value.getInfoString()
Example #8
0
 def __init__(self, device, name, unit, minUnit, maxUnit, minRaw, maxRaw):
     InputWidget.__init__(self, device, name)
     self.value = CorbomiteValue(unit, minUnit, maxUnit, minRaw, maxRaw)
     self.valueToSend = self.value.minRaw
     self.kind = 'ain'
Example #9
0
class TraceIn(InputWidget):
    def __init__(self, device, name, unitX, minUnitX, maxUnitX, minRawX,
                 maxRawX, unitY, minUnitY, maxUnitY, minRawY, maxRawY):
        InputWidget.__init__(self, device, name)
        self.valueX =\
            CorbomiteValue(unitX, minUnitX, maxUnitX, minRawX, maxRawX)
        self.valueY =\
            CorbomiteValue(unitY, minUnitY, maxUnitY, minRawY, maxRawY)
        self.valueToSend = (self.valueX.minRaw, self.valueY.minRaw)
        self.kind = 'tin'

    def setRawValue(self, value):
        self.valueX.setRaw(int(value[0]))
        self.valueY.setRaw(int(value[1]))
        self.valueToSend = (self.valueX.getRaw(), self.valueY.getRaw())
        self.send()

    def valueToSendString(self):
        return "%s %s" % (self.valueToSend[0], self.valueToSend[1])

    def assignValue(self, value):
        self.valueX.setUnit(value[0])
        self.valueY.setUnit(value[1])
        self.valueToSend = (self.valueX.getRaw(), self.valueY.getRaw())

    def getInfo(self):
        return "%s %s" %\
            (self.valueX.getInfoString(), self.valueY.getInfoString())
Example #10
0
 def __init__(self, frame, parentDevice):
     CorbomiteWidget.__init__(self, frame, parentDevice,
                              CorbomiteValue('bool', 0, 1, 0, 1))
Example #11
0
 def __init__(self, frame, parentDevice):
     toks = frame.split()
     CorbomiteWidget.__init__(
         self, frame, parentDevice,
         CorbomiteValue(toks[2], toks[3], toks[4], toks[5], toks[6]))
Example #12
0
 def __init__(self, device, name, unit, minUnit, maxUnit, minRaw, maxRaw,
              receiveCallbacks=[]):
     OutputWidget.__init__(self, device, name, receiveCallbacks)
     self.value = CorbomiteValue(unit, minUnit, maxUnit, minRaw, maxRaw)
     self.lastValue = self.value.minRaw
     self.kind = 'aout'
Example #13
0
 def __init__(self, device, name, unit, minUnit, maxUnit,
              minRaw, maxRaw):
     InputWidget.__init__(self, device, name)
     self.value = CorbomiteValue(unit, minUnit, maxUnit, minRaw, maxRaw)
     self.valueToSend = self.value.minRaw
     self.kind = 'ain'
Example #14
0
class TraceIn(InputWidget):
    def __init__(self, device, name, unitX, minUnitX, maxUnitX,
                 minRawX, maxRawX, unitY, minUnitY, maxUnitY, minRawY,
                 maxRawY):
        InputWidget.__init__(self, device, name)
        self.valueX =\
            CorbomiteValue(unitX, minUnitX, maxUnitX, minRawX, maxRawX)
        self.valueY =\
            CorbomiteValue(unitY, minUnitY, maxUnitY, minRawY, maxRawY)
        self.valueToSend = (self.valueX.minRaw, self.valueY.minRaw)
        self.kind = 'tin'

    def setRawValue(self, value):
        self.valueX.setRaw(int(value[0]))
        self.valueY.setRaw(int(value[1]))
        self.valueToSend = (self.valueX.getRaw(), self.valueY.getRaw())
        self.send()

    def valueToSendString(self):
        return "%s %s" % (self.valueToSend[0], self.valueToSend[1])

    def assignValue(self, value):
        self.valueX.setUnit(value[0])
        self.valueY.setUnit(value[1])
        self.valueToSend = (self.valueX.getRaw(), self.valueY.getRaw())

    def getInfo(self):
        return "%s %s" %\
            (self.valueX.getInfoString(), self.valueY.getInfoString())