Skip to content

Commit

Permalink
more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bewest committed Jun 19, 2013
1 parent b486bd8 commit 0983065
Show file tree
Hide file tree
Showing 5 changed files with 150 additions and 6 deletions.
12 changes: 9 additions & 3 deletions decocare/stick.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class StickCommand(object):
binary interface.
"""
code = [ 0x00 ]
label = __doc__
label = 'example stick command'
delay = .001
size = 64

Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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):
Expand Down
83 changes: 83 additions & 0 deletions doc/api/decocare.rst
Original file line number Diff line number Diff line change
@@ -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:

7 changes: 7 additions & 0 deletions doc/api/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
decocare
========

.. toctree::
:maxdepth: 4

decocare
33 changes: 33 additions & 0 deletions doc/api/stick.rst
Original file line number Diff line number Diff line change
@@ -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.


21 changes: 18 additions & 3 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
==================
Expand Down

0 comments on commit 0983065

Please sign in to comment.