65 lines
1.6 KiB
C#
65 lines
1.6 KiB
C#
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MoviconHub.App.Models
|
|
{
|
|
/// <summary>
|
|
/// 设备状态数据模型
|
|
/// Websocket数据格式
|
|
/// </summary>
|
|
public class DeviceStatusData
|
|
{
|
|
/// <summary>
|
|
/// 设备ID
|
|
/// </summary>
|
|
[JsonProperty("device_id")]
|
|
public string DeviceId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 设备名称
|
|
/// </summary>
|
|
[JsonProperty("device_name")]
|
|
public string DeviceName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 设备状态(开启/关闭/运行中/待机)
|
|
/// </summary>
|
|
[JsonProperty("status")]
|
|
public string Status { get; set; }
|
|
|
|
/// <summary>
|
|
/// 电压值
|
|
/// </summary>
|
|
[JsonProperty("voltage")]
|
|
public double Voltage { get; set; }
|
|
|
|
/// <summary>
|
|
/// 电流值
|
|
/// </summary>
|
|
[JsonProperty("current")]
|
|
public double Current { get; set; }
|
|
|
|
/// <summary>
|
|
/// 温度值
|
|
/// </summary>
|
|
[JsonProperty("temperature")]
|
|
public double Temperature { get; set; }
|
|
|
|
/// <summary>
|
|
/// 其他自定义状态参数
|
|
/// </summary>
|
|
[JsonProperty("parameters")]
|
|
public Dictionary<string, object> Parameters { get; set; } = new Dictionary<string, object>();
|
|
|
|
/// <summary>
|
|
/// 记录时间
|
|
/// </summary>
|
|
[JsonProperty("record_time")]
|
|
public DateTime RecordTime { get; set; } = DateTime.Now;
|
|
}
|
|
}
|