2021-12-12 14:55:48 +08:00
|
|
|
|
using PluginInterface;
|
|
|
|
|
using System;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2023-04-12 23:40:00 +08:00
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using Newtonsoft.Json.Converters;
|
2021-12-12 14:55:48 +08:00
|
|
|
|
using WalkingTec.Mvvm.Core;
|
|
|
|
|
|
|
|
|
|
namespace IoTGateway.Model
|
|
|
|
|
{
|
|
|
|
|
public class DeviceVariable : TopBasePoco, IVariable
|
|
|
|
|
{
|
|
|
|
|
[Display(Name = "变量名")]
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
[Display(Name = "描述")]
|
|
|
|
|
public string Description { get; set; }
|
|
|
|
|
|
|
|
|
|
[Display(Name = "方法")]
|
|
|
|
|
public string Method { get; set; }
|
|
|
|
|
|
|
|
|
|
[Display(Name = "地址")]
|
|
|
|
|
public string DeviceAddress { get; set; }
|
|
|
|
|
|
2021-12-17 15:51:25 +08:00
|
|
|
|
[Display(Name = "类型")]
|
2022-12-06 22:39:28 +08:00
|
|
|
|
public DataTypeEnum DataType { get; set; }
|
|
|
|
|
|
|
|
|
|
[Display(Name = "大小端")]
|
|
|
|
|
public EndianEnum EndianType { get; set; }
|
2021-12-12 14:55:48 +08:00
|
|
|
|
|
2021-12-17 15:51:25 +08:00
|
|
|
|
[Display(Name = "表达式")]
|
|
|
|
|
public string Expressions { get; set; }
|
2021-12-12 14:55:48 +08:00
|
|
|
|
|
2023-04-12 23:40:00 +08:00
|
|
|
|
[Display(Name = "上传")]
|
|
|
|
|
public bool IsUpload { get; set; }
|
|
|
|
|
|
2021-12-12 14:55:48 +08:00
|
|
|
|
[Display(Name = "权限")]
|
|
|
|
|
public ProtectTypeEnum ProtectType { get; set; }
|
|
|
|
|
|
2022-08-25 08:59:49 +08:00
|
|
|
|
[Display(Name = "排序")]
|
|
|
|
|
public uint Index { get; set; }
|
|
|
|
|
|
2022-08-21 22:01:32 +08:00
|
|
|
|
[Newtonsoft.Json.JsonIgnore]
|
2021-12-12 14:55:48 +08:00
|
|
|
|
public Device Device { get; set; }
|
2022-03-22 22:35:33 +08:00
|
|
|
|
[Display(Name = "设备")]
|
2021-12-12 14:55:48 +08:00
|
|
|
|
public Guid? DeviceId { get; set; }
|
2023-04-12 23:40:00 +08:00
|
|
|
|
|
|
|
|
|
[Display(Name = "别名")]
|
|
|
|
|
public string Alias { get; set; }
|
|
|
|
|
|
|
|
|
|
[NotMapped]
|
|
|
|
|
[Display(Name = "原值")]
|
|
|
|
|
public object Value { get; set; }
|
|
|
|
|
[NotMapped]
|
|
|
|
|
[Display(Name = "值")]
|
|
|
|
|
public object CookedValue { get; set; }
|
|
|
|
|
[NotMapped]
|
|
|
|
|
public string Message { get; set; }
|
|
|
|
|
[NotMapped]
|
|
|
|
|
[Display(Name = "更新时间")]
|
|
|
|
|
public DateTime Timestamp { get; set; }
|
|
|
|
|
[NotMapped]
|
|
|
|
|
[Display(Name = "状态")]
|
|
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
|
|
|
|
public VaribaleStatusTypeEnum StatusType { get; set; } = VaribaleStatusTypeEnum.UnKnow;
|
2021-12-12 14:55:48 +08:00
|
|
|
|
}
|
|
|
|
|
}
|