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 __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
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'
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()
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()
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'
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())
def __init__(self, frame, parentDevice): CorbomiteWidget.__init__(self, frame, parentDevice, CorbomiteValue('bool', 0, 1, 0, 1))
def __init__(self, frame, parentDevice): toks = frame.split() CorbomiteWidget.__init__( self, frame, parentDevice, CorbomiteValue(toks[2], toks[3], toks[4], toks[5], toks[6]))