dsmr_parser/clients/serial_.py
def read(self):
        """
        Read complete DSMR telegram's from the serial interface and parse it
        into CosemObject's and MbusObject's

        :rtype: generator
        """
        with serial.Serial(**self.serial_settings) as serial_handle:
            while True:
                data = serial_handle.readline()
                self.telegram_buffer.append(data.decode('ascii'))

                for telegram in self.telegram_buffer.get_all():
                    try:
                        yield self.telegram_parser.parse(telegram)
                    except InvalidChecksumError as e:
                        logger.warning(str(e))
                    except ParseError as e:
                        logger.error('Failed to parse telegram: %s', e)
def read(self):
        with serial.Serial(**self.serial_settings) as serial_handle:
            while True:
                data = serial_handle.readline()
                self.telegram_buffer.append(data.decode('ascii'))

                for telegram in self.telegram_buffer.get_all():
                    try:
                        yield self.telegram_parser.parse(telegram)
                    except InvalidChecksumError as e:
                        logger.warning(str(e))
                    except ParseError as e:
                        logger.error('Failed to parse telegram: %s', e)
def read ( self ) : with serial . Serial ( * * self . serial_settings ) as serial_handle : while True : data = serial_handle . readline ( ) self . telegram_buffer . append ( data . decode ( 'ascii' ) ) for telegram in self . telegram_buffer . get_all ( ) : try : yield self . telegram_parser . parse ( telegram ) except InvalidChecksumError as e : logger . warning ( str ( e ) ) except ParseError as e : logger . error ( 'Failed to parse telegram: %s' , e )
Read complete DSMR telegram's from the serial interface and parse it
        into CosemObject's and MbusObject's

        :rtype: generator
Read complete DSMR telegram s from the serial interface and parse it into CosemObject s and MbusObject s