Files

20 lines
544 B
C#
Raw Permalink Normal View History

2026-01-01 22:40:32 +08:00
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace SHH.CameraDashboard;
public class PtzControlDto
{
// 确保将枚举序列化为字符串 (如 "Up") 而不是数字
[JsonConverter(typeof(StringEnumConverter))]
public PtzAction Action { get; set; }
// 是否是停止指令 (true=停止当前动作)
public bool Stop { get; set; }
// 速度 (1-10)
public int Speed { get; set; } = 5;
// 持续时间 (毫秒),用于点动模式 (如雨刷)
public int Duration { get; set; } = 0;
}