using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CoreAgent.ProtocolClient.Models
{
///
/// 协议客户端配置
///
public class ProtocolClientConfig
{
///
/// 客户端名称
///
public string Name { get; set; } = string.Empty;
///
/// 服务器地址
///
public string Address { get; set; } = string.Empty;
///
/// 是否启用
///
public bool Enabled { get; set; }
///
/// 密码
///
public string Password { get; set; } = string.Empty;
///
/// 重连延迟(毫秒)
///
public int ReconnectDelay { get; set; } = 5000;
///
/// 是否启用SSL
///
public bool Ssl { get; set; }
///
/// 日志配置
///
public ProtocolClientLogsConfig Logs { get; set; } = new();
///
/// 是否只读
///
public bool Readonly { get; set; }
///
/// 模型
///
public string Model { get; set; }
}
///
/// 协议客户端日志配置
///
public class ProtocolClientLogsConfig
{
///
/// 日志层配置
///
public Dictionary Layers { get; set; } = new();
///
/// 是否启用信号日志
///
public bool? Signal { get; set; }
///
/// 是否启用控制信道日志
///
public bool? Cch { get; set; }
}
///
/// 日志层配置
///
public class LogLayerConfig
{
///
/// 日志级别
///
[Required]
public string Level { get; set; } = "warn";
///
/// 最大大小
///
public int MaxSize { get; set; } = 1;
///
/// 是否包含负载
///
public bool Payload { get; set; } = false;
///
/// 过滤器(用于兼容性)
///
public string Filter { get; set; } = "warn";
}
}