(self)
Read bytes from serial and enqueue the packets if the packet is not a.
        Stops if the self._running event is not set.
Read bytes from serial and enqueue the packets if the packet is not a.
        Stops if the self._running event is not set.
Read bytes from serial and enqueue the packets if the packet is not a . Stops if the self . _running event is not set .
def _receive(self):
        """
        Read bytes from serial and enqueue the packets if the packet is not a.
        Stops if the self._running event is not set.
        """
        log.info("Running receiver")
        while self._running.is_set():
            packet = self._lib.parse_byte(self._ser.read())
            if packet is not None:
                try:
                    packet_type, args = self._lib.decode_packet(packet)
                except bglib.UnknownMessageType:
                    log.warn("Ignoring message decode failure", exc_info=True)
                    continue
                if packet_type == EventPacketType.attclient_attribute_value:
                    device = self._connections[args['connection_handle']]
                    device.receive_notification(args['atthandle'],
                                                bytearray(args['value']))
                self._receiver_queue.put(packet)
        log.info("Stopping receiver")
def _receive ( self ) : log . info ( "Running receiver" ) while self . _running . is_set ( ) : packet = self . _lib . parse_byte ( self . _ser . read ( ) ) if packet is not None : try : packet_type , args = self . _lib . decode_packet ( packet ) except bglib . UnknownMessageType : log . warn ( "Ignoring message decode failure" , exc_info = True ) continue if packet_type == EventPacketType . attclient_attribute_value : device = self . _connections [ args [ 'connection_handle' ] ] device . receive_notification ( args [ 'atthandle' ] , bytearray ( args [ 'value' ] ) ) self . _receiver_queue . put ( packet ) log . info ( "Stopping receiver" )