Seems to be working great
This commit is contained in:
@@ -1,43 +1,13 @@
|
||||
# atMb 0.6 — threaded communication and client statistics
|
||||
# atMb 0.8 — online-change-focused synchronous release
|
||||
|
||||
This update moves TCP/RTU transaction progress and TCP server I/O into one shared
|
||||
C worker thread. The worker also handles connection recovery between PLC scans.
|
||||
The IEC task still selects/submits the next client request and exchanges slave
|
||||
memory. One C worker serves the fixed pools; it is not a separate thread per device.
|
||||
This release removes the native worker thread and restores TCP, RTU and server
|
||||
transport progress to the owning PLC call. The C layer retains no IEC pointers
|
||||
and uses fixed storage only.
|
||||
|
||||
Start with [upgrade/build instructions](docs/BUILD-AND-USAGE.md), then read the
|
||||
[user guide](docs/USER-GUIDE.md) and [API reference](docs/API-REFERENCE.md).
|
||||
Import `library/atMb-OnlineChange.export` into a fresh CODESYS library project.
|
||||
The IEC library version is **0.8.0.0** and the C component is **0.5.0.0**.
|
||||
The previous threaded release remains under `backup/` for rollback/reference.
|
||||
|
||||
## Required upgrade
|
||||
|
||||
Rebuild the C component as **0.4.0.0**, import `library/atMb-Threaded.export` into
|
||||
a fresh CODESYS library project and embed the new `.so` for the device target.
|
||||
The external function signature is unchanged, but new commands are required.
|
||||
The new IEC wrapper checks capability version and rejects an older component.
|
||||
This package contains updated source/export, not an IDE-compiled updated `.library`
|
||||
or rebuilt ARM binaries. The previous files are retained under `backup/` only.
|
||||
|
||||
## Changes
|
||||
|
||||
- Worker defaults: 1 ms sleep, normal OS scheduling, 2 s per-context scan watchdog.
|
||||
- Optional `atMb.Worker` FB sets CPU affinity, sleep interval and watchdog.
|
||||
- Completion and read data stay latched until acknowledged; failed writes are not
|
||||
replayed by the worker. IEC cyclic retries remain configurable via write holds.
|
||||
- Server dirty tracking preserves remote writes until the PLC pulls them.
|
||||
- Public diagnostics now use `out_errorCode` and `out_lastErrorCode`.
|
||||
- `client.stats` aggregates every registered request's counters and timings.
|
||||
- Both TCP and RTU clients show `OK:<successes>/Er:<errors>` like requests.
|
||||
- Accurate worker transaction durations; timeout counts classify actual timeouts.
|
||||
|
||||
## Files
|
||||
|
||||
- `component-source/`: protocol implementation, worker, component frame and tests.
|
||||
- `ExtensionSDK/`: required SDK headers/macros/build support.
|
||||
- `library/atMb-Threaded.export`: importable IEC source; no old embedded binary.
|
||||
- `library/atMb-Threaded-Review.st`: readable export source.
|
||||
- `docs/`: usage, ABI/worker notes, migration, validation and reference.
|
||||
- `backup/`: original library/export/binaries for rollback, not the new release.
|
||||
|
||||
Host tests run with `make -C component-source test`. Physical PLC/RTU testing and
|
||||
CODESYS IDE compilation remain required. Online-change qualification is future work;
|
||||
use a full download for this structural update. Git changes are not committed/pushed.
|
||||
`FB_reinit` closes native contexts before IEC instance memory is replaced,
|
||||
clears request pointers and active-request state, and allows contexts to reopen
|
||||
on subsequent scans.
|
||||
|
||||
Reference in New Issue
Block a user