提交代码
This commit is contained in:
@@ -6,9 +6,11 @@ namespace HardwareControl.Core.HardwareServiceImpl.HardwareService
|
||||
/// 定焦系统服务,封装 FocusSystem2.dll。
|
||||
///
|
||||
/// 串口在连接时从系统参数 focus_com 读取,读取不到时回退到
|
||||
/// appsettings.json 的 "FocusSystem:ComPort"。命令函数内部已完成
|
||||
/// "组包→发送→收应答",返回即表示设备已回执;运行结果与系统信息
|
||||
/// 需通过 <see cref="ReadSystemInfoAsync"/> / <see cref="ReadResultAsync"/> 查询。
|
||||
/// appsettings.json 的 "FocusSystem:ComPort"。除
|
||||
/// <see cref="FocusSingleAndWaitAsync"/> 外,命令函数内部只完成
|
||||
/// "组包→发送",返回表示命令已写入串口,并不代表设备已执行完毕;
|
||||
/// 设备应答、运行结果与系统信息需通过
|
||||
/// <see cref="ReadSystemInfoAsync"/> / <see cref="ReadResultAsync"/> 查询。
|
||||
/// 所有原生调用串行执行。
|
||||
/// </summary>
|
||||
public interface IFocusSystemService : IAsyncDisposable
|
||||
@@ -25,9 +27,20 @@ namespace HardwareControl.Core.HardwareServiceImpl.HardwareService
|
||||
|
||||
// ---------- 对焦 ----------
|
||||
|
||||
/// <summary>单次对焦。</summary>
|
||||
/// <summary>单次对焦(仅下发命令,不等待运行结果)。</summary>
|
||||
Task StartSingleFocusAsync(CancellationToken ct = default);
|
||||
|
||||
/// <summary>
|
||||
/// 执行一次单次对焦并等待设备返回结果。动态库内部已完成测距光源的
|
||||
/// 开启与关闭,无需再调用测距相关接口。
|
||||
/// 超过 <paramref name="timeout"/> 仍未返回时结果为
|
||||
/// <see cref="FocusSingleOutcome.WaitTimeout"/>。原生调用不可取消,
|
||||
/// 超时后仍会在后台执行直到动态库自行返回。
|
||||
/// </summary>
|
||||
Task<FocusSingleResult> FocusSingleAndWaitAsync(
|
||||
TimeSpan timeout,
|
||||
CancellationToken ct = default);
|
||||
|
||||
/// <summary>连续对焦。</summary>
|
||||
Task StartContinuousFocusAsync(CancellationToken ct = default);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user