Release v3.1.0
v3.1.0 changes
BREAKING
- Library: Require destination port, transport, and canonical PLC profile when constructing connection options. Constructors remain local-only; commands require an explicit successful
openand returnHostLinkError::NotConnectedinstead of opening or reopening a transport. - Library: Fix the communication timeout default at 3 seconds, normal command termination at CR, and the internal response-body cap at 65,536 bytes. Public LF and buffer-size controls are removed.
- Library: Make
set_timerequire an explicit, calendar-validHostLinkClock; local-time creation remains a separate caller-invoked helper and never falls back to UTC. - Library: Change maintainer
send_rawto return undecoded response-body bytes without converting PLC error responses. It is hidden from ordinary generated user documentation. - Library: Remove comment padding options. Comment decoding removes only trailing ASCII space bytes before UTF-8/Shift_JIS decoding.
- Library: Require expansion-buffer and low-level numeric formats, reject suffix-bearing low-level device inputs, and validate response tokens, numeric ranges, counts, and 32-bit spans without fallback conversion.
- Library: Remove all public chunked helpers. Word and native Dword helpers send at most one request and reject counts over their one-request limit.
- Library: Keep bit-in-word read-modify-write under one client lock so concurrent clones cannot interleave the read and write portions.
- Library: Remove the embedded PLC manual error-message lookup and retain only the returned PLC code and response.
- Library: Require UDP response terminators, reject suffixes on every non-format command, validate hexadecimal reads as exactly one 1..4-digit token, and limit clock years to
00..99. - Library: Validate command-derived response counts, including 16/32-point direct-bit numeric reads; accept only documented
0/1/ON/OFFdirect-bit tokens and close the session after malformed semantic responses. - Library: Replace the lossy
From<HostLinkValue> for u16conversion with fallibleTryFrom, so non-U16variants cannot silently become zero. - Tests: Add explicit 3-second/zero/TCP-timeout recovery coverage and remove library-local cross-implementation vectors; cross-language verification is a separate repository concern.
- Tooling: Allow the local release gate to package the reviewed working-tree diff before it is committed.
- Samples: Require port, transport, and canonical PLC profile in every runnable endpoint definition.
Added
- Library: Added
KvHostLinkPlcProfileDescriptorand crate-rootplc_profile_descriptors()for canonical Host Link profile metadata.
Changed
-
Docs: Rebuilt getting-started, usage, API, profile, README, examples, and maintainer migration material around the explicit quality-overhaul contract.
-
Tests: Added coverage for disconnected commands, raw bytes, response caps and expected counts, native Dword requests, calendar validation, comment padding, and concurrent bit-in-word updates.
-
Release: Bumped crate and lockfile metadata to
3.1.0.
Fixed
- Library: Corrected ten KV device range cells against live PLC hardware and the KEYENCE simulator, and pinned the canonical profile source to
plc-comm-hostlink-profilesv1.2.0.VMwidens toVM0-9999on KV-NANO andVM0-59999on KV-3000/KV-5000;Zwidens toZ1-23on KV-8000.CTHnarrows toCTH0-1on the KV-3000 and KV-5000 XYM profiles, matching their base profiles:CTH2andCTH3were previously accepted there and are now rejected. - Library: Poison and replace TCP/UDP transports after timeout, I/O failure, or a dropped request future so delayed responses cannot satisfy a later request.
- Tests: Cover UDP timeout and cancellation with delayed loopback responses.
- Docs: Remove hand-maintained next-page navigation from Getting Started.
Release integrity
- The registry package, �3.1.0 tag, and attached assets remain immutable.
- Main-branch CHANGELOG classification was corrected by PR #27 without changing runtime code, package metadata, the tag, or published artifacts.