Files
Ayay/SHH.CameraSdk/Controllers/Dto/SubscriptionDto.cs

31 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.ComponentModel.DataAnnotations;
namespace SHH.CameraSdk;
// ==============================================================================
// 2. 订阅策略 DTO (对应 A/B/C/D 进程需求)
// 用于多进程帧需求的注册与更新,支持显示帧和分析帧的独立配置
// ==============================================================================
public class SubscriptionDto
{
/// <summary>
/// 进程唯一标识 (如 "AI_Process_01"、"Main_Display_02")
/// </summary>
[Required(ErrorMessage = "进程标识 AppId 不能为空")]
[MaxLength(50, ErrorMessage = "AppId 长度不能超过 50 个字符")]
public string AppId { get; set; } = string.Empty;
/// <summary>
/// 显示帧率需求 (单位: fps)
/// <para>不需要显示则设为 0控制器会自动注销该类型需求</para>
/// </summary>
[Range(0, 60, ErrorMessage = "显示帧率需在 0-60 fps 范围内")]
public int DisplayFps { get; set; }
/// <summary>
/// 分析帧率需求 (单位: fps)
/// <para>不需要分析则设为 0控制器会自动注销该类型需求</para>
/// </summary>
[Range(0, 30, ErrorMessage = "分析帧率需在 0-30 fps 范围内")]
public int AnalysisFps { get; set; }
}