The vivo_technologies module

Autogenerated API documentation for vivo_technologies

Driver for a Vivo Technologies LS-689A barcode scanner

PyExpLabSys.drivers.vivo_technologies.detect_barcode_device()[source]

Return the input device path of the Barcode Scanner

Iterates over all devices in /dev/input/event?? and looks for one that has ‘Barcode Reader’ in its description.

Returns:The Barcode Scanner device path
Return type:str
class PyExpLabSys.drivers.vivo_technologies.BlockingBarcodeReader(device_path)[source]

Bases: object

Blocking Barcode Reader

__init__(device_path)[source]

x.__init__(…) initializes x; see help(type(x)) for signature

read_barcode()[source]

Wait for a barcode and return it

close()[source]

Close the device

class PyExpLabSys.drivers.vivo_technologies.ThreadedBarcodeReader(device_path)[source]

Bases: threading.Thread

Threaded Barcode Scanner that holds only the last value

__init__(device_path)[source]

This constructor should always be called with keyword arguments. Arguments are:

group should be None; reserved for future extension when a ThreadGroup class is implemented.

target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called.

name is the thread name. By default, a unique name is constructed of the form “Thread-N” where N is a small decimal number.

args is the argument tuple for the target invocation. Defaults to ().

kwargs is a dictionary of keyword arguments for the target invocation. Defaults to {}.

If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.

run()[source]

The threaded run method

last_barcode_in_queue

Last barcode in the queue

wait_for_barcode

Last barcode property

oldest_barcode_from_queue

Get one barcode from the queue if there is one

close()[source]

Close the device