using SSPCTester.Devices.Interfaces; namespace SSPCTester.Devices.Drivers.Real; /// 真实电源 UDP5080 驱动占位。 public sealed class Udp5080Placeholder : IPowerSupply { public bool IsConnected => false; public string DisplayName => "电源 UDP5080"; public event EventHandler? ConnectionChanged; public Task ConnectAsync(CancellationToken ct = default) => throw new NotImplementedException("Real 驱动待硬件到货后实现。"); public Task DisconnectAsync() => throw new NotImplementedException(); public Task SetVoltageAsync(double volts, CancellationToken ct = default) => throw new NotImplementedException(); public Task SetCurrentLimitAsync(double amps, CancellationToken ct = default) => throw new NotImplementedException(); public Task OutputAsync(bool on, CancellationToken ct = default) => throw new NotImplementedException(); public Task GetOutputStateAsync(CancellationToken ct = default) => throw new NotImplementedException(); public Task<(double volts, double amps)> ReadAsync(CancellationToken ct = default) => throw new NotImplementedException(); public Task QueryIdentityAsync(CancellationToken ct = default) => throw new NotImplementedException(); public Task QueryErrorAsync(CancellationToken ct = default) => throw new NotImplementedException(); private void Raise(bool s) => ConnectionChanged?.Invoke(this, s); } /// 真实负载 IT8733P/IT8702P 驱动占位。 internal sealed class It87xxLoadPlaceholder { public bool IsConnected => false; public string DisplayName => "负载:IT8702P+IT8733P"; public event EventHandler? ConnectionChanged; public Task ConnectAsync(CancellationToken ct = default) => throw new NotImplementedException("Real 驱动待硬件到货后实现。"); public Task DisconnectAsync() => throw new NotImplementedException(); public Task SetModeAsync(LoadMode mode, CancellationToken ct = default) => throw new NotImplementedException(); public Task SetValueAsync(double value, CancellationToken ct = default) => throw new NotImplementedException(); public Task InputAsync(bool on, CancellationToken ct = default) => throw new NotImplementedException(); public Task<(double volts, double amps)> ReadAsync(CancellationToken ct = default) => throw new NotImplementedException(); private void Raise(bool s) => ConnectionChanged?.Invoke(this, s); }