From 0983065c0e2a6b9e2055fc62220b1999da90de1e Mon Sep 17 00:00:00 2001 From: Ben West Date: Wed, 19 Jun 2013 10:43:17 -0700 Subject: [PATCH] more docs --- decocare/stick.py | 12 +++++-- doc/api/decocare.rst | 83 ++++++++++++++++++++++++++++++++++++++++++++ doc/api/modules.rst | 7 ++++ doc/api/stick.rst | 33 ++++++++++++++++++ doc/index.rst | 21 +++++++++-- 5 files changed, 150 insertions(+), 6 deletions(-) create mode 100644 doc/api/decocare.rst create mode 100644 doc/api/modules.rst create mode 100644 doc/api/stick.rst diff --git a/decocare/stick.py b/decocare/stick.py index 5cf1cf8..0cf3a1c 100644 --- a/decocare/stick.py +++ b/decocare/stick.py @@ -35,7 +35,7 @@ class StickCommand(object): binary interface. """ code = [ 0x00 ] - label = __doc__ + label = 'example stick command' delay = .001 size = 64 @@ -71,8 +71,13 @@ def respond(self, raw): class ProductInfo(StickCommand): - """Get product info from the usb device. Useful for identifying - what kind of usb stick you've got; there are a few different kinds.""" + """Get product info from the usb device. + + Useful for identifying + what kind of usb stick you've got; there are a few different kinds. + Eg, European vs US regulatory domains require different frequencies for compliance. + + """ code = [ 4 ] SW_VER = 16 label = 'usb.productInfo' @@ -414,6 +419,7 @@ class Stick(object): to recover from, eg CRC, errors that can occur. The "shape" and timing of these loops seem to mostly get the job done. + """ link = None def __init__(self, link): diff --git a/doc/api/decocare.rst b/doc/api/decocare.rst new file mode 100644 index 0000000..16add8a --- /dev/null +++ b/doc/api/decocare.rst @@ -0,0 +1,83 @@ +decocare Package +================ + +:mod:`decocare` Package +----------------------- + +.. automodule:: decocare.__init__ + :members: + :undoc-members: + :show-inheritance: + +:mod:`commands` Module +---------------------- + +.. automodule:: decocare.commands + :members: + :undoc-members: + :show-inheritance: + +:mod:`download` Module +---------------------- + +.. automodule:: decocare.download + :members: + :undoc-members: + :show-inheritance: + +:mod:`errors` Module +-------------------- + +.. automodule:: decocare.errors + :members: + :undoc-members: + :show-inheritance: + +:mod:`history` Module +--------------------- + +.. automodule:: decocare.history + :members: + :undoc-members: + :show-inheritance: + +:mod:`lib` Module +----------------- + +.. automodule:: decocare.lib + :members: + :undoc-members: + :show-inheritance: + +:mod:`link` Module +------------------ + +.. automodule:: decocare.link + :members: + :undoc-members: + :show-inheritance: + +:mod:`session` Module +--------------------- + +.. automodule:: decocare.session + :members: + :undoc-members: + :show-inheritance: + +:mod:`stick` Module +------------------- + +.. automodule:: decocare.stick + :members: + :undoc-members: + :show-inheritance: + +:mod:`tests` Module +------------------- + +.. automodule:: decocare.tests + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/api/modules.rst b/doc/api/modules.rst new file mode 100644 index 0000000..df11553 --- /dev/null +++ b/doc/api/modules.rst @@ -0,0 +1,7 @@ +decocare +======== + +.. toctree:: + :maxdepth: 4 + + decocare diff --git a/doc/api/stick.rst b/doc/api/stick.rst new file mode 100644 index 0000000..99a9529 --- /dev/null +++ b/doc/api/stick.rst @@ -0,0 +1,33 @@ +decocare +======== + + +:mod:`stick` Module +------------------- + +.. automodule:: decocare.stick + :members: + :undoc-members: + :show-inheritance: + +The carelink usb stick acts like a modem. +It responds to modem commands, in order to exchange data with a remote +end-point. In this case, our little carelink usb modem responds to a +variety of binary commands, which you must use in a co-ordinated flow +to exchange data with the remote equipment. Also, in our case, the +only remote equipment the carelink usb stick is known to talk to are +the Me**ronic Par**igm series pumps. + +The purpose of this module is to encapsulate the low level operations +needed to use the stick in any practical sense. It serves as a +set of guides and tutorials which should help people trying to +understand or their therapy better. This module seems mostly correct, +but things start to fall apart when downloading lots of data. The +protocol is either sensitive to some timing somewhere that I'm +unaware of, or when CRC errors or other things happen, I simply do the +wrong thing to recover. + +Please ask Medtronic for more information on how to learn what your +device is doing. + + diff --git a/doc/index.rst b/doc/index.rst index 349c994..20f065b 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -11,13 +11,28 @@ Contents: .. toctree:: :maxdepth: 2 - api + api/stick + api/modules Decoding-carelink implements a python module named -decocare -. +decocare. +* :ref:`api/modules` + +:mod:`decocare` Package +----------------------- + +.. automodule:: decocare.__init__ + :members: + :undoc-members: + +.. note:: + + This information was gleaned through extensive testing and analysis + of the behavior of actual devices, not from documentation. Please + call and ask your vendor for the technical information needed to + properly maintain these projects. Indices and tables ==================