summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.com>2020-03-29 18:34:01 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-04-09 20:03:18 +0200
commit4831137d359e0abc8c16d152a0c13340c2eed79d (patch)
tree9b2756c92e17acab07752c88212ee0973e5d278f
parentMove driver_base to glucometerutils.driver instead. (diff)
downloadglucometerutils-4831137d359e0abc8c16d152a0c13340c2eed79d.tar
glucometerutils-4831137d359e0abc8c16d152a0c13340c2eed79d.tar.gz
glucometerutils-4831137d359e0abc8c16d152a0c13340c2eed79d.tar.bz2
glucometerutils-4831137d359e0abc8c16d152a0c13340c2eed79d.tar.lz
glucometerutils-4831137d359e0abc8c16d152a0c13340c2eed79d.tar.xz
glucometerutils-4831137d359e0abc8c16d152a0c13340c2eed79d.tar.zst
glucometerutils-4831137d359e0abc8c16d152a0c13340c2eed79d.zip
-rw-r--r--glucometerutils/driver.py2
-rw-r--r--glucometerutils/drivers/accuchek_reports.py2
-rw-r--r--glucometerutils/drivers/fsoptium.py2
-rw-r--r--glucometerutils/drivers/otultra2.py2
-rw-r--r--glucometerutils/drivers/otultraeasy.py2
-rw-r--r--glucometerutils/drivers/otverio2015.py2
-rw-r--r--glucometerutils/drivers/otverioiq.py2
-rw-r--r--glucometerutils/drivers/sdcodefree.py2
-rw-r--r--glucometerutils/drivers/td4277.py2
-rw-r--r--glucometerutils/support/contourusb.py2
-rw-r--r--glucometerutils/support/freestyle.py2
11 files changed, 11 insertions, 11 deletions
diff --git a/glucometerutils/driver.py b/glucometerutils/driver.py
index d630031..641a5b6 100644
--- a/glucometerutils/driver.py
+++ b/glucometerutils/driver.py
@@ -10,7 +10,7 @@ from typing import Generator, Optional, Text
from glucometerutils import common
-class GlucometerDriver(abc.ABC):
+class GlucometerDevice(abc.ABC):
def __init__(self, device_path: Optional[Text]) -> None:
pass
diff --git a/glucometerutils/drivers/accuchek_reports.py b/glucometerutils/drivers/accuchek_reports.py
index 0f2c983..5c56597 100644
--- a/glucometerutils/drivers/accuchek_reports.py
+++ b/glucometerutils/drivers/accuchek_reports.py
@@ -46,7 +46,7 @@ _TIME_FORMAT = "%H:%M"
_DATETIME_FORMAT = " ".join((_DATE_FORMAT, _TIME_FORMAT))
-class Device(driver.GlucometerDriver):
+class Device(driver.GlucometerDevice):
def __init__(self, device: Optional[str]) -> None:
if not device or not os.path.isdir(device):
raise exceptions.CommandLineError(
diff --git a/glucometerutils/drivers/fsoptium.py b/glucometerutils/drivers/fsoptium.py
index 789cdfd..38e3a8e 100644
--- a/glucometerutils/drivers/fsoptium.py
+++ b/glucometerutils/drivers/fsoptium.py
@@ -86,7 +86,7 @@ def _parse_clock(datestr: str) -> datetime.datetime:
return datetime.datetime(year, month, day, hour, minute, second)
-class Device(serial.SerialDevice, driver.GlucometerDriver):
+class Device(serial.SerialDevice, driver.GlucometerDevice):
BAUDRATE = 19200
DEFAULT_CABLE_ID = "1a61:3420"
diff --git a/glucometerutils/drivers/otultra2.py b/glucometerutils/drivers/otultra2.py
index 9b74da8..56138b9 100644
--- a/glucometerutils/drivers/otultra2.py
+++ b/glucometerutils/drivers/otultra2.py
@@ -130,7 +130,7 @@ def _parse_datetime(response: str) -> datetime.datetime:
return datetime.datetime(2000 + year, month, day, hour, minute, second)
-class Device(serial.SerialDevice, driver.GlucometerDriver):
+class Device(serial.SerialDevice, driver.GlucometerDevice):
BAUDRATE = 9600
DEFAULT_CABLE_ID = "067b:2303" # Generic PL2303 cable.
diff --git a/glucometerutils/drivers/otultraeasy.py b/glucometerutils/drivers/otultraeasy.py
index 00f00b6..98de4fb 100644
--- a/glucometerutils/drivers/otultraeasy.py
+++ b/glucometerutils/drivers/otultraeasy.py
@@ -117,7 +117,7 @@ def _make_packet(
)
-class Device(serial.SerialDevice, driver.GlucometerDriver):
+class Device(serial.SerialDevice, driver.GlucometerDevice):
BAUDRATE = 9600
DEFAULT_CABLE_ID = "067b:2303" # Generic PL2303 cable.
TIMEOUT = 0.5
diff --git a/glucometerutils/drivers/otverio2015.py b/glucometerutils/drivers/otverio2015.py
index 44d03b1..facd31c 100644
--- a/glucometerutils/drivers/otverio2015.py
+++ b/glucometerutils/drivers/otverio2015.py
@@ -107,7 +107,7 @@ _READ_RECORD_RESPONSE = construct.Struct(
)
-class Device(driver.GlucometerDriver):
+class Device(driver.GlucometerDevice):
def __init__(self, device: Optional[str]) -> None:
if not device:
raise exceptions.CommandLineError(
diff --git a/glucometerutils/drivers/otverioiq.py b/glucometerutils/drivers/otverioiq.py
index f7b87dc..aff6b4a 100644
--- a/glucometerutils/drivers/otverioiq.py
+++ b/glucometerutils/drivers/otverioiq.py
@@ -94,7 +94,7 @@ _READING_RESPONSE = construct.Struct(
)
-class Device(serial.SerialDevice, driver.GlucometerDriver):
+class Device(serial.SerialDevice, driver.GlucometerDevice):
BAUDRATE = 38400
DEFAULT_CABLE_ID = "10c4:85a7" # Specific ID for embedded cp210x
TIMEOUT = 0.5
diff --git a/glucometerutils/drivers/sdcodefree.py b/glucometerutils/drivers/sdcodefree.py
index 35ff8c7..2bb0dd8 100644
--- a/glucometerutils/drivers/sdcodefree.py
+++ b/glucometerutils/drivers/sdcodefree.py
@@ -84,7 +84,7 @@ _READING = construct.Struct(
)
-class Device(serial.SerialDevice, driver.GlucometerDriver):
+class Device(serial.SerialDevice, driver.GlucometerDevice):
BAUDRATE = 38400
DEFAULT_CABLE_ID = "10c4:ea60" # Generic cable.
TIMEOUT = 300 # We need to wait for data from the device.
diff --git a/glucometerutils/drivers/td4277.py b/glucometerutils/drivers/td4277.py
index 7ee177d..717e4ab 100644
--- a/glucometerutils/drivers/td4277.py
+++ b/glucometerutils/drivers/td4277.py
@@ -132,7 +132,7 @@ def _select_record(record_id: int) -> bytes:
return _READING_SELECTION_STRUCT.build({"record_id": record_id})
-class Device(serial.SerialDevice, driver.GlucometerDriver):
+class Device(serial.SerialDevice, driver.GlucometerDevice):
BAUDRATE = 19200
TIMEOUT = 0.5
diff --git a/glucometerutils/support/contourusb.py b/glucometerutils/support/contourusb.py
index e27347e..cf78d69 100644
--- a/glucometerutils/support/contourusb.py
+++ b/glucometerutils/support/contourusb.py
@@ -71,7 +71,7 @@ class Mode(enum.Enum):
COMMAND = enum.auto()
-class ContourHidDevice(driver.GlucometerDriver):
+class ContourHidDevice(driver.GlucometerDevice):
"""Base class implementing the ContourUSB HID common protocol.
"""
diff --git a/glucometerutils/support/freestyle.py b/glucometerutils/support/freestyle.py
index 9cdbff9..40482b0 100644
--- a/glucometerutils/support/freestyle.py
+++ b/glucometerutils/support/freestyle.py
@@ -286,7 +286,7 @@ class FreeStyleHidSession:
return csv.reader(records_str.split("\r\n"))
-class FreeStyleHidDevice(driver.GlucometerDriver):
+class FreeStyleHidDevice(driver.GlucometerDevice):
"""Base class implementing the FreeStyle HID common protocol.
This class implements opening, initializing the connection and sending