SSPC-Tester/SSPCTester.Devices/Drivers/Real/RealDrivers.cs
2026-06-30 12:10:29 +08:00

36 lines
2.2 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using SSPCTester.Devices.Interfaces;
namespace SSPCTester.Devices.Drivers.Real;
/// <summary>真实电源 UDP5080 驱动占位。</summary>
public sealed class Udp5080Placeholder : IPowerSupply
{
public bool IsConnected => false;
public string DisplayName => "电源 UDP5080";
public event EventHandler<bool>? ConnectionChanged;
public Task<bool> 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<(double volts, double amps)> ReadAsync(CancellationToken ct = default) => throw new NotImplementedException();
public Task<string> QueryIdentityAsync(CancellationToken ct = default) => throw new NotImplementedException();
private void Raise(bool s) => ConnectionChanged?.Invoke(this, s);
}
/// <summary>真实负载 IT8733P/IT8702P 驱动占位。</summary>
internal sealed class It87xxLoadPlaceholder
{
public bool IsConnected => false;
public string DisplayName => "负载IT8702P+IT8733P";
public event EventHandler<bool>? ConnectionChanged;
public Task<bool> 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);
}