pylabrobot.paa.kx2.KX2BarcodeReader#
- class pylabrobot.paa.kx2.KX2BarcodeReader(port: str, baudrate: int = 9600)#
Bases:
objectAn independently connected reader using ESC commands and CR-terminated replies.
The reader must be configured for external triggering. Setup, scanning and teardown leave its mode, symbologies and firmware read window unchanged.
read_timeis a host deadline; the reader can finish its own read window earlier. A scan always switches its trigger off.Attributes
Methods
__init__(port[, baudrate])Configure a serial connection without opening it.
Read the scanner firmware version.
scan_barcode([read_time])Return one barcode or None by the host deadline, preserving the firmware read window.
setup()Connect and verify the version; close the port after a partial setup failure.
stop()Join any active scan's trigger cleanup and close the port.