{ "info": { "author": "MURAMATSU Atsushi", "author_email": "amura@tomato.sakura.ne.jp", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Build Tools" ], "description": "=========================================\nDigilent's DWF Library wrapper for python\n=========================================\n\nWhat is this?\n=============\n\nThis is a python library for controlling Analog Discovery and\nElectronics Explorer series presetned by `Digilent inc.`_\nThis library needs Waveforms SDK.\n\nI tested this library with Analog Discovery 2 and\n`Waveforms 2015`_ in below environment.\n\n* python 3.5.1, python 2.7.10 on OSX 10.11\n* python 3.4.3, python 2.7.6 on Ubuntu 14.04LTS\n* python 3.5.1 on Windows 7\n\nI wrote this library for supporting python 2.6, 2.7, 3.3 or above.\n\nThis software is released under the MIT License, see LICENSE.txt.\n\n.. _Digilent inc.: https://digilentinc.com/\n.. _Waveforms 2015: https://reference.digilentinc.com/waveforms3\n\nInstalling\n==========\n\nYou can install the latest stable version from PyPI:\n\n.. code:: bash\n\n pip install dwf\n\nor if you prefer, install it from this repo like this:\n\n.. code:: bash\n\n python setup.py install\n\n\nAPI of this library\n===================\n\nThis library has two sets of API. There are Function-based API and\nClass-based API.\n\nFunction-based API\n~~~~~~~~~~~~~~~~~~\n\nThis API is like as C functions which supplied by Digilent. But\nsome modifications are applied for pythonic-way programming.\n\n1. When error is returned by SDK, the exception ``DWFError`` is\n raised.\n2. All output values, which are passed by reference, are changed\n to return-value of function.\n3. Arrays of parameters are converted from/to python's list.\n\nExamples\n^^^^^^^^\n\nSDK version check in C language is like as:\n\n.. code:: c\n\n char version[32];\n FDwfGetVersion(version);\n printf(\"DWF version: %s\\n\", version);\n\nWith this library using function-based API, same code is\ntranslated to:\n \n.. code:: python\n\n version = dwf.FDwfGetVersion()\n print(\"DWF version: \" + version)\n\n.. _example code:\n\nAnother example is here. This piece of code is quoted from\n``analogout_custom.c`` in Waveforms SDK sample.\n\n.. code:: c\n\n HDWF hdwf;\n double rgdSamples[4096];\n for (int i = 0; i < 4096; i++) rgdSamples[i] = 2.0*i/4095-1;\n \n FDwfDeviceOpen(-1, &hdwf);\n FDwfAnalogOutNodeSet(hdwf, 0, AnalogOutNodeCarrier, true);\n FDwfAnalogOutNodeFunctionSet(hdwf, 0, AnalogOutNodeCarrier, funcCustom);\n FDwfAnalogOutNodeDataSet(hdwf, 0, AnalogOutNodeCarrier, rgdSamples, 4096);\n ...\n\nIn python with this library, like as:\n \n.. code:: python\n \n rgdSamples = []\n for i in range(4096): rgdSamples.append(2.0*i/4095-1)\n \n hdwf = dwf.FDwfDeviceOpen()\n dwf.FDwfAnalogOutNodeSet(hdwf, 0, dwf.AnalogOutNodeCarrier, True)\n dwf.FDwfAnalogOutNodeFunctionSet(hdwf, 0, dwf.AnalogOutNodeCarrier, dwf.funcCustom)\n dwf.FDwfAnalogOutNodeDataSet(hdwf, 0, dwf.AnalogOutNodeCarrier, rgdSamples)\n ...\n\n\nClass-based API\n~~~~~~~~~~~~~~~\n\nClass-based APIs are made from function-based APIs. Documents of\nthis API is now writing.\n\nThis API has below function and classes.\n\n``DwfEnumeration()``\n Device enumeration. This function returns list of ``DwfDevice``.\n``class DwfDevice``\n call ``FDwfEnum*()`` functions.\n``class Dwf``\n call ``FDwfDevice*()`` functions.\n``class DwfAnalogIn``\n call ``FDwfAnalogIn*()`` functions.\n``class DwfAnalogOut``\n call ``FDwfAnalogOut*()`` functions.\n``class DwfAnalogIO``\n call ``FDwfAnalogIO*()`` functions.\n``class DwfDigitalIO``\n call ``FDwfDigitalIO*()`` functions.\n``class DwfDigitalIn``\n call ``FDwfDigitalIn*()`` functions.\n``class DwfDigitalOut``\n call ``FDwfDigitalOut*()`` functions.\n\nWith this API, `example code`_ is translated to\n\n.. code:: python\n \n rgdSamples = []\n for i in range(4096): rgdSamples.append(2.0*i/4095-1)\n \n dwf_ao = dwf.DwfAnalogOut()\n dwf_ao.nodeSet(0, dwf_ao.NODE.CARRIER, True)\n dwf_ao.nodeFunctionSet(0, dwf_ao.NODE.CARRIER, dwf_ao.FUNC.CUSTOM)\n dwf_ao.nodeDataSet(0, dwf_ao.NODE.CARRIER, rgdSamples)\n ...", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/amuramatsu/dwf/", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "dwf", "package_url": "https://pypi.org/project/dwf/", "platform": "Linux,Mac,Windows", "project_url": "https://pypi.org/project/dwf/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/amuramatsu/dwf/" }, "release_url": "https://pypi.org/project/dwf/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Digilent's DWF library wrapper", "version": "0.1.0" }, "last_serial": 3008348, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "65725e1b7b51ec279e7f42cec354b945", "sha256": "cd0b5a26f17d0e32f7b390975b15b63dd7606410f1a335314444cdf98eeb5114" }, "downloads": -1, "filename": "dwf-0.1.0.tar.gz", "has_sig": false, "md5_digest": "65725e1b7b51ec279e7f42cec354b945", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26070, "upload_time": "2017-07-05T13:06:07", "url": "https://files.pythonhosted.org/packages/29/e1/4b44033f2c69853d10292c27b9b5e038f50ba04f7ae2907978a90d0f80df/dwf-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "65725e1b7b51ec279e7f42cec354b945", "sha256": "cd0b5a26f17d0e32f7b390975b15b63dd7606410f1a335314444cdf98eeb5114" }, "downloads": -1, "filename": "dwf-0.1.0.tar.gz", "has_sig": false, "md5_digest": "65725e1b7b51ec279e7f42cec354b945", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26070, "upload_time": "2017-07-05T13:06:07", "url": "https://files.pythonhosted.org/packages/29/e1/4b44033f2c69853d10292c27b9b5e038f50ba04f7ae2907978a90d0f80df/dwf-0.1.0.tar.gz" } ] }