30 lines
1.2 KiB
C#
30 lines
1.2 KiB
C#
|
|
namespace SSPCTester.Devices.Interfaces;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 固态功率控制器(SSPC,被测设备)抽象接口。
|
|||
|
|
/// 提供 24 路开关控制。
|
|||
|
|
/// </summary>
|
|||
|
|
public interface ISspc : IDeviceConnection
|
|||
|
|
{
|
|||
|
|
/// <summary>通道总数(本项目为 24)。</summary>
|
|||
|
|
int ChannelCount { get; }
|
|||
|
|
|
|||
|
|
/// <summary>导通指定物理插位(1~24)。</summary>
|
|||
|
|
Task TurnOnAsync(int physicalSlot, CancellationToken ct = default);
|
|||
|
|
|
|||
|
|
/// <summary>关断指定通道。</summary>
|
|||
|
|
Task TurnOffAsync(int physicalSlot, CancellationToken ct = default);
|
|||
|
|
|
|||
|
|
/// <summary>短暂导通(闪开),指定毫秒后自动关断。</summary>
|
|||
|
|
Task FlashAsync(int physicalSlot, int milliseconds, CancellationToken ct = default);
|
|||
|
|
|
|||
|
|
/// <summary>查询指定通道当前是否导通。</summary>
|
|||
|
|
Task<bool> GetChannelStateAsync(int physicalSlot, CancellationToken ct = default);
|
|||
|
|
|
|||
|
|
/// <summary>读取指定物理插位的电压和电流。</summary>
|
|||
|
|
Task<ChannelMeasurement> ReadMeasurementAsync(int physicalSlot, CancellationToken ct = default);
|
|||
|
|
|
|||
|
|
/// <summary>整帧读取并返回物理插位 1~24 的电压和电流。</summary>
|
|||
|
|
Task<IReadOnlyList<ChannelMeasurement>> ReadMeasurementsAsync(CancellationToken ct = default);
|
|||
|
|
}
|