(self, identifier)
return SlavePipe(identifier, self._queue, future)
Register an slave device.

        Args:
            identifier: an identifier, usually is the device id.

        Returns: a `SlavePipe` object which can be used to communicate with the master device.
Register an slave device.
Register an slave device .
def register_slave(self, identifier):
        """
        Register an slave device.

        Args:
            identifier: an identifier, usually is the device id.

        Returns: a `SlavePipe` object which can be used to communicate with the master device.

        """
        if self._activated:
            assert self._queue.empty(), 'Queue is not clean before next initialization.'
            self._activated = False
            self._registry.clear()
        future = FutureResult()
        self._registry[identifier] = _MasterRegistry(future)
        return SlavePipe(identifier, self._queue, future)
def register_slave ( self , identifier ) : if self . _activated : assert self . _queue . empty ( ) , 'Queue is not clean before next initialization.' self . _activated = False self . _registry . clear ( ) future = FutureResult ( ) self . _registry [ identifier ] = _MasterRegistry ( future ) return SlavePipe ( identifier , self . _queue , future )