You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.5 KiB
67 lines
1.5 KiB
namespace CoreAgent.Domain.Models.System;
|
|
|
|
/// <summary>
|
|
/// 应用程序配置
|
|
/// </summary>
|
|
public class AppSettings
|
|
{
|
|
/// <summary>
|
|
/// 临时目录路径
|
|
/// </summary>
|
|
public string TempDirectory { get; set; } = "/tmp/";
|
|
|
|
/// <summary>
|
|
/// RAN配置目录路径
|
|
/// </summary>
|
|
public string RanConfigDirectory { get; set; } = "/root/enb/config/config_ran/";
|
|
|
|
/// <summary>
|
|
/// MME配置目录路径
|
|
/// </summary>
|
|
public string MmeConfigDirectory { get; set; } = "/root/mme/config/";
|
|
|
|
/// <summary>
|
|
/// WebSocket JavaScript文件路径
|
|
/// </summary>
|
|
public string WebSocketJsPath { get; set; } = "/root/enb/doc/ws.js";
|
|
|
|
/// <summary>
|
|
/// WebSocket 命令配置
|
|
/// </summary>
|
|
public WebSocketCommandSettings WebSocketCommands { get; set; } = new();
|
|
|
|
/// <summary>
|
|
/// 网络状态检查超时时间(秒)
|
|
/// </summary>
|
|
public int NetworkStatusCheckTimeout { get; set; } = 30;
|
|
}
|
|
|
|
/// <summary>
|
|
/// WebSocket 命令配置
|
|
/// </summary>
|
|
public class WebSocketCommandSettings
|
|
{
|
|
/// <summary>
|
|
/// 状态检查命令
|
|
/// </summary>
|
|
public WebSocketCommand Stats { get; set; } = new()
|
|
{
|
|
Message = "stats"
|
|
};
|
|
}
|
|
|
|
/// <summary>
|
|
/// WebSocket 命令
|
|
/// </summary>
|
|
public class WebSocketCommand
|
|
{
|
|
/// <summary>
|
|
/// 消息类型
|
|
/// </summary>
|
|
public string Message { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// 转换为 JSON 字符串
|
|
/// </summary>
|
|
public string ToJson() => $"{{\"message\":\"{Message}\"}}";
|
|
}
|