def set_sampling_strategies(self, filter, strategy_and_params):
        """Set a sampling strategy for all sensors that match the specified filter.

        Parameters
        ----------
        filter : string
            The regular expression filter to use to select the sensors to which
            to apply the specified strategy.  Use "" to match all sensors. Is
            matched using :meth:`list_sensors`.
        strategy_and_params : seq of str or str
            As tuple contains (<strat_name>, [<strat_parm1>, ...]) where the strategy
            names and parameters are as defined by the KATCP spec. As str contains the
            same elements in space-separated form.
        **list_sensor_args : keyword arguments
            Passed to the :meth:`list_sensors` call as kwargs

        Returns
        -------
        sensors_strategies : tornado Future
           resolves with a dict with the Python identifier names of the sensors
           as keys and the value a tuple:

           (success, info) with

           sucess : bool
              True if setting succeeded for this sensor, else False
           info : tuple
               normalised sensor strategy and parameters as tuple if success == True
               else, sys.exc_info() tuple for the error that occured.
        """
        sensors_strategies = {}
        sensor_results = yield self.list_sensors(filter)
        for sensor_reslt in sensor_results:
            norm_name = sensor_reslt.object.normalised_name
            try:
                sensor_strat = yield self.set_sampling_strategy(norm_name, strategy_and_params)
                sensors_strategies[norm_name] = sensor_strat[norm_name]
            except Exception:
                sensors_strategies[norm_name] = (
                    False, sys.exc_info())
        raise tornado.gen.Return(sensors_strategies)
def set_sampling_strategies ( self , filter , strategy_and_params ) : sensors_strategies = { } sensor_results = yield self . list_sensors ( filter ) for sensor_reslt in sensor_results : norm_name = sensor_reslt . object . normalised_name try : sensor_strat = yield self . set_sampling_strategy ( norm_name , strategy_and_params ) sensors_strategies [ norm_name ] = sensor_strat [ norm_name ] except Exception : sensors_strategies [ norm_name ] = ( False , sys . exc_info ( ) ) raise tornado . gen . Return ( sensors_strategies )
Set a sampling strategy for all sensors that match the specified filter.

        Parameters
        ----------
        filter : string
            The regular expression filter to use to select the sensors to which
            to apply the specified strategy.  Use "" to match all sensors. Is
            matched using :meth:`list_sensors`.
        strategy_and_params : seq of str or str
            As tuple contains (<strat_name>, [<strat_parm1>, ...]) where the strategy
            names and parameters are as defined by the KATCP spec. As str contains the
            same elements in space-separated form.
        **list_sensor_args : keyword arguments
            Passed to the :meth:`list_sensors` call as kwargs

        Returns
        -------
        sensors_strategies : tornado Future
           resolves with a dict with the Python identifier names of the sensors
           as keys and the value a tuple:

           (success, info) with

           sucess : bool
              True if setting succeeded for this sensor, else False
           info : tuple
               normalised sensor strategy and parameters as tuple if success == True
               else, sys.exc_info() tuple for the error that occured.