设备命令修改

This commit is contained in:
“hsc”
2026-08-06 14:04:28 +08:00
parent 5a565f7361
commit deb3544143
143 changed files with 730494 additions and 1287 deletions
+13 -1
View File
@@ -3,6 +3,7 @@ using DeviceCommand.Base;
using Model.Models;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -10,13 +11,24 @@ using System.Threading.Tasks;
namespace DeviceCommand.Devices
{
/// <summary>
/// 水冷机 一对
/// 负载 一对
/// </summary>
[ACPCommand]
public class ANEVH80 : Tcp
{
// Chroma SCPI 默认使用 \n 作为结束符
private const string ScpiDelimiter = "\n";
public ANEVH80(TcpConfig config) : base(config)
{
}
/// <summary>
/// 占位符,可能的操作先占位
/// </summary>
public virtual async Task<double> (CancellationToken ct = default)
{
string resp = await WriteReadAsync($"MEAS:FREQ?{ScpiDelimiter}", ScpiDelimiter, ct);
return double.TryParse(resp, NumberStyles.Any, CultureInfo.InvariantCulture, out double val) ? val : 0.0;
}
}
}