54 lines
2.0 KiB
C#
54 lines
2.0 KiB
C#
|
|
using System;
|
|||
|
|
using Prism.Mvvm;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Diagnostics;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
|
|||
|
|
namespace Cowain.Bake.Model.Models
|
|||
|
|
{
|
|||
|
|
public class Variable : BindableBase
|
|||
|
|
{
|
|||
|
|
public int Id { get; set; }//id
|
|||
|
|
public int PlcId { get; set; }//PLCId
|
|||
|
|
public int Index { get; set; }//索引
|
|||
|
|
public int Number { get; set; } //层号或编号
|
|||
|
|
private bool quality;//属性
|
|||
|
|
public bool Quality
|
|||
|
|
{
|
|||
|
|
get { return quality; }
|
|||
|
|
set { SetProperty(ref quality, value); }
|
|||
|
|
}
|
|||
|
|
public int OperType { get; set; }//操作类型
|
|||
|
|
public bool TrigEnable { get; set; } = false;//目标是否可用
|
|||
|
|
public string TrigJson { get; set; }//目标json
|
|||
|
|
public string ParamName { get; set; }//参数名称
|
|||
|
|
public int StationId { get; set; }//机器Id
|
|||
|
|
public string Json { get; set; }//json
|
|||
|
|
public string VarType { get; set; }//类型
|
|||
|
|
public string VarDesc { get; set; }//描述
|
|||
|
|
public string VarName { get; set; }//名称
|
|||
|
|
public int Offset { get; set; }//开关
|
|||
|
|
public string AddressType { get; set; }//地址类型
|
|||
|
|
public string Address { get; set; }//地址
|
|||
|
|
public int Bit { get; set; }//字节
|
|||
|
|
public int ArrayLength { get; set; } = 1;//数字长度
|
|||
|
|
public int TagType { get; set; }//标志类型
|
|||
|
|
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 跟数据类型相关,不同协议,不同数据类型读长度不同
|
|||
|
|
/// </summary>
|
|||
|
|
public int ReadLength { get; set; } = 1;//读取长度
|
|||
|
|
private object _curValue;
|
|||
|
|
public object CurValue { get => _curValue; set => SetProperty(ref _curValue, value); } //当前值,
|
|||
|
|
public DateTime UpLoadTime { get; set; } //采集时间,用于知道间隔时间,来判断是否存入
|
|||
|
|
public object OldValue { get; set; }
|
|||
|
|
|
|||
|
|
private object _value;
|
|||
|
|
public object Value { get => _value; set => SetProperty(ref _value, value); } //界面上显示的值
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|