def __init__(self, evt_callback):
        """
        Constructor.

        @param evt_callback Driver process event callback.
        """
        InstrumentDriver.__init__(self, evt_callback)

        # _trhph_client created in configure()
        self._trhph_client = None

        self._state = TrhphDriverState.UNCONFIGURED

        # TODO probably promote this convenience to super-class?
        self._timeout = 30
        """Default timeout value for operations accepting an optional timeout
示例#2
0
    def __init__(self, evt_callback):
        """
        Constructor.

        @param evt_callback Driver process event callback.
        """
        InstrumentDriver.__init__(self, evt_callback)

        # _trhph_client created in configure()
        self._trhph_client = None

        self._state = TrhphDriverState.UNCONFIGURED

        # TODO probably promote this convenience to super-class?
        self._timeout = 30
        """Default timeout value for operations accepting an optional timeout
示例#3
0
    def __init__(self, evt_callback=None):
        InstrumentDriver.__init__(self, evt_callback)

        self.instrument_commands = Command
        self.instrument_parameters = Parameter
        self.instrument_channels = Channel
        self.instrument_errors = Error

        for channel in self.instrument_channels.list():
            #
            # TODO associate some specific params per channel. Note that
            # there is no framework mechanism to specify this. For the
            # moment, just associate *all* parameters to each channel:
            #
            params_per_channel = self.instrument_parameters.list()
            protocol = MyProtocol(channel, params_per_channel, self.protocol_callback)
            protocol._fsm = Mock()
            protocol._fsm.get_current_state = Mock(return_value=DriverState.UNCONFIGURED)
            self.chan_map[channel] = protocol
示例#4
0
    def __init__(self, evt_callback=None):
        InstrumentDriver.__init__(self, evt_callback)

        self.instrument_commands = Command
        self.instrument_parameters = Parameter
        self.instrument_channels = Channel
        self.instrument_errors = Error

        for channel in self.instrument_channels.list():
            #
            # TODO associate some specific params per channel. Note that
            # there is no framework mechanism to specify this. For the
            # moment, just associate *all* parameters to each channel:
            #
            params_per_channel = self.instrument_parameters.list()
            protocol = MyProtocol(channel, params_per_channel,
                                  self.protocol_callback)
            protocol._fsm = Mock()
            protocol._fsm.get_current_state = Mock(return_value=DriverState.UNCONFIGURED)
            self.chan_map[channel] = protocol