namespace YunDa.Server.ISMSTcp.Configuration
{
///
/// ISMS服务器连接配置
///
public class ISMSServerConfiguration
{
///
/// 服务器IP地址
///
public string ServerIP { get; set; } = "192.168.65.33";
///
/// 服务器端口
///
public int ServerPort { get; set; } = 43916;
///
/// 重连延迟时间(秒)
///
public int ReconnectDelaySeconds { get; set; } = 5;
///
/// 最大重试次数
///
public int MaxRetries { get; set; } = 10;
///
/// 不完整数据超时时间(秒)
///
public int IncompleteDataTimeoutSeconds { get; set; } = 5;
///
/// 缓冲区大小
///
public int BufferSize { get; set; } = 1024;
///
/// 是否启用心跳检测
///
public bool EnableHeartbeat { get; set; } = true;
///
/// 是否启用自动连接
///
public bool EnableAutoConnect { get; set; } = true;
///
/// 自动连接延迟时间(秒)
///
public int AutoConnectDelaySeconds { get; set; } = 3;
///
/// 连接超时时间(秒)
///
public int ConnectionTimeoutSeconds { get; set; } = 30;
///
/// 是否启用连接重试
///
public bool EnableConnectionRetry { get; set; } = true;
///
/// 心跳检测间隔(秒)
///
public int HeartbeatIntervalSeconds { get; set; } = 30;
///
/// 心跳超时时间(秒)
///
public int HeartbeatTimeoutSeconds { get; set; } = 10;
///
/// 心跳测试消息
///
public string HeartbeatMessage { get; set; } = "HEARTBEAT_PING";
}
///
/// Web API配置
///
public class WebApiConfiguration
{
///
/// Web API端口
///
public int Port { get; set; } = 56670;
///
/// 查询超时时间(秒)
///
public int QueryTimeoutSeconds { get; set; } = 180;
///
/// 是否启用CORS
///
public bool EnableCors { get; set; } = true;
///
/// 允许的来源
///
public string[] AllowedOrigins { get; set; } = { "*" };
///
/// 报警数据上传端点
///
public string AlarmEndpoint { get; set; } = "http://localhost:38090/api/services/SOMS/AlarmLiveData/UploadISMSAlarmMsg";
}
}