SSPC-Tester/SSPCTester.Devices/Interfaces/ISspc.cs
2026-06-30 12:10:29 +08:00

30 lines
1.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.

namespace SSPCTester.Devices.Interfaces;
/// <summary>
/// 固态功率控制器SSPC被测设备抽象接口。
/// 提供 24 路开关控制。
/// </summary>
public interface ISspc : IDeviceConnection
{
/// <summary>通道总数(本项目为 24。</summary>
int ChannelCount { get; }
/// <summary>导通指定物理插位124。</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>整帧读取并返回物理插位 124 的电压和电流。</summary>
Task<IReadOnlyList<ChannelMeasurement>> ReadMeasurementsAsync(CancellationToken ct = default);
}