Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion docs/preview-notes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
# Modpoll 2.0.0a4 preview
# Modpoll 2.0.0a5 preview

Modpoll 2.0.0a5 removes `--audit` and pins modpoll-wot 0.3.0a3, which removes
the `modpoll:audit` plan. Thing Models are fully open, and a full read executes
the whole `modpoll:acquisition` plan, so TM authors only write acquisition
groups. A TM that still declares `modpoll:audit` is rejected as an unsupported
root project extension; delete the key. Read a device once with:

```sh
modpoll --once --config device.tm.json --tcp DEVICE_HOST --unit-id 1
```

Verification report generation over a full read is planned separately.

## Modpoll 2.0.0a4 preview

Modpoll 2.0.0a4 follows the ModioHub glossary: a decoded value is a point.
The terminal table's first column header changes from `Reference` to `Point`,
Expand Down
5 changes: 0 additions & 5 deletions modpoll/arg_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,4 @@ def get_parser():
choices=["default", "ascii", "rtu", "socket"],
help="The type of framer for Modbus messages. Serial supports ascii/rtu; TCP/UDP use socket.",
)
parser.add_argument(
"--audit",
action="store_true",
help="Read the bounded TM identity and status sample once",
)
return parser
86 changes: 0 additions & 86 deletions modpoll/audit.py

This file was deleted.

12 changes: 0 additions & 12 deletions modpoll/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,18 +142,6 @@ def app(name="modpoll"):
# parse args
args = get_parser().parse_args()

if args.audit:
from pymodbus.exceptions import ModbusException

from .audit import run_audit

try:
status = run_audit(args)
except (ValueError, OSError, ModbusException) as exc:
print(f"Audit failed: {exc}", file=sys.stderr)
status = 1
raise SystemExit(status)

print(
f"\nModpoll v{__version__} - A New Command-line Tool for Modbus and MQTT\n",
flush=True,
Expand Down
4 changes: 0 additions & 4 deletions modpoll/modbus_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,8 +849,6 @@ def _create_serial_client(args, port, framer):
"stopbits": 1,
"timeout": args.timeout,
}
if getattr(args, "audit", False):
client_args["retries"] = 0
if framer:
client_args["framer"] = framer
return ModbusSerialClient(**client_args)
Expand All @@ -862,8 +860,6 @@ def _create_tcp_client(args, framer):
"port": 502 if args.tcp_port is None else args.tcp_port,
"timeout": args.timeout,
}
if getattr(args, "audit", False):
client_args["retries"] = 0
if framer:
client_args["framer"] = framer
return ModbusTcpClient(**client_args)
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "modpoll"
version = "2.0.0a4"
version = "2.0.0a5"
description = "A New Command-line Tool for Modbus and MQTT"
authors = [{ name = "Ying Shaodong", email = "helloysd@gmail.com" }]
readme = "README.md"
Expand All @@ -10,7 +10,7 @@ dependencies = [
"paho-mqtt>=2.1.0,<3.0.0",
"prettytable>=3.9.0,<4.0.0",
"requests>=2.32.5,<3.0.0",
"modpoll-wot==0.3.0a2",
"modpoll-wot==0.3.0a3",
]

[project.optional-dependencies]
Expand Down
61 changes: 0 additions & 61 deletions tests/test_audit.py

This file was deleted.

10 changes: 5 additions & 5 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vocab/wot-modbus/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h2>Contract 0.2</h2>
explicit. Bit-table offsets count physical bits in 0.2. Above definitions remain
unchanged for 0.1 input.</p>
<dl>
<dt id="audit">modpoll:audit</dt><dd>Optional identity and status lists of readable property names for a local audit.</dd>
<dt id="audit">modpoll:audit</dt><dd>Removed in modpoll 2.0.0a5 and modpoll-wot 0.3.0a3. A full read executes the whole <code>modpoll:acquisition</code> plan.</dd>
<dt id="codec">modpoll:codec</dt><dd>Form float16 or historical register boolean array codec, raw xsd:hexBinary.</dd>
<dt id="byteLength">modpoll:byteLength</dt><dd>Exact UTF-8 byte capacity when different from the full register span.</dd>
<dt id="bitPacking">modpoll:bitPacking</dt><dd>Explicit legacy-msb packed numeric/string bit-table interpretation.</dd>
Expand Down
Loading