slmp-connect-python 0.1.14__tar.gz → 0.1.16__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.
Files changed (33) hide show
  1. {slmp_connect_python-0.1.14/slmp_connect_python.egg-info → slmp_connect_python-0.1.16}/PKG-INFO +11 -5
  2. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/README.md +26 -20
  3. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/pyproject.toml +4 -3
  4. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/slmp/__init__.py +11 -1
  5. slmp_connect_python-0.1.16/slmp/_operations.py +1134 -0
  6. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/slmp/async_client.py +252 -531
  7. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/slmp/cli.py +91 -812
  8. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/slmp/client.py +238 -714
  9. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/slmp/core.py +55 -7
  10. slmp_connect_python-0.1.16/slmp/error_codes.py +2093 -0
  11. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/slmp/errors.py +17 -0
  12. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/slmp/utils.py +127 -148
  13. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16/slmp_connect_python.egg-info}/PKG-INFO +11 -5
  14. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/slmp_connect_python.egg-info/SOURCES.txt +4 -0
  15. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/slmp_connect_python.egg-info/entry_points.txt +0 -2
  16. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/tests/test_async_client.py +24 -0
  17. slmp_connect_python-0.1.16/tests/test_error_codes.py +71 -0
  18. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/tests/test_slmp.py +100 -222
  19. slmp_connect_python-0.1.16/tests/test_sync_async_parity.py +482 -0
  20. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/LICENSE +0 -0
  21. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/setup.cfg +0 -0
  22. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/slmp/constants.py +0 -0
  23. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/slmp/device_ranges.py +0 -0
  24. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/slmp/py.typed +0 -0
  25. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/slmp_connect_python.egg-info/dependency_links.txt +0 -0
  26. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/slmp_connect_python.egg-info/requires.txt +0 -0
  27. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/slmp_connect_python.egg-info/top_level.txt +0 -0
  28. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/tests/test_bugs_and_edges.py +0 -0
  29. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/tests/test_cpu_operation_state.py +0 -0
  30. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/tests/test_device_ranges.py +0 -0
  31. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/tests/test_device_vectors.py +0 -0
  32. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/tests/test_shared_spec.py +0 -0
  33. {slmp_connect_python-0.1.14 → slmp_connect_python-0.1.16}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: slmp-connect-python
3
- Version: 0.1.14
3
+ Version: 0.1.16
4
4
  Summary: SLMP Connect Python: client library for Mitsubishi SLMP binary communication
5
5
  Author: fa-yoshinobu
6
6
  License-Expression: MIT
@@ -43,6 +43,12 @@ Dynamic: license-file
43
43
 
