def __init__(self, atom, data_domain, init, transient, handler, stream_policy=None, clock=True): self.__stream_policy = stream_policy or ThrottleStreamPolicy(500) self.__handler = handler self.__slow_handler = utils.fastchange(self.__handler) self.__ctl_handler = piw.change2( self.__slow_handler, piw.slowchange(utils.changify(self.__control))) self.__clock_domain = piw.clockdomain_ctl() self.__clock_domain.set_source(piw.makestring('*', 0L)) self.__clock = piw.clocksink() self.__clock_domain.sink(self.__clock, 'FastPolicy') self.__upstream = None self.__backend = None self.__correlator = None self.__ctrl = None ConnectablePolicyImpl.__init__(self, atom, data_domain, init, clock, node.Server(transient=transient), False) self.data_node().set_change_handler(self.__slow_handler) self.data_node().set_data(self.get_domain().value2data(init))
def __init__(self, clock_domain=None): self.__atomlist = {} self.__upstream = None if clock_domain is not None: self.clock = piw.clocksink() clock_domain.sink(self.clock, 'VerbContainer') Atom.__init__(self, protocols='verb', creator=self.__create, wrecker=self.__wreck, bignode=True)
def __init__(self, master, ordinal, scope, outer): atom.Atom.__init__(self, ordinal=ordinal, policy=RigOutputPolicy(), protocols='remove') self.set_connection_scope(scope) self.__inputs = {} self.__master = master self.__monitors = {} self.__scope = scope self.__clockdom = piw.clockdomain_ctl() self.__clockdom.set_source(piw.makestring('*', 0)) self.__clock = piw.clocksink() self.__clockdom.sink(self.__clock, "%s rig output" % ("outer" if outer else "inner")) self.__output = self.get_policy().data_node() self.__output.set_clock(self.__clock) self.set_domain(domain.Aniso())