-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit for python bindings doc
Signed-off-by: Travis F. Collins <[email protected]>
- Loading branch information
Showing
8 changed files
with
178 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Buffer | ||
================== | ||
|
||
Members | ||
-------------- | ||
.. autoclass:: iio.Buffer | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Channels | ||
================== | ||
|
||
Members | ||
-------------- | ||
.. autoclass:: iio.Channel | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# This file only contains a selection of the most common options. For a full | ||
# list see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Path setup -------------------------------------------------------------- | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. If the directory is relative to the | ||
# documentation root, use os.path.abspath to make it absolute, like shown here. | ||
# | ||
import os | ||
import sys | ||
sys.path.insert(0, os.path.abspath('../.')) | ||
|
||
import sphinx_rtd_theme | ||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
project = '@PROJECT_NAME@' | ||
copyright = '2020, Analog Devices, Inc.' | ||
author = 'Paul Cercueil <[email protected]>' | ||
|
||
# The full version, including alpha/beta/rc tags | ||
release = '@LIBIIO_VERSION@' | ||
|
||
|
||
# -- General configuration --------------------------------------------------- | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
extensions = ["sphinx.ext.githubpages", "sphinx_rtd_theme", 'sphinx.ext.viewcode', 'sphinx.ext.autodoc'] | ||
#] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ['_templates'] | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This pattern also affects html_static_path and html_extra_path. | ||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
# | ||
html_theme = "sphinx_rtd_theme" | ||
|
||
# Add any paths that contain custom static files (such as style sheets) here, | ||
# relative to this directory. They are copied after the builtin static files, | ||
# so a file named "default.css" will overwrite the builtin "default.css". | ||
#html_static_path = ['_static'] | ||
|
||
master_doc = 'index' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Contexts | ||
================== | ||
|
||
Members | ||
-------------- | ||
.. autoclass:: iio.Context | ||
:members: | ||
|
||
.. autoclass:: iio.LocalContext | ||
:members: | ||
:inherited-members: | ||
|
||
.. autoclass:: iio.XMLContext | ||
:members: | ||
:inherited-members: | ||
|
||
.. autoclass:: iio.NetworkContext | ||
:members: | ||
:inherited-members: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Device | ||
================== | ||
|
||
Members | ||
-------------- | ||
.. autoclass:: iio.Device | ||
:members: | ||
:inherited-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Examples | ||
================== | ||
|
||
Scan contexts and list channels of each device | ||
|
||
.. code-block:: python | ||
import iio | ||
for ctxname in iio.scan_contexts(): | ||
ctx = iio.Context(ctxname) | ||
for dev in ctx.devices: | ||
if dev.channels: | ||
for chan in dev.channels: | ||
print("{} - {} - {}".format(ctxname, dev.name, chan._id)) | ||
else: | ||
print("{} - {}".format(ctxname, dev.name)) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
libiio Python Bindings | ||
================================== | ||
|
||
Python bindings for the Industrial I/O interface library. | ||
|
||
Installation | ||
================== | ||
|
||
The libiio python bindings can be installed from pip | ||
|
||
.. code-block:: bash | ||
(sudo) pip install libiio | ||
or by grabbing the source directly | ||
|
||
.. code-block:: bash | ||
git clone https://github.com/analogdevicesinc/libiio.git | ||
cd bindings/python | ||
(sudo) python3 setup.py install | ||
.. note:: | ||
|
||
On Linux the libiio python bindings are sometimes installed in locations not on path. On Ubuntu this is a common fix | ||
|
||
.. code-block:: bash | ||
export PYTHONPATH=$PYTHONPATH:/usr/lib/python{python-version}/site-packages | ||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Contents: | ||
|
||
Components | ||
================== | ||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
context | ||
buffer | ||
device | ||
channel | ||
trigger | ||
examples | ||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Trigger | ||
================== | ||
|
||
Members | ||
-------------- | ||
.. autoclass:: iio.Trigger | ||
:members: | ||
:inherited-members: |