Name | pyimclsts JSON |
Version |
0.1.2.1
JSON |
| download |
home_page | |
Summary | Python bindings of the IMC message schema |
upload_time | 2023-05-26 16:07:53 |
maintainer | |
docs_url | None |
author | Choi Wang Dzak |
requires_python | >=3.7 |
license | Copyright (c) 2023 Laboratório de Sistemas e Tecnologia Subaquática Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
imc
imc message protocol
lsts
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
## PyIMCLSTS
This tool reads the IMC schema from a XML file, locally creates files containing the messages and connects (imports) the main global machinery.
See `/example` to check an example implementation of the Follow Reference maneuver.
### Quickstart
- Fancying a virtual env? (Not needed. Just in case you want to isolate it from your python setup)
```shell
$ sudo apt install python3.8-venv
$ python3 -m venv tutorial_env
$ source tutorial_env/bin/activate
```
- To use:
```shell
$ pip3 install pyimclsts
$ # or, if you are cloning the repo, from the folder pyproject.toml is located:
$ pip3 install .
$ # If already installed, update it, with (might need to run it more than once):
$ pip3 install -U pyimclsts
```
- Choose a folder and have a version of the IMC schema. Otherwise, the following command will fetch the latest IMC version from the LSTS git repository. Extract messages locally, with:
```shell
$ python3 -m pyimclsts.extract
```
Check how to provide a black- or whitelist using:
```shell
$ python3 -m pyimclsts.extract --help
```
This is unnecessary in most scenarios, but can be useful if you really have constrained resources. Use it with caution, because it may crash if, for example, you receive an inlined message that has been blacklisted.
This will locally extract the IMC.xml as python classes. You will see a folder called `pyimc_generated` which contains base messages, bitfields and enumerations from the IMC.xml file. They can be locally loaded using, for example:
```python
import pyimc_generated as pg
```
In the top-level module, you will find some functions to allow you to connect to a vehicle and subscribe to messages, namely, a subscriber class.
```python
import pyimclsts.network as n
conn = n.tcp_interface('localhost', 6006)
sub = n.subscriber(conn)
# for example:
sub.subscribe_async(myfunction1, msg_id =pg.messages.Temperature, src='lauv-noptilus-1', src_ent='AHRS')
sub.subscribe_async(myfunction2, msg_id =pg.messages.EstimatedState, src='lauv-noptilus-1', src_ent=None)
```
In most cases, you can find the embedded documentation (docstrings) by hovering the mouse or using `help()` on interactive mode.
Check `/example` for further details.
Raw data
{
"_id": null,
"home_page": "",
"name": "pyimclsts",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "IMC,IMC message protocol,LSTS",
"author": "Choi Wang Dzak",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/fe/cd/279c109cc74d906c3d866b73f780aa6bf4f8c93fc70c8be6a873895e40bd/pyimclsts-0.1.2.1.tar.gz",
"platform": null,
"description": "## PyIMCLSTS\n\nThis tool reads the IMC schema from a XML file, locally creates files containing the messages and connects (imports) the main global machinery.\n\nSee `/example` to check an example implementation of the Follow Reference maneuver.\n\n### Quickstart\n- Fancying a virtual env? (Not needed. Just in case you want to isolate it from your python setup)\n```shell\n$ sudo apt install python3.8-venv\n$ python3 -m venv tutorial_env\n$ source tutorial_env/bin/activate\n```\n- To use:\n```shell\n$ pip3 install pyimclsts\n$ # or, if you are cloning the repo, from the folder pyproject.toml is located:\n$ pip3 install .\n$ # If already installed, update it, with (might need to run it more than once):\n$ pip3 install -U pyimclsts\n```\n- Choose a folder and have a version of the IMC schema. Otherwise, the following command will fetch the latest IMC version from the LSTS git repository. Extract messages locally, with:\n```shell\n$ python3 -m pyimclsts.extract\n```\nCheck how to provide a black- or whitelist using:\n```shell\n$ python3 -m pyimclsts.extract --help\n```\nThis is unnecessary in most scenarios, but can be useful if you really have constrained resources. Use it with caution, because it may crash if, for example, you receive an inlined message that has been blacklisted.\n\nThis will locally extract the IMC.xml as python classes. You will see a folder called `pyimc_generated` which contains base messages, bitfields and enumerations from the IMC.xml file. They can be locally loaded using, for example:\n```python\nimport pyimc_generated as pg\n```\nIn the top-level module, you will find some functions to allow you to connect to a vehicle and subscribe to messages, namely, a subscriber class.\n```python\nimport pyimclsts.network as n\n\nconn = n.tcp_interface('localhost', 6006)\nsub = n.subscriber(conn)\n\n# for example:\nsub.subscribe_async(myfunction1, msg_id =pg.messages.Temperature, src='lauv-noptilus-1', src_ent='AHRS')\nsub.subscribe_async(myfunction2, msg_id =pg.messages.EstimatedState, src='lauv-noptilus-1', src_ent=None)\n```\n\nIn most cases, you can find the embedded documentation (docstrings) by hovering the mouse or using `help()` on interactive mode.\n\nCheck `/example` for further details.\n \n",
"bugtrack_url": null,
"license": "Copyright (c) 2023 Laborat\u00f3rio de Sistemas e Tecnologia Subaqu\u00e1tica Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Python bindings of the IMC message schema",
"version": "0.1.2.1",
"project_urls": {
"Bug Tracker": "https://github.com/choiwd/pyimctrans/issues",
"Homepage": "https://github.com/choiwd/pyimctrans"
},
"split_keywords": [
"imc",
"imc message protocol",
"lsts"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2f43cd8c5e0711dddc7ea9d25e73758d7c7c26bb8601df3eb9516e939de9d641",
"md5": "c39286dfbbe66a9a05f1d7735b5395cb",
"sha256": "6249337ad0ddec8803688a0e8cd0e42467c83eb233d220aef787019e56af409e"
},
"downloads": -1,
"filename": "pyimclsts-0.1.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c39286dfbbe66a9a05f1d7735b5395cb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 26033,
"upload_time": "2023-05-26T16:07:31",
"upload_time_iso_8601": "2023-05-26T16:07:31.729623Z",
"url": "https://files.pythonhosted.org/packages/2f/43/cd8c5e0711dddc7ea9d25e73758d7c7c26bb8601df3eb9516e939de9d641/pyimclsts-0.1.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fecd279c109cc74d906c3d866b73f780aa6bf4f8c93fc70c8be6a873895e40bd",
"md5": "cab7fcac81ca1a82756ff3d2318cfc06",
"sha256": "f7bc72a4819f84e7c343694a95d119a4bfc511e4bf8226a1f0cc37ce04c2ac78"
},
"downloads": -1,
"filename": "pyimclsts-0.1.2.1.tar.gz",
"has_sig": false,
"md5_digest": "cab7fcac81ca1a82756ff3d2318cfc06",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 26505,
"upload_time": "2023-05-26T16:07:53",
"upload_time_iso_8601": "2023-05-26T16:07:53.513370Z",
"url": "https://files.pythonhosted.org/packages/fe/cd/279c109cc74d906c3d866b73f780aa6bf4f8c93fc70c8be6a873895e40bd/pyimclsts-0.1.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-26 16:07:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "choiwd",
"github_project": "pyimctrans",
"github_not_found": true,
"lcname": "pyimclsts"
}