def make_filter(self, stream, slot): if logic.is_pred_arity(stream, 'conn', 4, 4): if stream.args[0] is not None: using = int(stream.args[0]) else: using = 0 if self.__auto_slot: using = using | (slot << 8) if stream.args[1] is not None: tgt = int(stream.args[1]) else: tgt = 0 id = stream.args[2] path = stream.args[3] if path is not None: return (id, piw.signal_dsc_filter(using, tgt, path)) else: return (id, piw.signal_cnc_filter(using, tgt)) print 'cop out of', stream return ('', piw.null_filter())
def make_ctl_filter(self, stream, slot): if logic.is_pred_arity(stream, 'ctl', 2, 2): id = stream.args[0] path = stream.args[1] if path is not None: return (id, piw.signal_dsc_filter(slot, 0, path)) else: return (id, piw.signal_cnc_filter(slot, 0)) print 'cop out of', stream return ('', piw.null_filter())
def __init__(self, name, address, abs, wav): self.__cdomain = piw.clockdomain_ctl() self.__backend = piw.capture_backend(name, 1, abs, wav) self.__correlator = piw.correlator(self.__cdomain, chr(1), piw.null_filter(), self.__backend.cookie(), 0, 0) self.__filter = piw.signal_cnc_filter(0, 0) self.__plumber = policy.Plumber(self.__correlator, 1, 1, -1, policy.Plumber.input_input, policy.AnisoStreamPolicy(), address, self.__filter, False, self.__connected)
def make_filter(self, stream, slot): if logic.is_pred_arity(stream, 'conn', 5, 5): if stream.args[0] is not None: using = int(stream.args[0]) else: using = 0 if stream.args[1] is not None: tgt = int(stream.args[1]) else: tgt = 0 id = paths.to_absolute(stream.args[2], self.__scope) path = stream.args[3] ctl = True if stream.args[4] == 'ctl' else False if path is not None: return (id, piw.signal_dsc_filter(using, tgt, path), ctl) else: return (id, piw.signal_cnc_filter(using, tgt), ctl) return ('', piw.null_filter(), False)