44
44
  ![Illustration](https://raw.githubusercontent.com/fa-yoshinobu/plc-comm-slmp-python/main/docsrc/assets/melsec.png)
45
45
 
46
+ [![Release](https://img.shields.io/github/v/release/fa-yoshinobu/plc-comm-slmp-python?label=release)](https://github.com/fa-yoshinobu/plc-comm-slmp-python/releases/latest)
47
+
48
+ [![Python](https://img.shields.io/badge/Python-3776AB?logo=python&logoColor=white)](https://www.python.org/)
49
+ [![MkDocs](https://img.shields.io/badge/MkDocs-526CFE?logo=materialformkdocs&logoColor=white)](https://www.mkdocs.org/)
50
+ [![GitHub Pages](https://img.shields.io/badge/GitHub%20Pages-222222?logo=githubpages&logoColor=white)](https://pages.github.com/)
51
+
46
52
  High-level SLMP helpers for Mitsubishi PLC communication over Binary 3E and 4E frames.
47
53
 
48
54
  This repository treats the high-level helper layer as the recommended user surface:
@@ -114,8 +120,8 @@ For normal application code:
114
120
  | `iq-f` | `3e` | `ql` | octal | `iq-f` | live-validated |
115
121
  | `iq-r` | `4e` | `iqr` | hexadecimal | `iq-r` | live-validated |
116
122
  | `iq-l` | `4e` | `iqr` | hexadecimal | `iq-l` | live-validated on `L16HCPU` |
117
- | `mx-f` | `4e` | `iqr` | hexadecimal | `mx-f` | provisional; review in `TODO.md` |
118
- | `mx-r` | `4e` | `iqr` | hexadecimal | `mx-r` | provisional; review in `TODO.md` |
123
+ | `mx-f` | `4e` | `iqr` | hexadecimal | `mx-f` | fixed family mapping |
124
+ | `mx-r` | `4e` | `iqr` | hexadecimal | `mx-r` | fixed family mapping |
119
125
  | `qcpu` | `3e` | `ql` | hexadecimal | `qcpu` | retained path |
120
126
  | `lcpu` | `3e` | `ql` | hexadecimal | `lcpu` | retained path |
121
127
  | `qnu` | `3e` | `ql` | hexadecimal | `qnu` | retained path |
@@ -130,8 +136,8 @@ High-level accepted `plc_family` values:
130
136
  | `iq-f` | FX5 / iQ-F | `X` / `Y` use manual octal text |
131
137
  | `iq-r` | iQ-R | `X` / `Y` use hexadecimal text |
132
138
  | `iq-l` | iQ-L | independent iQ-L range rules; live-validated on `L16HCPU` |
133
- | `mx-f` | MX-F | pending live validation |
134
- | `mx-r` | MX-R | pending live validation |
139
+ | `mx-f` | MX-F | fixed high-level family mapping |
140
+ | `mx-r` | MX-R | fixed high-level family mapping |
135
141
  | `qcpu` | QCPU | `3e/ql` fixed profile |
136
142
  | `lcpu` | LCPU | `3e/ql` fixed profile |
137
143
  | `qnu` | QnU | `3e/ql` fixed profile |
@@ -9,6 +9,12 @@
9
9
 
10
10
  ![Illustration](https://raw.githubusercontent.com/fa-yoshinobu/plc-comm-slmp-python/main/docsrc/assets/melsec.png)
11
11
 
12
+ [![Release](https://img.shields.io/github/v/release/fa-yoshinobu/plc-comm-slmp-python?label=release)](https://github.com/fa-yoshinobu/plc-comm-slmp-python/releases/latest)
13
+
14
+ [![Python](https://img.shields.io/badge/Python-3776AB?logo=python&logoColor=white)](https://www.python.org/)
15
+ [![MkDocs](https://img.shields.io/badge/MkDocs-526CFE?logo=materialformkdocs&logoColor=white)](https://www.mkdocs.org/)
16
+ [![GitHub Pages](https://img.shields.io/badge/GitHub%20Pages-222222?logo=githubpages&logoColor=white)](https://pages.github.com/)
17
+
12
18
  High-level SLMP helpers for Mitsubishi PLC communication over Binary 3E and 4E frames.
13
19
 
14
20
  This repository treats the high-level helper layer as the recommended user surface:
@@ -16,11 +22,11 @@ This repository treats the high-level helper layer as the recommended user surfa
16
22
  - `SlmpConnectionOptions`
17
23
  - `open_and_connect` / `open_and_connect_sync`
18
24
  - `AsyncSlmpClient`
19
- - `QueuedAsyncSlmpClient`
20
- - `SlmpClient`
21
- - `normalize_address`
22
- - `parse_address` / `try_parse_address` / `format_address`
23
- - `read_typed` / `write_typed`
25
+ - `QueuedAsyncSlmpClient`
26
+ - `SlmpClient`
27
+ - `normalize_address`
28
+ - `parse_address` / `try_parse_address` / `format_address`
29
+ - `read_typed` / `write_typed`
24
30
  - `read_words_single_request` / `read_dwords_single_request`
25
31
  - `read_words_chunked` / `read_dwords_chunked`
26
32
  - `write_bit_in_word`
@@ -80,8 +86,8 @@ For normal application code:
80
86
  | `iq-f` | `3e` | `ql` | octal | `iq-f` | live-validated |
81
87
  | `iq-r` | `4e` | `iqr` | hexadecimal | `iq-r` | live-validated |
82
88
  | `iq-l` | `4e` | `iqr` | hexadecimal | `iq-l` | live-validated on `L16HCPU` |
83
- | `mx-f` | `4e` | `iqr` | hexadecimal | `mx-f` | provisional; review in `TODO.md` |
84
- | `mx-r` | `4e` | `iqr` | hexadecimal | `mx-r` | provisional; review in `TODO.md` |
89
+ | `mx-f` | `4e` | `iqr` | hexadecimal | `mx-f` | fixed family mapping |
90
+ | `mx-r` | `4e` | `iqr` | hexadecimal | `mx-r` | fixed family mapping |
85
91
  | `qcpu` | `3e` | `ql` | hexadecimal | `qcpu` | retained path |
86
92
  | `lcpu` | `3e` | `ql` | hexadecimal | `lcpu` | retained path |
87
93
  | `qnu` | `3e` | `ql` | hexadecimal | `qnu` | retained path |
@@ -96,8 +102,8 @@ High-level accepted `plc_family` values:
96
102
  | `iq-f` | FX5 / iQ-F | `X` / `Y` use manual octal text |
97
103
  | `iq-r` | iQ-R | `X` / `Y` use hexadecimal text |
98
104
  | `iq-l` | iQ-L | independent iQ-L range rules; live-validated on `L16HCPU` |
99
- | `mx-f` | MX-F | pending live validation |
100
- | `mx-r` | MX-R | pending live validation |
105
+ | `mx-f` | MX-F | fixed high-level family mapping |
106
+ | `mx-r` | MX-R | fixed high-level family mapping |
101
107
  | `qcpu` | QCPU | `3e/ql` fixed profile |
102
108
  | `lcpu` | LCPU | `3e/ql` fixed profile |
103
109
  | `qnu` | QnU | `3e/ql` fixed profile |
@@ -148,17 +154,17 @@ Maintainer-only notes and retained evidence live under `internal_docs/`.
148
154
 
149
155
  ### Address Normalization
150
156
 
151
- ```python
152
- from slmp import format_address, normalize_address, parse_address
153
-
154
- print(normalize_address("x20")) # X20
155
- print(normalize_address("d200")) # D200
156
- print(normalize_address("x100", plc_family="iq-f")) # X100
157
-
158
- parsed = parse_address("d200:f")
159
- print(parsed.base_device, parsed.dtype) # D200 F
160
- print(format_address(parsed)) # D200:F
161
- ```
157
+ ```python
158
+ from slmp import format_address, normalize_address, parse_address
159
+
160
+ print(normalize_address("x20")) # X20
161
+ print(normalize_address("d200")) # D200
162
+ print(normalize_address("x100", plc_family="iq-f")) # X100
163
+
164
+ parsed = parse_address("d200:f")
165
+ print(parsed.base_device, parsed.dtype) # D200 F
166
+ print(format_address(parsed)) # D200:F
167
+ ```
162
168
 
163
169
  ### Single Typed Values
164
170
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "slmp-connect-python"
7
- version = "0.1.14"
7
+ version = "0.1.16"
8
8
  description = "SLMP Connect Python: client library for Mitsubishi SLMP binary communication"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -46,8 +46,6 @@ dev = [
46
46
 
47
47
  [project.scripts]
48
48
  slmp-connection-check = "slmp.cli:connection_check_main"
49
- slmp-compatibility-probe = "slmp.cli:compatibility_probe_main"
50
- slmp-compatibility-matrix-render = "slmp.cli:compatibility_matrix_render_main"
51
49
  slmp-device-range-probe = "slmp.cli:device_range_probe_main"
52
50
  slmp-register-boundary-probe = "slmp.cli:register_boundary_probe_main"
53
51
  slmp-other-station-check = "slmp.cli:other_station_check_main"
@@ -83,6 +81,9 @@ target-version = "py310"
83
81
  [tool.ruff.lint]
84
82
  select = ["E", "F", "I", "B", "UP"]
85
83
 
84
+ [tool.ruff.lint.per-file-ignores]
85
+ "slmp/error_codes.py" = ["E501"]
86
+
86
87
  [tool.ruff.lint.isort]
87
88
  known-first-party = ["slmp"]
88
89
 
@@ -10,7 +10,7 @@ The primary user-facing entry points are:
10
10
  - ``poll``
11
11
  """
12
12
 
13
- __version__ = "0.1.14"
13
+ __version__ = "0.1.16"
14
14
 
15
15
  from .async_client import AsyncSlmpClient
16
16
  from .client import SlmpClient
@@ -51,6 +51,12 @@ from .device_ranges import (
51
51
  read_device_range_catalog_for_family,
52
52
  read_device_range_catalog_for_family_sync,
53
53
  )
54
+ from .error_codes import (
55
+ SlmpEndCodeLanguage,
56
+ get_end_code_message,
57
+ get_end_code_name,
58
+ is_remote_password_end_code,
59
+ )
54
60
  from .errors import (
55
61
  SlmpBoundaryBehaviorWarning,
56
62
  SlmpError,
@@ -127,6 +133,7 @@ __all__ = [
127
133
  "PLCSeries",
128
134
  "QueuedAsyncSlmpClient",
129
135
  "SlmpConnectionOptions",
136
+ "SlmpEndCodeLanguage",
130
137
  "SlmpAddress",
131
138
  "RandomReadResult",
132
139
  "SlmpClient",
@@ -140,6 +147,9 @@ __all__ = [
140
147
  "TypeNameInfo",
141
148
  "decode_cpu_operation_state",
142
149
  "format_address",
150
+ "get_end_code_message",
151
+ "get_end_code_name",
152
+ "is_remote_password_end_code",
143
153
  "SlmpDeviceRangeCatalog",
144
154
  "SlmpDeviceRangeCategory",
145
155
  "SlmpDeviceRangeEntry",