RP1210


NameRP1210 JSON
Version 0.0.24 PyPI version JSON
download
home_pagehttps://github.com/dfieschko/RP1210
SummaryA Python32 implementation of the RP1210C standard.
upload_time2023-02-01 15:38:39
maintainer
docs_urlNone
authorDarius Fieschko
requires_python>=3.9
licenseMIT
keywords rp1210 rp1210c j1939 can uds
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # RP1210 for Python

```
pip install rp1210
```
A Python module for interacting with RP1210 adapter drivers, following the RP1210C standard.
Contributions welcome!

Some documentation and examples are available in [this repo's wiki](https://github.com/dfieschko/RP1210/wiki) and the Examples folder.

This module was written and tested with Python 3.9 and 3.10, 32-bit. Older (and newer) Python versions have not been tested and may not be supported.   
32-bit Python is required because RP1210 drivers are all 32-bit,
and can thus only be loaded with 32-bit Python. A 64-bit implementation via
[MSL-LoadLib](https://github.com/MSLNZ/msl-loadlib) is possible and may be released as a separate
module sometime in the future.

**This module is currently in alpha, and changes to core functionality may happen.** Once it hits beta,
I will start taking care not to break people's code. Until then, expect changes. You can keep track of planned changes in the [Issues](https://github.com/dfieschko/RP1210/issues) page.

Not all aspects of the RP1210C standard are fully implemented as independent features. Currently, my focus is on J1939 communication.
Other protocols have significantly less support, but you can still access all the low-level commands via the `RP1210API` class.

While I try to provide adequate documentation, the RP1210C standard is owned by TMC, not me, and is
not reproduced here. For a complete understanding of the RP1210 standard, you must purchase and
read the official RP1210C documentation from TMC.

Official RP1210C documentation can be purchased from TMC at this link ($37.50 at time of writing):
    https://www.atabusinesssolutions.com/Shopping/Product/viewproduct/2675472/TMC-Individual-RP

### Getting Started
```python
from RP1210 import RP1210Client, translateErrorCode

# init client
client = RP1210Client()

# select vendor and device
client.setVendor("NULN2R32") # Nexiq USB-Link 2 in this case
client.setDevice(1) # wired USB-Link 2

# connect to adapter w/ specified protocol
clientID = client.connect(b'J1939:Baud=Auto') # will return clientID or error code
error_msg = translateErrorCode(clientID)
if error_msg != "NO_ERRORS": # failed to connect
   print("Connection failed:", error_msg)

# read all messages (no filter)
client.setAllFiltersToPass()

# send a message
msg = b'message contents'
err_code = client.tx(msg)
print("Tx Result:", translateErrorCode(err_code))

# read messages
while True:
   msg = client.rx()
   if msg: # message was received
      print(msg)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dfieschko/RP1210",
    "name": "RP1210",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "RP1210,RP1210C,J1939,CAN,UDS",
    "author": "Darius Fieschko",
    "author_email": "dfieschko@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/dc/6d/fd8e5ba07cbb7297590df3112c459f61e0920fb85d9b668d1a45cf501dad/RP1210-0.0.24.tar.gz",
    "platform": null,
    "description": "# RP1210 for Python\n\n```\npip install rp1210\n```\nA Python module for interacting with RP1210 adapter drivers, following the RP1210C standard.\nContributions welcome!\n\nSome documentation and examples are available in [this repo's wiki](https://github.com/dfieschko/RP1210/wiki) and the Examples folder.\n\nThis module was written and tested with Python 3.9 and 3.10, 32-bit. Older (and newer) Python versions have not been tested and may not be supported.   \n32-bit Python is required because RP1210 drivers are all 32-bit,\nand can thus only be loaded with 32-bit Python. A 64-bit implementation via\n[MSL-LoadLib](https://github.com/MSLNZ/msl-loadlib) is possible and may be released as a separate\nmodule sometime in the future.\n\n**This module is currently in alpha, and changes to core functionality may happen.** Once it hits beta,\nI will start taking care not to break people's code. Until then, expect changes. You can keep track of planned changes in the [Issues](https://github.com/dfieschko/RP1210/issues) page.\n\nNot all aspects of the RP1210C standard are fully implemented as independent features. Currently, my focus is on J1939 communication.\nOther protocols have significantly less support, but you can still access all the low-level commands via the `RP1210API` class.\n\nWhile I try to provide adequate documentation, the RP1210C standard is owned by TMC, not me, and is\nnot reproduced here. For a complete understanding of the RP1210 standard, you must purchase and\nread the official RP1210C documentation from TMC.\n\nOfficial RP1210C documentation can be purchased from TMC at this link ($37.50 at time of writing):\n    https://www.atabusinesssolutions.com/Shopping/Product/viewproduct/2675472/TMC-Individual-RP\n\n### Getting Started\n```python\nfrom RP1210 import RP1210Client, translateErrorCode\n\n# init client\nclient = RP1210Client()\n\n# select vendor and device\nclient.setVendor(\"NULN2R32\") # Nexiq USB-Link 2 in this case\nclient.setDevice(1) # wired USB-Link 2\n\n# connect to adapter w/ specified protocol\nclientID = client.connect(b'J1939:Baud=Auto') # will return clientID or error code\nerror_msg = translateErrorCode(clientID)\nif error_msg != \"NO_ERRORS\": # failed to connect\n   print(\"Connection failed:\", error_msg)\n\n# read all messages (no filter)\nclient.setAllFiltersToPass()\n\n# send a message\nmsg = b'message contents'\nerr_code = client.tx(msg)\nprint(\"Tx Result:\", translateErrorCode(err_code))\n\n# read messages\nwhile True:\n   msg = client.rx()\n   if msg: # message was received\n      print(msg)\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python32 implementation of the RP1210C standard.",
    "version": "0.0.24",
    "split_keywords": [
        "rp1210",
        "rp1210c",
        "j1939",
        "can",
        "uds"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e3bf2d35e112f0fb3272259c7e633ab73c0fa3a866512d4fcd7fcf304e8619b7",
                "md5": "392f59150d93b36522d1ffb730683185",
                "sha256": "3b8c48cc9d667da5c6afc1092758c439948093fb1e9faf3b3f12cb2dff8aaa1b"
            },
            "downloads": -1,
            "filename": "RP1210-0.0.24-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "392f59150d93b36522d1ffb730683185",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 54948,
            "upload_time": "2023-02-01T15:38:37",
            "upload_time_iso_8601": "2023-02-01T15:38:37.346282Z",
            "url": "https://files.pythonhosted.org/packages/e3/bf/2d35e112f0fb3272259c7e633ab73c0fa3a866512d4fcd7fcf304e8619b7/RP1210-0.0.24-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dc6dfd8e5ba07cbb7297590df3112c459f61e0920fb85d9b668d1a45cf501dad",
                "md5": "7fe30dce25404d55f2a20321465caec7",
                "sha256": "39112f1f3106072fdb4e44e14d08e5202cf8f9e0d51901a3ccc3ccf614d644a7"
            },
            "downloads": -1,
            "filename": "RP1210-0.0.24.tar.gz",
            "has_sig": false,
            "md5_digest": "7fe30dce25404d55f2a20321465caec7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 43133,
            "upload_time": "2023-02-01T15:38:39",
            "upload_time_iso_8601": "2023-02-01T15:38:39.542532Z",
            "url": "https://files.pythonhosted.org/packages/dc/6d/fd8e5ba07cbb7297590df3112c459f61e0920fb85d9b668d1a45cf501dad/RP1210-0.0.24.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-01 15:38:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "dfieschko",
    "github_project": "RP1210",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "rp1210"
}
        
Elapsed time: 0.03369s