AB CIP PR 7 � ISubscribable via shared PollGroupEngine #114

Merged
dohertj2 merged 1 commits from abcip-pr7-isubscribable into v2 2026-04-19 17:13:43 -04:00
Owner

AbCipDriver implements ISubscribable by consuming the shared PollGroupEngine extracted in PR 1 � the validating consumer that proves PR 1 was worth the refactor. 7 new tests, 137/137 passing total. Merges to v2.

AbCipDriver implements `ISubscribable` by consuming the shared `PollGroupEngine` extracted in PR 1 � the validating consumer that proves PR 1 was worth the refactor. 7 new tests, 137/137 passing total. Merges to v2.
dohertj2 added 1 commit 2026-04-19 17:13:39 -04:00
AB CIP PR 7 — ISubscribable via shared PollGroupEngine. AbCipDriver now implements ISubscribable — Subscribe delegates into the PollGroupEngine extracted in PR 1, Unsubscribe releases the subscription, ShutdownAsync disposes the engine cancelling every active subscription. OnDataChange event wired through the engine's on-change callback so external subscribers see the driver as sender. The engine's reader delegate points at the driver's ReadAsync (already handles lazy runtime init + caching via EnsureTagRuntimeAsync) — each poll tick batch-reads every subscribed tag in one IReadable call. 100ms interval floor inherited from PollGroupEngine.DefaultMinInterval matches Modbus convention. Initial-data push on first poll preserved via forceRaise=true. Exception-tolerant loop preserved — individual read failures show up as DataValueSnapshot with non-Good StatusCode via the status-code mapping PR 3 established. 7 new unit tests in AbCipSubscriptionTests covering initial-poll raising per tag, unchanged value raising only once, value change between polls triggering a new event, Unsubscribe halting the loop, 100ms floor keeping a 5ms request from generating extra events against a stable value, ShutdownAsync cancelling active subscriptions, UDT member subscription routing through the synthesised Motor1.Speed full-reference (proving PR 6's fan-out composes correctly with PR 7's subscription path). Total AbCip unit tests now 137/137 passing (+7 from PR 6's 130). Validates that the shared PollGroupEngine from PR 1 works correctly for a second driver, closing the original motivation for the extraction. Full solution builds 0 errors; Modbus + other drivers untouched. 33780eb64c
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dohertj2 merged commit 5978ea002d into v2 2026-04-19 17:13:43 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#114