@@ -26,6 +26,20 @@ public abstract class FocasCommandBase : DriverCommandBase
|
||||
[CommandOption("timeout-ms", Description = "Per-operation timeout in ms (default 2000).")]
|
||||
public int TimeoutMs { get; init; } = 2000;
|
||||
|
||||
/// <summary>
|
||||
/// Plan PR F4-d (issue #271) — optional CNC connection-level password emitted
|
||||
/// via <c>cnc_wrunlockparam</c> on connect. Required only by controllers that
|
||||
/// gate <c>cnc_wrparam</c> + selected reads behind a password switch.
|
||||
/// PASSWORD INVARIANT: never logged. The CLI's Serilog config does not
|
||||
/// include this option in any console / file destructure; the redaction is
|
||||
/// enforced at the <see cref="FocasDeviceOptions"/> layer (record's
|
||||
/// overridden <c>ToString</c>).
|
||||
/// </summary>
|
||||
[CommandOption("cnc-password", Description =
|
||||
"Optional CNC connection password emitted via cnc_wrunlockparam on connect. " +
|
||||
"Required by controllers that gate parameter writes behind a password switch.")]
|
||||
public string? CncPassword { get; init; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public override TimeSpan Timeout
|
||||
{
|
||||
@@ -51,7 +65,12 @@ public abstract class FocasCommandBase : DriverCommandBase
|
||||
Devices = [new FocasDeviceOptions(
|
||||
HostAddress: HostAddress,
|
||||
DeviceName: $"cli-{CncHost}:{CncPort}",
|
||||
Series: Series)],
|
||||
Series: Series,
|
||||
OverrideParameters: null,
|
||||
// PR F4-d (issue #271) — thread the CLI's --cnc-password through to
|
||||
// the driver. Null when the operator didn't supply the flag — the
|
||||
// driver short-circuits the unlock call in that case.
|
||||
Password: CncPassword)],
|
||||
Tags = tags,
|
||||
Timeout = Timeout,
|
||||
Probe = new FocasProbeOptions { Enabled = false },
|
||||
|
||||
Reference in New Issue
Block a user