This python package is used as a core engine for any pydevmgr high level package.
The documentation is on its way, but one may be interested to higher level package such as
- [pydevmgr_ua](https://github.com/efisoft-elt/pydevmgr_ua)
- [pydevmgr_elt](https://github.com/efisoft-elt/pydevmgr_elt)
Python package to by used as substitute of a real device manager running in a ELT-Software environment when the full ELT-Software environment cannot be used.
Sources are [here](https://github.com/efisoft-elt/pydevmgr_core)
# Install
```bash
> pip install pydevmgr_core
```
# Basic Usage
pydevmgr_core is not indented to be used directly but used by other pydevmgr related package as a core engine.
For usage here is an example using pydevmgr_ua to access an OPC-UA node :
```python
from pydevmgr_ua import UaRpc, UaNode, UaCom
from pydevmgr_core.nodes import InsideInterval
import time
com = UaCom(address="opc.tcp://192.168.1.11:4840", prefix="MAIN")
target = 7.0
move = UaRpc( com=com, suffix="Motor1.RPC_MoveAbs", args_parser=[float, float])
pos = UaNode( com=com, suffix="Motor1.stat.lrPosActual" )
test = InsideInterval( node = pos, min=target-0.1, max=target+0.1 )
try:
com.connect()
move.call( 7.0, 1 )
while not test.get():
time.sleep(0.1)
print( "posisiotn is", pos.get() )
finally:
com.disconnect()
```
Or using the highest level dedicated for ELT devices:
```python
from pydevmgr_elt import Motor, wait
m1 = Motor('motor1', address="opc.tcp://192.168.1.11:4840", prefix="MAIN.Motor1")
try:
m1.connect()
wait(m1.move_abs(7.0,1.0), lag=0.1)
print( "position is", m1.stat.pos_actual.get() )
finally:
m1.disconnect()
```
Raw data
{
"_id": null,
"home_page": "",
"name": "pydevmgr-core",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Sylvain Guieu",
"author_email": "sylvain.guieu@univ-grenoble-alpes.fr",
"download_url": "https://files.pythonhosted.org/packages/81/f4/a18fa5e1d04d2c2406031804da53f69e7e08a8da5c9b213d5e8827e81022/pydevmgr_core-0.5.1.tar.gz",
"platform": null,
"description": "This python package is used as a core engine for any pydevmgr high level package. \n\nThe documentation is on its way, but one may be interested to higher level package such as \n- [pydevmgr_ua](https://github.com/efisoft-elt/pydevmgr_ua)\n- [pydevmgr_elt](https://github.com/efisoft-elt/pydevmgr_elt)\n\n\nPython package to by used as substitute of a real device manager running in a ELT-Software environment when the full ELT-Software environment cannot be used. \n\n\n\nSources are [here](https://github.com/efisoft-elt/pydevmgr_core)\n\n\n# Install\n\n```bash\n> pip install pydevmgr_core \n```\n\n# Basic Usage\n\npydevmgr_core is not indented to be used directly but used by other pydevmgr related package as a core engine. \n\nFor usage here is an example using pydevmgr_ua to access an OPC-UA node : \n\n```python\nfrom pydevmgr_ua import UaRpc, UaNode, UaCom\nfrom pydevmgr_core.nodes import InsideInterval\nimport time \n\ncom = UaCom(address=\"opc.tcp://192.168.1.11:4840\", prefix=\"MAIN\")\n\ntarget = 7.0\n\nmove = UaRpc( com=com, suffix=\"Motor1.RPC_MoveAbs\", args_parser=[float, float])\npos = UaNode( com=com, suffix=\"Motor1.stat.lrPosActual\" )\ntest = InsideInterval( node = pos, min=target-0.1, max=target+0.1 )\n\n\ntry:\n com.connect()\n move.call( 7.0, 1 )\n while not test.get():\n time.sleep(0.1)\n\n print( \"posisiotn is\", pos.get() )\nfinally:\n com.disconnect()\n\n```\n\nOr using the highest level dedicated for ELT devices: \n\n\n```python \nfrom pydevmgr_elt import Motor, wait\nm1 = Motor('motor1', address=\"opc.tcp://192.168.1.11:4840\", prefix=\"MAIN.Motor1\")\ntry:\n m1.connect() \n wait(m1.move_abs(7.0,1.0), lag=0.1)\n print( \"position is\", m1.stat.pos_actual.get() )\nfinally:\n m1.disconnect()\n```",
"bugtrack_url": null,
"license": "Creative Commons Attribution-Noncommercial-Share Alike license",
"summary": "",
"version": "0.5.1",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "81f4a18fa5e1d04d2c2406031804da53f69e7e08a8da5c9b213d5e8827e81022",
"md5": "4175f1b4efe1955a60c42fa5c7827ccc",
"sha256": "1a06f7633097bd6f2c9f19d64a89724e50cdd476d4b5c4be9fc162ea1643704a"
},
"downloads": -1,
"filename": "pydevmgr_core-0.5.1.tar.gz",
"has_sig": false,
"md5_digest": "4175f1b4efe1955a60c42fa5c7827ccc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 72505,
"upload_time": "2022-09-28T13:32:37",
"upload_time_iso_8601": "2022-09-28T13:32:37.304666Z",
"url": "https://files.pythonhosted.org/packages/81/f4/a18fa5e1d04d2c2406031804da53f69e7e08a8da5c9b213d5e8827e81022/pydevmgr_core-0.5.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-09-28 13:32:37",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "pydevmgr-core"
}