canlib


Namecanlib JSON
Version 1.26.487 PyPI version JSON
download
home_pagehttps://github.com/Kvaser/pycanlib
SummaryPython wrapper for Kvaser CANlib
upload_time2024-05-29 10:53:55
maintainerNone
docs_urlNone
authorKvaser AB
requires_pythonNone
licenseMIT
keywords development
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            canlib - a Python wrapper for Kvaser CANlib



Supported Libraries and Installation
====================================

The Python canlib module wraps the Kvaser CANlib API in order to make it easy to control most aspects of any Kvaser CAN interface. For more information about Kvaser please go to https://www.kvaser.com/.

The latest version of this package is available on the `Kvaser Download page <https://www.kvaser.com/downloads-kvaser/>`_ (`pycanlib.zip <https://www.kvaser.com/downloads-kvaser/?utm_source=software&utm_ean=7330130981911&utm_status=latest>`_).

Supported platforms
-------------------
Windows and Linux using Python v3.6+ (both 32 and 64 bit).


Supported libraries
-------------------
The following libraries are currently supported:

=============  ====================  ===================  =====================
 Library        Module                Windows              Linux
=============  ====================  ===================  =====================
CANlib         canlib.canlib         canlib32.dll         libcanlib.so
kvaMemoLibXML  canlib.kvamemolibxml  kvaMemoLibXML.dll    libkvamemolibxml.so
kvrlib         canlib.kvrlib         kvrlib.dll,          not supported
                                     irisdll.dll,
                                     irisflash.dll,
                                     libxml2.dll
kvmlib         canlib.kvmlib         kvaMemoLib0600.dll,  not supported, [2]_
                                     kvaMemoLib0700.dll,  libkvamemolib0700.so,
                                     kvaMemoLib.dll,      libkvamemolib.so,
                                     kvmlib.dll           libkvmlib.so
kvlclib        canlib.kvlclib        kvlclib.dll [1]_     libkvlclib.so
kvaDbLib       canlib.kvadblib       kvaDbLib.dll         libkvadblib.so
LINlib         canlib.linlib         linlib.dll           liblinlib.so
=============  ====================  ===================  =====================

.. [1] The kvlclib.dll depends on dll files from matlab wich are installed alongside kvlclib.dll.
.. [2] The kvaMemoLib0600.dll, which supports older devices, is not supported under Linux.

Installation
------------
Install the Python package from `PyPI <https://pypi.org/project/canlib/>`_ using e.g. ``pip``:

.. code-block:: shell

    $ pip install canlib

If you have downloaded the package zip file from the `Kvaser Download page <https://www.kvaser.com/downloads-kvaser/>`_, first unzip ``pycanlib.zip``. Then navigate to the unzipped pycanlib using the command line. It should contain the file ``canlib-x.y.z-py2.py3-none-any.whl``, where x,y,z are version numbers.
Run the following command:

.. code-block:: shell

    $ pip install canlib-x.y.z-py2.py3-none-any.whl

The Kvaser CANlib DLLs or shared libraries also need to be installed:

Windows
^^^^^^^
On **Windows**, first install the ``canlib32.dll`` by downloading and installing "Kvaser Drivers for Windows" which can be found on the `Kvaser Download page <https://www.kvaser.com/downloads-kvaser/>`_ (`kvaser_drivers_setup.exe <https://www.kvaser.com/downloads-kvaser/?utm_source=software&utm_ean=7330130980013&utm_status=latest>`_) This will also install ``kvrlib.dll``, ``irisdll.dll``, ``irisflash.dll`` and ``libxml2.dll`` used by kvrlib.

The "Kvaser CANlib SDK" also needs to be downloaded from the same place (`canlib.exe <https://www.kvaser.com/downloads-kvaser/?utm_source=software&utm_ean=7330130980150&utm_status=latest>`_) and installed if more than just CANlib will be used. This will install the rest of the supported library dll's.

The two packages, "Kvaser Drivers for Windows" and "Kvaser CANlib SDK", contains both 32 and 64 bit versions of the included dll's.


Linux
^^^^^
On **Linux**, first install the ``libcanlib.so`` by downloading and installing "Kvaser LINUX Driver and SDK" which can be found on the `Kvaser Download page <https://www.kvaser.com/downloads-kvaser/>`_ (`linuxcan.tar.gz <https://www.kvaser.com/downloads-kvaser/?utm_source=software&utm_ean=7330130980754&utm_status=latest>`_).


