From 46804ae9f17233cc2055a7f03eaac3c85ca0d52b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Mon, 17 Apr 2017 17:15:10 +0100 Subject: All drivers: move documentation of features from README to docstring. This allows the drivers to keep up to date with what they support and need. Should make Issue #9 easier to solve. Also merge the dependency list with the list of supported devices, so that you don't have to join the two tables in your head. --- README | 50 ++++++++--------------------- glucometerutils/drivers/accuchek_reports.py | 9 ++++-- glucometerutils/drivers/fsinsulinx.py | 7 ++++ glucometerutils/drivers/fslibre.py | 14 +++++++- glucometerutils/drivers/fsoptium.py | 8 +++++ glucometerutils/drivers/fsprecisionneo.py | 18 ++++++++++- glucometerutils/drivers/otultra2.py | 12 ++++++- glucometerutils/drivers/otultraeasy.py | 14 +++++++- glucometerutils/drivers/otverio2015.py | 13 ++++++++ 9 files changed, 101 insertions(+), 44 deletions(-) diff --git a/README b/README index 050dcaa..d5085b7 100644 --- a/README +++ b/README @@ -19,43 +19,19 @@ Please see the following table for the driver for each device that is known and supported; the following table will provide further information on each of the devices. -| Manufacturer | Model Name | Driver | -| --- | --- | --- | -| LifeScan | OneTouch Ultra 2 | `otultra2` | -| LifeScan | OneTouch Ultra Easy | `otultraeasy` | -| LifeScan | OneTouch Ultra Mini | `otultraeasy` | -| LifeScan | OneTouch Verio (USB) | `otverio2015` | -| LifeScan | OneTouch Select Plus | `otverio2015` | -| Abbott | FreeStyle InsuLinx | `fsinsulinx` | -| Abbott | FreeStyle Libre | `fslibre` | -| Abbott | FreeStyle Optium | `fsoptium` | -| Abbott | FreeStyle Precision Neo | `fsprecisionneo` | -| Roche | Accu-Chek Mobile | `accuchek_reports` | -| SD Biosensor | SD CodeFree | `sdcodefree` | - -### Driver features - -| Driver | Information | Time | Record comments | Memory Reset | -| --- | --- | --- | --- | --- | -| `otultra2` | serialno, swver, unit | get and set | yes | yes | -| `otultraeasy` | serialno, swver, unit | get and set | not supported by device | yes | -| `otverio2015` | serialno, swver | get and set | no | yes | -| `fsinsulinx` | serialno, swver | get and set | no | not supported by device | -| `fslibre` | serialno, swver | get and set | yes | not supported by device | -| `fsoptium` | serialno, swver, unit | get and set | not supported by device | not supported by device | -| `fsprecisionneo` | serialno, swver | get and set | not supported by device | not supported by device | -| `accuchek_reports` | serialno, unit | no | yes | not supported by device | -| `sdcodefree` | none | set only | pre-/post-meal notes | not supported by device | - -### Driver dependencies - -| Driver | Dependencies | -| --- | --- | -| `otultra2` | [pyserial] | -| `otultraeasy` | [pyserial] | -| `otverio2015` | [python-scsi] | -| `fsoptium` | [pyserial] | -| `sdcodefree` | [pyserial] | +| Manufacturer | Model Name | Driver | Dependencies | +| --- | --- | --- | --- | +| LifeScan | OneTouch Ultra 2 | `otultra2` | [pyserial] | +| LifeScan | OneTouch Ultra Easy | `otultraeasy` | [pyserial] | +| LifeScan | OneTouch Ultra Mini | `otultraeasy` | [pyserial] | +| LifeScan | OneTouch Verio (USB) | `otverio2015` | [python-scsi] | +| LifeScan | OneTouch Select Plus | `otverio2015` | [python-scsi] | +| Abbott | FreeStyle InsuLinx | `fsinsulinx` | | +| Abbott | FreeStyle Libre | `fslibre` | | +| Abbott | FreeStyle Optium | `fsoptium` | [pyserial] | +| Abbott | FreeStyle Precision Neo | `fsprecisionneo` | | +| Roche | Accu-Chek Mobile | `accuchek_reports` | | +| SD Biosensor | SD CodeFree | `sdcodefree` | [pyserial] | [pyserial]: https://pythonhosted.org/pyserial/ [python-scsi]: https://github.com/rosjat/python-scsi diff --git a/glucometerutils/drivers/accuchek_reports.py b/glucometerutils/drivers/accuchek_reports.py index bf97064..6b69214 100644 --- a/glucometerutils/drivers/accuchek_reports.py +++ b/glucometerutils/drivers/accuchek_reports.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- """Driver for Accu-Chek Mobile devices with reports mode. -This driver expects a mountpoint as the device name, and will read the -data off the CSV file found there. This means it is read-only access, -but has no dependencies at all. +Supported features: + - get readings, including comments; + - use the glucose unit preset on the device by default; + - get serial number. + +Expected device path: /mnt/ACCUCHEK, the mountpoint of the block device. The Accu-Chek Mobile meters should be set to "Reports" mode. diff --git a/glucometerutils/drivers/fsinsulinx.py b/glucometerutils/drivers/fsinsulinx.py index 376c862..f0986ee 100644 --- a/glucometerutils/drivers/fsinsulinx.py +++ b/glucometerutils/drivers/fsinsulinx.py @@ -1,6 +1,13 @@ # -*- coding: utf-8 -*- """Driver for FreeStyle InsuLinx devices. +Supported features: + - get readings; + - get and set date and time; + - get serial number and software version. + +Expected device path: /dev/hidraw9 or similar HID device. + WARNING: currently untested! Based off reverse engineering notes provided by Xavier Claessens. diff --git a/glucometerutils/drivers/fslibre.py b/glucometerutils/drivers/fslibre.py index d24d514..47d2a8b 100644 --- a/glucometerutils/drivers/fslibre.py +++ b/glucometerutils/drivers/fslibre.py @@ -1,5 +1,17 @@ # -*- coding: utf-8 -*- -"""Driver for FreeStyle Libre CGM devices.""" +"""Driver for FreeStyle Libre devices. + +Supported features: + - get readings (sensor, flash and blood glucose), including comments; + - get and set date and time; + - get serial number and software version. + +Expected device path: /dev/hidraw9 or similar HID device. + +Further information on the device protocol can be found at + +https://flameeyes.github.io/glucometer-protocols/abbott/freestyle-libre +""" __author__ = 'Diego Elio Pettenò' __email__ = 'flameeyes@flameeyes.eu' diff --git a/glucometerutils/drivers/fsoptium.py b/glucometerutils/drivers/fsoptium.py index d1b5f24..f298f53 100644 --- a/glucometerutils/drivers/fsoptium.py +++ b/glucometerutils/drivers/fsoptium.py @@ -1,6 +1,14 @@ # -*- coding: utf-8 -*- """Driver for FreeStyle Optium devices. +Supported features: + - get readings (ignores ketone results); + - use the glucose unit preset on the device by default; + - get and set date and time; + - get serial number and software version. + +Expected device path: /dev/ttyUSB0 or similar serial port device. + Further information on the device protocol can be found at https://flameeyes.github.io/glucometer-protocols/abbott/freestyle-optium diff --git a/glucometerutils/drivers/fsprecisionneo.py b/glucometerutils/drivers/fsprecisionneo.py index c748770..b77617c 100644 --- a/glucometerutils/drivers/fsprecisionneo.py +++ b/glucometerutils/drivers/fsprecisionneo.py @@ -1,5 +1,21 @@ # -*- coding: utf-8 -*- -"""Driver for FreeStyle Precision Neo devices.""" +"""Driver for FreeStyle Precision Neo devices. + +This driver may also work with FreeStyle Optium Neo devices, but it is currently +untested. + +Supported features: + - get readings; + - get and set date and time; + - get serial number and software version. + +Expected device path: /dev/hidraw9 or similar HID device. + +Further information on the device protocol can be found at + +https://flameeyes.github.io/glucometer-protocols/abbott/freestyle-precision-neo + +""" __author__ = 'Diego Elio Pettenò' __email__ = 'flameeyes@flameeyes.eu' diff --git a/glucometerutils/drivers/otultra2.py b/glucometerutils/drivers/otultra2.py index 8e33ea5..183638e 100644 --- a/glucometerutils/drivers/otultra2.py +++ b/glucometerutils/drivers/otultra2.py @@ -1,5 +1,15 @@ # -*- coding: utf-8 -*- -"""Driver for LifeScan OneTouch Ultra 2 devices""" +"""Driver for LifeScan OneTouch Ultra 2 devices. + +Supported features: + - get readings, including pre-/post-meal notes and other comments; + - use the glucose unit preset on the device by default; + - get and set date and time; + - get serial number and software version; + - memory reset (caution!) + +Expected device path: /dev/ttyUSB0 or similar serial port device. +""" __author__ = 'Diego Elio Pettenò' __email__ = 'flameeyes@flameeyes.eu' diff --git a/glucometerutils/drivers/otultraeasy.py b/glucometerutils/drivers/otultraeasy.py index 31b719f..01717f9 100644 --- a/glucometerutils/drivers/otultraeasy.py +++ b/glucometerutils/drivers/otultraeasy.py @@ -1,5 +1,17 @@ # -*- coding: utf-8 -*- -"""Driver for LifeScan OneTouch Ultra Easy devices""" +"""Driver for LifeScan OneTouch Ultra Easy devices. + +Also supports OneTouch Ultra Mini devices (different name, same device). + +Supported features: + - get readings; + - use the glucose unit preset on the device by default; + - get and set date and time; + - get serial number and software version; + - memory reset (caution!) + +Expected device path: /dev/ttyUSB0 or similar serial port device. +""" __author__ = 'Diego Elio Pettenò' __email__ = 'flameeyes@flameeyes.eu' diff --git a/glucometerutils/drivers/otverio2015.py b/glucometerutils/drivers/otverio2015.py index 55ffbd2..7a4bac8 100644 --- a/glucometerutils/drivers/otverio2015.py +++ b/glucometerutils/drivers/otverio2015.py @@ -1,9 +1,22 @@ # -*- coding: utf-8 -*- """Driver for LifeScan OneTouch Verio 2015 devices. +For Verio devices with microUSB connector. Also supports OneTouch Select Plus +devices. + +Supported features: + - get readings; + - use the glucose unit preset on the device by default; + - get and set date and time; + - get serial number and software version; + - memory reset (caution!) + +Expected device path: /dev/sdb or similar USB block device. + Further information on the device protocol can be found at https://flameeyes.github.io/glucometer-protocols/lifescan/onetouch-verio-2015 + """ __author__ = 'Diego Elio Pettenò' -- cgit v1.2.3