def __init__(self, channel, params, evt_callback=None): """ @param channel identifies the particular protocol instance. @param params the particular parameters for this channel. """ InstrumentProtocol.__init__(self, evt_callback) self._channel = channel # initialize values for the params: MyProtocol.next_base_value += 1000 next_value = MyProtocol.next_base_value self._values = {} for param in params: next_value += 1 self._values[param] = next_value
def __init__(self, evt_callback=None): """ Creates and initializes a protocol object to the UNCOFIGURED state. """ InstrumentProtocol.__init__(self, evt_callback) self.trhph_client = None self._host = None self._port = None self._state = DriverState.UNCONFIGURED # TODO probably promote this convenience to super-class? self._timeout = 30 """Default timeout value for operations accepting an optional timeout