feat(commons): batched WriteValues on the address-space sink

This commit is contained in:
Joseph Doherty
2026-08-15 12:09:27 -04:00
parent 1320f3fa08
commit bb3ccf264b
4 changed files with 155 additions and 1 deletions
@@ -26,6 +26,12 @@ public sealed class DeferredAddressSpaceSink : IOpcUaAddressSpaceSink, ISurgical
public void WriteValue(string nodeId, object? value, uint statusCode, DateTime sourceTimestampUtc, AddressSpaceRealm realm)
=> _inner.WriteValue(nodeId, value, statusCode, sourceTimestampUtc, realm);
/// <inheritdoc />
// Forward the batch to the inner sink. Without this the interface's default per-item loop runs here and
// the one-lock-per-batch win is silently degraded back to one lock per value on every driver-role host
// (actors inject THIS wrapper, not the inner SdkAddressSpaceSink) — same trap as WireAlarmNotifiers above.
public void WriteValues(IReadOnlyList<ValueWrite> values) => _inner.WriteValues(values);
/// <inheritdoc />
public void WriteAlarmCondition(string alarmNodeId, AlarmConditionSnapshot state, DateTime sourceTimestampUtc, AddressSpaceRealm realm)
=> _inner.WriteAlarmCondition(alarmNodeId, state, sourceTimestampUtc, realm);