| 12345678910111213141516171819 |
- using Newtonsoft.Json;
- namespace IvfTl.ControlHost
- {
- /// <summary>
- /// control 本地 HTTP /ping、/status 的返回体(阶段1:基础存活 + 现有快照占位)。
- /// 监控补全(各舱实时活动/线程心跳/串口借用)在阶段2 扩展。
- /// </summary>
- public class StatusDto
- {
- [JsonProperty("ok")] public bool Ok { get; set; }
- [JsonProperty("pid")] public int Pid { get; set; }
- [JsonProperty("tlSn")] public string TlSn { get; set; } = "";
- [JsonProperty("started")] public bool Started { get; set; }
- public static StatusDto Ping(int pid, string tlSn) =>
- new StatusDto { Ok = true, Pid = pid, TlSn = tlSn ?? "" };
- }
- }
|