feat(opcua): advertise the historian raw cap as MaxReturnDataValues on source sync

Lane H1 follow-through: SyncAdvertisedAggregates now also calls
HistoryPaging.AdvertiseMaxReturnDataValues(Server, source
.MaxRawValuesPerRead) so HistoryServerCapabilities/MaxReturnDataValues
(i=11273) follows the historian source on every assignment (the Null
default advertises 0 = no limit); a false return logs a Warning (the cap
is enforced by HistoryRead regardless).

Test: NodeManagerMaxReturnDataValuesSyncTests reads i=11273 back through
the SDK master node manager after setting a capped source (7000, 250)
and after resetting to the Null source (0).

Refs #732 #736

Claude-Session: https://claude.ai/code/session_01Ub9hGmYLQvn9XETzw7CMsT
This commit is contained in:
Joseph Doherty
2026-10-22 10:45:24 -04:00
parent 8a1116e658
commit be22b48b1d
2 changed files with 76 additions and 0 deletions
@@ -458,6 +458,15 @@ public sealed class OtOpcUaNodeManager : CustomNodeManager2
advertised.Count, source.GetType().Name,
string.Join(", ", advertised.Select(id => AggregateFunctionMap.Map(id)?.ToString() ?? id.ToString())));
}
// #736: HistoryServerCapabilities/MaxReturnDataValues (i=11273) carries the source's raw-page cap
// (0 = unlimited), re-synced on every source assignment like the aggregate set above.
if (!HistoryPaging.AdvertiseMaxReturnDataValues(Server, source.MaxRawValuesPerRead))
{
_logger.LogWarning(
"OtOpcUaNodeManager: could not advertise HistoryServerCapabilities/MaxReturnDataValues ({Cap}) for historian {Source}; the cap is still enforced by HistoryRead",
source.MaxRawValuesPerRead, source.GetType().Name);
}
}
catch (Exception ex)
{