If more than just CANlib will be used, the rest of the supported libraries will be available by downloading and installing "Linux SDK library" (`kvlibsdk.tar.gz <https://www.kvaser.com/downloads-kvaser/?utm_source=software&utm_ean=7330130981966&utm_status=latest>`_).


Usage
-----

Example of using canlib to list some information about connected Kvaser devices:

.. code-block:: Python

        from canlib import canlib

        num_channels = canlib.getNumberOfChannels()
        print(f"Found {num_channels} channels")
        for ch in range(num_channels):
            chd = canlib.ChannelData(ch)
            print(f"{ch}. {chd.channel_name} ({chd.card_upc_no} / {chd.card_serial_no})")


Which may result in:

.. code-block:: shell

        Found 4 channels
        0. Kvaser Memorator Pro 2xHS v2 (channel 0) (73-30130-00819-9 / 12330)
        1. Kvaser Memorator Pro 2xHS v2 (channel 1) (73-30130-00819-9 / 12330)
        2. Kvaser Virtual CAN Driver (channel 0) (00-00000-00000-0 / 0)
        3. Kvaser Virtual CAN Driver (channel 1) (00-00000-00000-0 / 0)

..
   .. code-block:: Python

           >>> from canlib import canlib
           >>> canlib.getNumberOfChannels()
           4
           >>> for ch in range(canlib.getNumberOfChannels()):
           ...     chd = canlib.ChannelData(ch)
           ...     print(f"{ch}. {chd.channel_name} ({chd.card_upc_no} / {chd.card_serial_no})")
           0. Kvaser Memorator Pro 2xHS v2 (channel 0) (73-30130-00819-9 / 12330)
           1. Kvaser Memorator Pro 2xHS v2 (channel 1) (73-30130-00819-9 / 12330)
           2. Kvaser Virtual CAN Driver (channel 0) (00-00000-00000-0 / 0)
           3. Kvaser Virtual CAN Driver (channel 1) (00-00000-00000-0 / 0)


Support
-------

You are invited to visit the Kvaser web pages at https://www.kvaser.com/support/. If you don't find what you are looking for, you can obtain support on a time-available basis by sending an e-mail to support@kvaser.com.

Bug reports, contributions, suggestions for improvements, and similar things are much appreciated and can be sent by e-mail to support@kvaser.com.


What's new
----------
A complete set of release notes are available in the package documentation included in the zip file available at the `Kvaser Download page <https://www.kvaser.com/downloads-kvaser/>`_.


Links
-----

  * Kvaser CANlib SDK Page: https://www.kvaser.com/developer/canlib-sdk/
  * Description of CANlib SDK library contents: https://www.kvaser.com/developer-blog/get-hardware-kvaser-sdk-libraries/


