Skip to content

Commit

Permalink
All drivers: move documentation of features from README to docstring.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Flameeyes committed Apr 17, 2017
1 parent 5ef9873 commit 46804ae
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 44 deletions.
50 changes: 13 additions & 37 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions glucometerutils/drivers/accuchek_reports.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
7 changes: 7 additions & 0 deletions glucometerutils/drivers/fsinsulinx.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
14 changes: 13 additions & 1 deletion glucometerutils/drivers/fslibre.py
Original file line number Diff line number Diff line change
@@ -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__ = '[email protected]'
Expand Down
8 changes: 8 additions & 0 deletions glucometerutils/drivers/fsoptium.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
18 changes: 17 additions & 1 deletion glucometerutils/drivers/fsprecisionneo.py
Original file line number Diff line number Diff line change
@@ -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__ = '[email protected]'
Expand Down
12 changes: 11 additions & 1 deletion glucometerutils/drivers/otultra2.py
Original file line number Diff line number Diff line change
@@ -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__ = '[email protected]'
Expand Down
14 changes: 13 additions & 1 deletion glucometerutils/drivers/otultraeasy.py
Original file line number Diff line number Diff line change
@@ -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__ = '[email protected]'
Expand Down
13 changes: 13 additions & 0 deletions glucometerutils/drivers/otverio2015.py
Original file line number Diff line number Diff line change
@@ -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ò'
Expand Down

0 comments on commit 46804ae

Please sign in to comment.