在 AiVideo 中能看到图像

增加了在线状态同步逻辑
This commit is contained in:
2026-01-09 12:30:36 +08:00
parent 3d47c8f009
commit 3351ae739e
31 changed files with 1090 additions and 477 deletions

View File

@@ -1,16 +1,27 @@
namespace SHH.Contracts
using MessagePack;
namespace SHH.Contracts
{
/// <summary>
/// 通用指令执行结果 (Response)
/// </summary>
[MessagePackObject]
public class CommandResult
{
#region --- 0. ---
[Key(0)]
public string Protocol { get; set; } = "COMMAND_RESULT";
#endregion
#region --- ---
/// <summary>
/// 回执 ID (必须与请求包的 RequestId 一致)
/// <para>客户端靠这个 ID 来找到对应的 await Task</para>
/// </summary>
[Key(1)]
public string RequestId { get; set; }
#endregion
@@ -20,17 +31,20 @@
/// <summary>
/// 执行是否成功
/// </summary>
[Key(2)]
public bool Success { get; set; }
/// <summary>
/// 结果消息 (成功提示或错误原因)
/// </summary>
[Key(3)]
public string Message { get; set; }
/// <summary>
/// 返回的数据 (JSON 或 Base64 字符串)
/// <para>示例: 截图的 Base64或者查询到的设备列表 JSON</para>
/// </summary>
[Key(4)]
public string Data { get; set; }
#endregion
@@ -42,10 +56,17 @@
/// <para>从客户端发出指令,到收到服务端回执的总时长</para>
/// <para>注意:该字段由客户端收到回执后自动计算填充,服务端不需要赋值</para>
/// </summary>
[Key(5)]
public double ElapsedMilliseconds { get; set; }
#endregion
/// <summary>
/// 时间戳
/// </summary>
[Key(6)]
public long Timestamp { get; set;}
#region --- ---
/// <summary>