License
-------
This project is licensed under the terms of the MIT license.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Kvaser/pycanlib",
    "name": "canlib",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "development",
    "author": "Kvaser AB",
    "author_email": "support@kvaser.com",
    "download_url": "https://files.pythonhosted.org/packages/4d/1f/174b0e9252496a6dc97617de19cc2e5fecbb7a8218d6284c1520f3da0e36/canlib-1.26.487.tar.gz",
    "platform": null,
    "description": "canlib - a Python wrapper for Kvaser CANlib\r\n\r\n\r\n\r\nSupported Libraries and Installation\r\n====================================\r\n\r\nThe Python canlib module wraps the Kvaser CANlib API in order to make it easy to control most aspects of any Kvaser CAN interface. For more information about Kvaser please go to https://www.kvaser.com/.\r\n\r\nThe latest version of this package is available on the `Kvaser Download page <https://www.kvaser.com/downloads-kvaser/>`_ (`pycanlib.zip <https://www.kvaser.com/downloads-kvaser/?utm_source=software&utm_ean=7330130981911&utm_status=latest>`_).\r\n\r\nSupported platforms\r\n-------------------\r\nWindows and Linux using Python v3.6+ (both 32 and 64 bit).\r\n\r\n\r\nSupported libraries\r\n-------------------\r\nThe following libraries are currently supported:\r\n\r\n=============  ====================  ===================  =====================\r\n Library        Module                Windows              Linux\r\n=============  ====================  ===================  =====================\r\nCANlib         canlib.canlib         canlib32.dll         libcanlib.so\r\nkvaMemoLibXML  canlib.kvamemolibxml  kvaMemoLibXML.dll    libkvamemolibxml.so\r\nkvrlib         canlib.kvrlib         kvrlib.dll,          not supported\r\n                                     irisdll.dll,\r\n                                     irisflash.dll,\r\n                                     libxml2.dll\r\nkvmlib         canlib.kvmlib         kvaMemoLib0600.dll,  not supported, [2]_\r\n                                     kvaMemoLib0700.dll,  libkvamemolib0700.so,\r\n                                     kvaMemoLib.dll,      libkvamemolib.so,\r\n                                     kvmlib.dll           libkvmlib.so\r\nkvlclib        canlib.kvlclib        kvlclib.dll [1]_     libkvlclib.so\r\nkvaDbLib       canlib.kvadblib       kvaDbLib.dll         libkvadblib.so\r\nLINlib         canlib.linlib         linlib.dll           liblinlib.so\r\n=============  ====================  ===================  =====================\r\n\r\n.. [1] The kvlclib.dll depends on dll files from matlab wich are installed alongside kvlclib.dll.\r\n.. [2] The kvaMemoLib0600.dll, which supports older devices, is not supported under Linux.\r\n\r\nInstallation\r\n------------\r\nInstall the Python package from `PyPI <https://pypi.org/project/canlib/>`_ using e.g. ``pip``:\r\n\r\n.. code-block:: shell\r\n\r\n    $ pip install canlib\r\n\r\nIf you have downloaded the package zip file from the `Kvaser Download page <https://www.kvaser.com/downloads-kvaser/>`_, first unzip ``pycanlib.zip``. Then navigate to the unzipped pycanlib using the command line. It should contain the file ``canlib-x.y.z-py2.py3-none-any.whl``, where x,y,z are version numbers.\r\nRun the following command:\r\n\r\n.. code-block:: shell\r\n\r\n    $ pip install canlib-x.y.z-py2.py3-none-any.whl\r\n\r\nThe Kvaser CANlib DLLs or shared libraries also need to be installed:\r\n\r\nWindows\r\n^^^^^^^\r\nOn **Windows**, first install the ``canlib32.dll`` by downloading and installing \"Kvaser Drivers for Windows\" which can be found on the `Kvaser Download page <https://www.kvaser.com/downloads-kvaser/>`_ (`kvaser_drivers_setup.exe <https://www.kvaser.com/downloads-kvaser/?utm_source=software&utm_ean=7330130980013&utm_status=latest>`_) This will also install ``kvrlib.dll``, ``irisdll.dll``, ``irisflash.dll`` and ``libxml2.dll`` used by kvrlib.\r\n\r\nThe \"Kvaser CANlib SDK\" also needs to be downloaded from the same place (`canlib.exe <https://www.kvaser.com/downloads-kvaser/?utm_source=software&utm_ean=7330130980150&utm_status=latest>`_) and installed if more than just CANlib will be used. This will install the rest of the supported library dll's.\r\n\r\nThe two packages, \"Kvaser Drivers for Windows\" and \"Kvaser CANlib SDK\", contains both 32 and 64 bit versions of the included dll's.\r\n\r\n\r\nLinux\r\n^^^^^\r\nOn **Linux**, first install the ``libcanlib.so`` by downloading and installing \"Kvaser LINUX Driver and SDK\" which can be found on the `Kvaser Download page <https://www.kvaser.com/downloads-kvaser/>`_ (`linuxcan.tar.gz <https://www.kvaser.com/downloads-kvaser/?utm_source=software&utm_ean=7330130980754&utm_status=latest>`_).\r\n\r\n\r\nIf more than just CANlib will be used, the rest of the supported libraries will be available by downloading and installing \"Linux SDK library\" (`kvlibsdk.tar.gz <https://www.kvaser.com/downloads-kvaser/?utm_source=software&utm_ean=7330130981966&utm_status=latest>`_).\r\n\r\n\r\nUsage\r\n-----\r\n\r\nExample of using canlib to list some information about connected Kvaser devices:\r\n\r\n.. code-block:: Python\r\n\r\n        from canlib import canlib\r\n\r\n        num_channels = canlib.getNumberOfChannels()\r\n        print(f\"Found {num_channels} channels\")\r\n        for ch in range(num_channels):\r\n            chd = canlib.ChannelData(ch)\r\n            print(f\"{ch}. {chd.channel_name} ({chd.card_upc_no} / {chd.card_serial_no})\")\r\n\r\n\r\nWhich may result in:\r\n\r\n.. code-block:: shell\r\n\r\n        Found 4 channels\r\n        0. Kvaser Memorator Pro 2xHS v2 (channel 0) (73-30130-00819-9 / 12330)\r\n        1. Kvaser Memorator Pro 2xHS v2 (channel 1) (73-30130-00819-9 / 12330)\r\n        2. Kvaser Virtual CAN Driver (channel 0) (00-00000-00000-0 / 0)\r\n        3. Kvaser Virtual CAN Driver (channel 1) (00-00000-00000-0 / 0)\r\n\r\n..\r\n   .. code-block:: Python\r\n\r\n           >>> from canlib import canlib\r\n           >>> canlib.getNumberOfChannels()\r\n           4\r\n           >>> for ch in range(canlib.getNumberOfChannels()):\r\n           ...     chd = canlib.ChannelData(ch)\r\n           ...     print(f\"{ch}. {chd.channel_name} ({chd.card_upc_no} / {chd.card_serial_no})\")\r\n           0. Kvaser Memorator Pro 2xHS v2 (channel 0) (73-30130-00819-9 / 12330)\r\n           1. Kvaser Memorator Pro 2xHS v2 (channel 1) (73-30130-00819-9 / 12330)\r\n           2. Kvaser Virtual CAN Driver (channel 0) (00-00000-00000-0 / 0)\r\n           3. Kvaser Virtual CAN Driver (channel 1) (00-00000-00000-0 / 0)\r\n\r\n\r\nSupport\r\n-------\r\n\r\nYou are invited to visit the Kvaser web pages at https://www.kvaser.com/support/. If you don't find what you are looking for, you can obtain support on a time-available basis by sending an e-mail to support@kvaser.com.\r\n\r\nBug reports, contributions, suggestions for improvements, and similar things are much appreciated and can be sent by e-mail to support@kvaser.com.\r\n\r\n\r\nWhat's new\r\n----------\r\nA complete set of release notes are available in the package documentation included in the zip file available at the `Kvaser Download page <https://www.kvaser.com/downloads-kvaser/>`_.\r\n\r\n\r\nLinks\r\n-----\r\n\r\n  * Kvaser CANlib SDK Page: https://www.kvaser.com/developer/canlib-sdk/\r\n  * Description of CANlib SDK library contents: https://www.kvaser.com/developer-blog/get-hardware-kvaser-sdk-libraries/\r\n\r\n\r\nLicense\r\n-------\r\nThis project is licensed under the terms of the MIT license.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python wrapper for Kvaser CANlib",
    "version": "1.26.487",
    "project_urls": {
        "Homepage": "https://github.com/Kvaser/pycanlib"
    },
    "split_keywords": [
        "development"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f65efb15ce5c3aae2dccf11e345be7da842b8f97ec48b3de20d6b76a52fdf77e",
                "md5": "28c350779a71853f06bf182b75572fa3",
                "sha256": "574c4224333b621f8fdb5bb5e9ed94d0d40019544064c907944c3ecf55bb3a01"
            },
            "downloads": -1,
            "filename": "canlib-1.26.487-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "28c350779a71853f06bf182b75572fa3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 204778,
            "upload_time": "2024-05-29T10:53:53",
            "upload_time_iso_8601": "2024-05-29T10:53:53.488047Z",
            "url": "https://files.pythonhosted.org/packages/f6/5e/fb15ce5c3aae2dccf11e345be7da842b8f97ec48b3de20d6b76a52fdf77e/canlib-1.26.487-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4d1f174b0e9252496a6dc97617de19cc2e5fecbb7a8218d6284c1520f3da0e36",
                "md5": "895dfdff7d97ca141143136197e92941",
                "sha256": "fd7c2d83b07c519300148e29b850d7938ee27c2b4f163d14384f00877417745d"
            },
            "downloads": -1,
            "filename": "canlib-1.26.487.tar.gz",
            "has_sig": false,
            "md5_digest": "895dfdff7d97ca141143136197e92941",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 176121,
            "upload_time": "2024-05-29T10:53:55",
            "upload_time_iso_8601": "2024-05-29T10:53:55.561677Z",
            "url": "https://files.pythonhosted.org/packages/4d/1f/174b0e9252496a6dc97617de19cc2e5fecbb7a8218d6284c1520f3da0e36/canlib-1.26.487.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-29 10:53:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Kvaser",
    "github_project": "pycanlib",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "canlib"
}
        
Elapsed time: 0.26996s