36 lines
2.2 KiB
C#
36 lines
2.2 KiB
C#
|
|
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);
|
|||
|
|
}
|
|||
|
|
|