feat(mtconnect): parse the write.enabled config block

This commit is contained in:
Joseph Doherty
2026-08-05 06:13:30 -04:00
parent e784545844
commit b5e39e1f32
4 changed files with 94 additions and 0 deletions
@@ -2276,6 +2276,13 @@ public sealed class MTConnectDriver : IDriver, IReadable, ISubscribable, ITagDis
MaxBackoffMs = dto.Reconnect?.MaxBackoffMs ?? 30_000,
BackoffMultiplier = dto.Reconnect?.BackoffMultiplier ?? 2.0,
},
// Absent block == disabled: write-back is opt-in, and the agent's own AllowPut has to be
// on as well, so neither layer can arm the other by omission.
Write = new MTConnectWriteOptions
{
Enabled = dto.Write?.Enabled ?? false,
},
};
}
@@ -3272,6 +3279,7 @@ public sealed class MTConnectDriver : IDriver, IReadable, ISubscribable, ITagDis
public List<RawTagEntry>? RawTags { get; init; }
public MTConnectProbeDto? Probe { get; init; }
public MTConnectReconnectDto? Reconnect { get; init; }
public MTConnectWriteDto? Write { get; init; }
}
/// <summary>
@@ -3347,4 +3355,10 @@ public sealed class MTConnectDriver : IDriver, IReadable, ISubscribable, ITagDis
public int? MaxBackoffMs { get; init; }
public double? BackoffMultiplier { get; init; }
}
/// <summary>Write-back knobs — the driver-side half of the two-layer opt-in on observation injection.</summary>
private sealed class MTConnectWriteDto
{
public bool? Enabled { get; init; }
}
}