Add diagnostic buffer reading and data change subscriptions#690
Merged
gijzelaerr merged 1 commit intomasterfrom Apr 15, 2026
Merged
Add diagnostic buffer reading and data change subscriptions#690gijzelaerr merged 1 commit intomasterfrom
gijzelaerr merged 1 commit intomasterfrom
Conversation
Implements #683 (diagnostic buffer) and #684 (data subscriptions): Diagnostic buffer (#683): - read_diagnostic_buffer() on snap7.Client: reads SZL 0x00A0, parses 20-byte entries with BCD timestamps into structured dicts - Exposed through s7.Client.read_diagnostic_buffer() via legacy fallback Data change subscriptions (#684, experimental): - create_subscription(items, cycle_ms): builds a CREATE_OBJECT request with subscription-class attributes (cycle time, credit limit, reference list) — PLC pushes updates for monitored variables - delete_subscription(subscription_id): sends DELETE_OBJECT to clean up - Exposed through s7.Client with S7CommPlus requirement check All subscription methods marked experimental. The subscription protocol is modeled after S7CommPlusDriver's alarm subscription pattern, adapted for data variable monitoring. Closes #683, closes #684. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the last two 4.0 milestone features.
Diagnostic buffer (#683):
Reads SZL 0x00A0, parses 20-byte entries with BCD timestamps. Works via legacy S7 protocol.
Data change subscriptions (#684, experimental):
Creates subscription objects via S7CommPlus CREATE_OBJECT. Requires S7CommPlus connection. Full notification receive loop needs real PLC testing.
Test plan
Closes #683, closes #684.
🤖 Generated with Claude Code