Пример #1
0
 def vector_default_policy(self, signal, stream_policy, clocked=True, callback=None, auto_slot=False):
     """
     Pure vector policy.  These inputs have a static value which acts as a default 
     in the case where there is no event on this input.
     """
     self.check_signal(signal)
     return PolicyFactory(VectorDefaultPolicyImpl,self,signal,policy.DefaultStreamPolicy(stream_policy),clocked,callback,auto_slot)
Пример #2
0
 def merge_nodefault_policy(self, signal, stream_policy,clocked=True,callback=None):
     """
     These inputs are merged into wires created by other policies: they never cause
     the creation of wires.  There is no default from the static value.
     """
     self.check_signal(signal)
     return PolicyFactory(MergeNoDefaultPolicyImpl,self,signal,policy.DefaultStreamPolicy(stream_policy),clocked,callback)
Пример #3
0
 def vector_policy(self, signal, stream_policy, clocked=True, callback=None, auto_slot=False):
     """
     Pure vector policy.  These inputs dont have a static value (domain is ignored)
     and input wires are created only when connected
     """
     self.check_signal(signal)
     return PolicyFactory(VectorPolicyImpl,self,signal,policy.DefaultStreamPolicy(stream_policy),clocked,callback,auto_slot)
Пример #4
0
 def merge_policy(self, signal, stream_policy):
     self.check_signal(signal)
     return PolicyFactory(ScalarPolicyImpl,
                          self,
                          signal,
                          policy.DefaultStreamPolicy(stream_policy),
                          merge=True)
Пример #5
0
 def notify_policy(self, signal, stream_policy, notify=None):
     self.check_signal(signal)
     return PolicyFactory(NotifyScalarPolicyImpl,
                          self,
                          signal,
                          policy.DefaultStreamPolicy(stream_policy),
                          notify=notify)
Пример #6
0
 def local_policy(self, signal, stream_policy,clocked=True,callback=None):
     """
     When unconnected, a root stream is created carrying the static value.  When
     connected, the static value is disconnected and the input is used in a pure
     vector fashion.
     """
     self.check_signal(signal)
     return PolicyFactory(LocalPolicyImpl,self,signal,policy.DefaultStreamPolicy(stream_policy),clocked,callback)
Пример #7
0
 def merge_policy(self, signal, stream_policy,clocked=True,callback=None):
     """
     These inputs are merged into wires created by other policies: they never cause
     the creation of wires.  The static value acts as a global default.  connected
     signals may act as defaults too.
     """
     self.check_signal(signal)
     return PolicyFactory(MergePolicyImpl,self,signal,policy.DefaultStreamPolicy(stream_policy),clocked,callback)
Пример #8
0
 def latch_policy(self, signal, stream_policy, clocked=True, callback=None):
     """
     These inputs are merged into wires created by other policies: they never cause
     the creation of wires.  No global default.  Merged events will cause the 
     channel to stay open
     """
     self.check_signal(signal)
     return PolicyFactory(LatchPolicyImpl,self,signal,policy.DefaultStreamPolicy(stream_policy),clocked,callback)
Пример #9
0
 def nodefault_policy(self,signal,stream_policy):
     self.check_signal(signal)
     return PolicyFactory(ScalarNoDefaultPolicyImpl,self,signal,policy.DefaultStreamPolicy(stream_policy))