uphy-controller 0.1.0.dev2794__tar.gz → 0.1.0.dev2895__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {uphy_controller-0.1.0.dev2794/src/uphy_controller.egg-info → uphy_controller-0.1.0.dev2895}/PKG-INFO +13 -5
- {uphy_controller-0.1.0.dev2794 → uphy_controller-0.1.0.dev2895}/README.md +9 -2
- {uphy_controller-0.1.0.dev2794 → uphy_controller-0.1.0.dev2895}/pyproject.toml +3 -2
- {uphy_controller-0.1.0.dev2794 → uphy_controller-0.1.0.dev2895}/src/uphy/controller/__main__.py +7 -4
- {uphy_controller-0.1.0.dev2794 → uphy_controller-0.1.0.dev2895}/src/uphy/controller/modbus.py +1 -1
- {uphy_controller-0.1.0.dev2794 → uphy_controller-0.1.0.dev2895/src/uphy_controller.egg-info}/PKG-INFO +13 -5
- {uphy_controller-0.1.0.dev2794 → uphy_controller-0.1.0.dev2895}/src/uphy_controller.egg-info/requires.txt +2 -1
- {uphy_controller-0.1.0.dev2794 → uphy_controller-0.1.0.dev2895}/LICENSE.txt +0 -0
- {uphy_controller-0.1.0.dev2794 → uphy_controller-0.1.0.dev2895}/setup.cfg +0 -0
- {uphy_controller-0.1.0.dev2794 → uphy_controller-0.1.0.dev2895}/src/uphy/__init__.py +0 -0
- {uphy_controller-0.1.0.dev2794 → uphy_controller-0.1.0.dev2895}/src/uphy/controller/__init__.py +0 -0
- {uphy_controller-0.1.0.dev2794 → uphy_controller-0.1.0.dev2895}/src/uphy/controller/gui.py +0 -0
- {uphy_controller-0.1.0.dev2794 → uphy_controller-0.1.0.dev2895}/src/uphy_controller.egg-info/SOURCES.txt +0 -0
- {uphy_controller-0.1.0.dev2794 → uphy_controller-0.1.0.dev2895}/src/uphy_controller.egg-info/dependency_links.txt +0 -0
- {uphy_controller-0.1.0.dev2794 → uphy_controller-0.1.0.dev2895}/src/uphy_controller.egg-info/entry_points.txt +0 -0
- {uphy_controller-0.1.0.dev2794 → uphy_controller-0.1.0.dev2895}/src/uphy_controller.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: uphy-controller
|
|
3
|
-
Version: 0.1.0.
|
|
3
|
+
Version: 0.1.0.dev2895
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
License: Copyright rt-labs AB, Sweden.
|
|
6
6
|
All rights reserved.
|
|
@@ -15,7 +15,8 @@ Requires-Python: >=3.10
|
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE.txt
|
|
17
17
|
Requires-Dist: dearpygui>=2.0.0
|
|
18
|
-
Requires-Dist: pymodbus
|
|
18
|
+
Requires-Dist: pymodbus<3.9.0,>=3.8.3
|
|
19
|
+
Requires-Dist: requests>=2.32.3
|
|
19
20
|
Requires-Dist: rich>=13.9.2
|
|
20
21
|
Requires-Dist: typer>=0.12.5
|
|
21
22
|
Requires-Dist: zeroconf>=0.135.0
|
|
@@ -26,7 +27,7 @@ This contain a python based U-Phy device controller that act as a fieldbus maste
|
|
|
26
27
|
|
|
27
28
|
Supported fieldbuses:
|
|
28
29
|
|
|
29
|
-
- modbus
|
|
30
|
+
- modbus
|
|
30
31
|
|
|
31
32
|
## Install
|
|
32
33
|
|
|
@@ -38,5 +39,12 @@ uv pip install uphy-controller
|
|
|
38
39
|
|
|
39
40
|
```sh
|
|
40
41
|
# Start up controller against an existing device
|
|
41
|
-
uphy-controller modbus
|
|
42
|
+
uphy-controller modbus --model [PATH_TO_MODEL] --target [UUID]:[HOST]:[PORT]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
# Start up controller against discovered devices that expose their model via
|
|
48
|
+
# mdns.
|
|
49
|
+
uphy-controller mdns
|
|
42
50
|
```
|
|
@@ -4,7 +4,7 @@ This contain a python based U-Phy device controller that act as a fieldbus maste
|
|
|
4
4
|
|
|
5
5
|
Supported fieldbuses:
|
|
6
6
|
|
|
7
|
-
- modbus
|
|
7
|
+
- modbus
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -16,5 +16,12 @@ uv pip install uphy-controller
|
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
18
|
# Start up controller against an existing device
|
|
19
|
-
uphy-controller modbus
|
|
19
|
+
uphy-controller modbus --model [PATH_TO_MODEL] --target [UUID]:[HOST]:[PORT]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
# Start up controller against discovered devices that expose their model via
|
|
25
|
+
# mdns.
|
|
26
|
+
uphy-controller mdns
|
|
20
27
|
```
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "uphy-controller"
|
|
3
|
-
version = "0.1.0.
|
|
3
|
+
version = "0.1.0.dev2895"
|
|
4
4
|
description = "Add your description here"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
7
7
|
dependencies = [
|
|
8
8
|
"dearpygui>=2.0.0",
|
|
9
|
-
"pymodbus>=3.
|
|
9
|
+
"pymodbus (>=3.8.3,<3.9.0)",
|
|
10
|
+
"requests>=2.32.3",
|
|
10
11
|
"rich>=13.9.2",
|
|
11
12
|
"typer>=0.12.5",
|
|
12
13
|
"zeroconf>=0.135.0",
|
{uphy_controller-0.1.0.dev2794 → uphy_controller-0.1.0.dev2895}/src/uphy/controller/__main__.py
RENAMED
|
@@ -30,7 +30,7 @@ def parse_target(value: str):
|
|
|
30
30
|
return Target(*value.split(":"))
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
@app.command()
|
|
33
|
+
@app.command(name="modbus")
|
|
34
34
|
def modbus_tcp(
|
|
35
35
|
model: Annotated[list[Path], Option()],
|
|
36
36
|
target: Annotated[
|
|
@@ -42,10 +42,11 @@ def modbus_tcp(
|
|
|
42
42
|
),
|
|
43
43
|
] = None,
|
|
44
44
|
):
|
|
45
|
+
"""Run controller against a set of fixed uphy devices."""
|
|
45
46
|
models = [RootModel.parse_file(file) for file in model]
|
|
46
47
|
|
|
47
48
|
devices_by_id = {
|
|
48
|
-
device.id: (root, device) for root in models for device in root.devices
|
|
49
|
+
str(device.id): (root, device) for root in models for device in root.devices
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
devices_by_name = {
|
|
@@ -57,8 +58,8 @@ def modbus_tcp(
|
|
|
57
58
|
table.add_column("ID")
|
|
58
59
|
table.add_column("Name")
|
|
59
60
|
|
|
60
|
-
for _, device in devices_by_id.
|
|
61
|
-
table.add_row(
|
|
61
|
+
for id, (_, device) in devices_by_id.items():
|
|
62
|
+
table.add_row(id, device.name)
|
|
62
63
|
|
|
63
64
|
print(table)
|
|
64
65
|
print()
|
|
@@ -78,6 +79,7 @@ def modbus_tcp(
|
|
|
78
79
|
root, device = devices_by_name.get(target_obj.id, (None, None))
|
|
79
80
|
if not device:
|
|
80
81
|
LOG.warning("Unable to find device %s", target_obj.id)
|
|
82
|
+
continue
|
|
81
83
|
|
|
82
84
|
device_gui = gui.add_device(
|
|
83
85
|
root, device, f"{target_obj.host}:{target_obj.port}"
|
|
@@ -96,6 +98,7 @@ def modbus_tcp(
|
|
|
96
98
|
|
|
97
99
|
@app.command()
|
|
98
100
|
def mdns():
|
|
101
|
+
"""Run controller against devices automatically discovered via mdns."""
|
|
99
102
|
from zeroconf import (
|
|
100
103
|
Zeroconf,
|
|
101
104
|
ServiceBrowser,
|
{uphy_controller-0.1.0.dev2794 → uphy_controller-0.1.0.dev2895}/src/uphy/controller/modbus.py
RENAMED
|
@@ -51,7 +51,7 @@ def target_runner(stop: Event, target: Target, device_gui: gui.DeviceGUI):
|
|
|
51
51
|
index = base
|
|
52
52
|
base += count
|
|
53
53
|
try:
|
|
54
|
-
response = client.read_holding_registers(index, count)
|
|
54
|
+
response = client.read_holding_registers(index, count=count)
|
|
55
55
|
if response.isError():
|
|
56
56
|
raise pymodbus.ModbusException("Error")
|
|
57
57
|
except pymodbus.exceptions.ConnectionException:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: uphy-controller
|
|
3
|
-
Version: 0.1.0.
|
|
3
|
+
Version: 0.1.0.dev2895
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
License: Copyright rt-labs AB, Sweden.
|
|
6
6
|
All rights reserved.
|
|
@@ -15,7 +15,8 @@ Requires-Python: >=3.10
|
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE.txt
|
|
17
17
|
Requires-Dist: dearpygui>=2.0.0
|
|
18
|
-
Requires-Dist: pymodbus
|
|
18
|
+
Requires-Dist: pymodbus<3.9.0,>=3.8.3
|
|
19
|
+
Requires-Dist: requests>=2.32.3
|
|
19
20
|
Requires-Dist: rich>=13.9.2
|
|
20
21
|
Requires-Dist: typer>=0.12.5
|
|
21
22
|
Requires-Dist: zeroconf>=0.135.0
|
|
@@ -26,7 +27,7 @@ This contain a python based U-Phy device controller that act as a fieldbus maste
|
|
|
26
27
|
|
|
27
28
|
Supported fieldbuses:
|
|
28
29
|
|
|
29
|
-
- modbus
|
|
30
|
+
- modbus
|
|
30
31
|
|
|
31
32
|
## Install
|
|
32
33
|
|
|
@@ -38,5 +39,12 @@ uv pip install uphy-controller
|
|
|
38
39
|
|
|
39
40
|
```sh
|
|
40
41
|
# Start up controller against an existing device
|
|
41
|
-
uphy-controller modbus
|
|
42
|
+
uphy-controller modbus --model [PATH_TO_MODEL] --target [UUID]:[HOST]:[PORT]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
# Start up controller against discovered devices that expose their model via
|
|
48
|
+
# mdns.
|
|
49
|
+
uphy-controller mdns
|
|
42
50
|
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{uphy_controller-0.1.0.dev2794 → uphy_controller-0.1.0.dev2895}/src/uphy/controller/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|