2026-07-02 10:05:51 +08:00

70 lines
1.6 KiB
C#
Raw Permalink 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.

namespace YD_TrainingCompetition_Api.Options;
public sealed class HikvisionOptions
{
public const string SectionName = "Hikvision";
/// <summary>
/// 是否启用海康威视 SDK 接入
/// </summary>
public bool Enabled { get; set; } = false;
/// <summary>
/// SDK 日志目录
/// </summary>
public string SdkLogPath { get; set; } = "C:\\SdkLog\\";
/// <summary>
/// 报警数据图片分离:0-不分离(COMM_VCA_ALARM),1-分离(COMM_ISAPI_ALARM)
/// </summary>
public byte AlarmJsonPictureSeparate { get; set; } = 1;
/// <summary>
/// 报警存储最大条数
/// </summary>
public int MaxAlarmRecords { get; set; } = 200;
/// <summary>
/// 摄像头列表
/// </summary>
public List<CameraConfigItem> Cameras { get; set; } = new();
}
public sealed class CameraConfigItem
{
/// <summary>
/// 设备唯一标识
/// </summary>
public string DeviceId { get; set; } = string.Empty;
/// <summary>
/// 摄像头 IP 地址
/// </summary>
public string Ip { get; set; } = string.Empty;
/// <summary>
/// 端口号
/// </summary>
public ushort Port { get; set; } = 8000;
/// <summary>
/// 用户名
/// </summary>
public string UserName { get; set; } = "admin";
/// <summary>
/// 密码
/// </summary>
public string Password { get; set; } = string.Empty;
/// <summary>
/// 通道号
/// </summary>
public int Channel { get; set; } = 1;
/// <summary>
/// 是否启用
/// </summary>
public bool Enabled { get; set; } = true;
}