Package kenozooid :: Package driver

Package driver

source code

Support for dive computers, dive data loggers and other measurment devices used in diving.

The module specifies set of interfaces to be implemented by device drivers.

Submodules

Classes
  DeviceDriver
Device driver interface.
  Simulator
Diving computer dive simulation interface.
  DataParser
Diving computer data parser interface.
  DeviceError
Device communication error.
Functions
 
find_driver(iface, query, port=None)
Find device driver implementing an interface.
source code
Variables
  log = logging.getLogger('kenozooid.driver')
  __package__ = 'kenozooid.driver'
Function Details

find_driver(iface, query, port=None)

source code 

Find device driver implementing an interface.

Query parameter is used to find driver by its id or device model. Device error exception is raised if driver is not found.

If device driver does not support functionality specified by an interface, then None is returned.

Parameters:
  • iface - Interface of functionality.
  • query - Device driver id or device model string.
  • port - Device port (i.e. /dev/ttyUSB0, COM1).