[master378] Send the filtered retain trailing event with a client specific Retain = false - #4454
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master378 #4454 +/- ##
=============================================
- Coverage 60.35% 60.35% -0.01%
=============================================
Files 378 379 +1
Lines 79155 79181 +26
Branches 13850 13853 +3
=============================================
+ Hits 47777 47788 +11
- Misses 26961 26976 +15
Partials 4417 4417
🚀 New features to boost your workflow:
|
…cific Retain = false Backport of #4453. With SupportsFilteredRetain the trailing event a condition produces on its way out of a client's where clause was delivered with the server's Retain value, usually true, so a client following Part 9 kept an alarm it should have dropped. Part 9, 5.5.2 (Figure 11) and the "Retain sent" column of Table B.3 require that event to carry Retain = false. CanSendFilteredAlarm now reports the trailing event through an out parameter, and for that event the fields are read through a decorator that returns false for the Retain clause. The shared snapshot is left untouched so other subscriptions still see the server's value, and the queued event keeps the original handle for duplicate detection. Fixes #4449 for 1.5.378 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
marcschier
approved these changes
Sep 8, 2026
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.
Description
Backport of #4453 to the 1.5.378 line.
When
SupportsFilteredRetainis true and a condition drops out of a client's where clause, the server sends one trailing event to that client. Before this change the trailing event carried the condition's realRetainvalue, typicallytrue, so a spec-following client kept an alarm on its display that it should have dropped. OPC 10000-9, 5.5.2 (Figure 11) and the "Retain sent" column of Table B.3 require that event to be sent with a client specificRetain = false.The value is per client and per filter, so it is applied inside the monitored item:
CanSendFilteredAlarmgains anout bool overrideRetainparameter that istrueonly for the trailing out-of-scope event. The protected signature is changed in place rather than overloaded.FilteredRetainTargetdecorator. It delegates everything to the originalIFilterTargetand returnsfalsefor aRetainvalue clause the target actually resolves. A clause the type check rejects stays null so the field list keeps its shape.InstanceStateSnapshotthatReportEventfans out to every monitored item is never touched, so other subscriptions whose filter the condition still passes keep receiving the server's real value. The queuedEventFieldListkeeps the original instance as itsHandle, so reference-based duplicate detection and node manager handle lookups are unaffected.Differences from the master change: this branch has neither the #4377 filtered-retain rework nor
docs/AlarmsAndConditions.md, so the decorator is written against theobject-basedIFilterTargetof this line, the existing tracking logic is left as it is, and there is no documentation change. The reflection-based test helper reads the new out parameter back from the argument array.Tests added in
FilterRetainTests:Retain = false, the still-passing client receivestrue, and the snapshot itself still reportstrue;Retainclause stays null;Related Issues
Checklist
🤖 Generated with Claude Code