def __init__(self, *args, **kwargs): BaseChannel.__init__(self, *args, **kwargs) # Variables to hold the current state. We use only the message # as a reference, so we dont need a lock. # The package is used to make _recv() function more or less, # and to be able to determine if a state was set (because the # message may be set to None) self._current_package = None self._current_message = self.message_from_bytes(bytes())
def __init__(self, *args, **kwargs): BaseChannel.__init__(self, *args, **kwargs) # To detect when to block the sending side self._queue_status = QUEUE_NULL self._queue_status_timeout = 0 self._HWM = 32 self._LWM = 16 # Automatically check queue status when new data # enters the system self.received.bind(self._check_queue_status)
def __init__(self, context, slot_base): BaseChannel.__init__(self, context, slot_base, OBJECT) # Pending pre-requests self._pre_requests = [] # Current pre-request and time that it was acknowledged self._pre_request = None self._pre_request_time = 0 # Create thread self._thread = ThreadForReqChannel(self) # Create timer (do not start) self._timer = yoton.events.Timer(2.0, False) self._timer.bind(self._process_events_local) # By default, the replier is off self._run_mode = 0
def __init__(self, context, slot_base): BaseChannel.__init__(self, context, slot_base, OBJECT) # Queue with pending requests self._request_items = {} # Timeout self._next_recheck_time = time.time() + 0.2 # Counter self._request_counter = 0 # The req channel is always in event driven mode self._run_mode = 1 # Bind signals to process the events for this channel # Bind to "received" signal for quick response and a timer # so we can resend requests if we do not receive anything. self.received.bind(self._process_events_local) self._timer = yoton.events.Timer(0.5, False) self._timer.bind(self._process_events_local) self._timer.start()
def __init__(self, *args, **kwargs): BaseChannel.__init__(self, *args, **kwargs) self._source_set = set()