using System; using APS7100TestTool.Models; namespace APS7100TestTool.Controllers { /// /// 可编程电源控制器接口 /// public interface IPowerSupplyController { #region 设备信息 DeviceType DeviceType { get; } DeviceInfo DeviceInfo { get; } #endregion #region 基本操作 /// /// 获取设备识别信息 /// string GetIdentification(); /// /// 重置设备 /// void Reset(); /// /// 清除状态 /// void ClearStatus(); #endregion #region 输出控制 /// /// 设置输出开关 /// void SetOutput(bool enable); /// /// 获取输出状态 /// bool GetOutputState(); #endregion #region 电压控制 /// /// 设置输出电压 /// void SetVoltage(double voltage); /// /// 获取电压设定值 /// double GetVoltage(); #endregion #region 电流控制 /// /// 设置电流(DC电源)或电流限值(AC电源) /// void SetCurrent(double current); /// /// 获取电流设定值 /// double GetCurrent(); #endregion #region 测量 /// /// 测量实际输出电压 /// double MeasureVoltage(); /// /// 测量实际输出电流 /// double MeasureCurrent(); /// /// 测量输出功率 /// double MeasurePower(); #endregion #region 可选功能(AC电源独有) /// /// 设置频率(仅AC电源) /// void SetFrequency(double frequency); /// /// 获取频率设定值(仅AC电源) /// double GetFrequency(); /// /// 测量频率(仅AC电源) /// double MeasureFrequency(); /// /// 测量功率因数(仅AC电源) /// double MeasurePowerFactor(); /// /// 设置波形(仅AC电源) /// void SetWaveform(Waveform waveform); /// /// 获取当前波形(仅AC电源) /// Waveform GetWaveform(); /// /// 设置电压量程(仅AC电源) /// void SetVoltageRange(VoltageRange range); /// /// 获取电压量程(仅AC电源) /// VoltageRange GetVoltageRange(); #endregion #region 远程控制模式 /// /// 进入远程控制模式 /// void SetRemoteMode(); /// /// 返回本地控制模式 /// void SetLocalMode(); /// /// 锁定/解锁前面板按键 /// /// true: 锁定前面板, false: 解锁前面板 void SetPanelLock(bool locked); /// /// 查询当前是否为远程模式 /// bool IsRemoteMode(); #endregion #region 自定义命令 /// /// 发送自定义 SCPI 命令 /// void SendCustomCommand(string command); /// /// 发送自定义 SCPI 查询 /// string SendCustomQuery(string command); #endregion } }