using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MvvmScaffoldFrame48.Model.StorageModel.PlcParameter { public class PlcParameterModel { //public string Name { get; set; } /// /// 1:ValueBit /// 2:Int32 /// 3:Double /// public int Type { get; set; } = -1; public int Length { get; set; } = 1; public int Address { get; set; } } public class PlcValueBitParameterModel: PlcParameterModel { public int bitAddress { get; set; } public PlcValueBitParameterModel(int Address,int bitAddress) { this.Type = 1; this.Address = Address; this.bitAddress = bitAddress; } } public class PlcInt32ParameterModel:PlcParameterModel { public int MaxValue { get; set; } public int MinValue { get; set; } public PlcInt32ParameterModel(int Address) { this.Type = 2; this.Address = Address; this.Length = 2; this.MaxValue = Int32.MaxValue; this.MinValue = Int32.MinValue; } public PlcInt32ParameterModel(int Address,int MaxValue,int MinValue) { this.Type = 2; this.Address = Address; this.Length = 2; this.MaxValue = MaxValue; this.MinValue = MinValue; } } public class PlcDouble64ParameterModel : PlcParameterModel { public double MaxValue { get; set; } public double MinValue { get; set; } public PlcDouble64ParameterModel(int Address) { this.Type = 3; this.Address = Address; this.Length = 4; this.MaxValue = double.MaxValue; this.MinValue = double.MinValue; } public PlcDouble64ParameterModel(int Address,double MaxValue,double MinValue) { this.Type = 3; this.Address = Address; this.Length = 4; this.MaxValue = double.MaxValue; this.MinValue = double.MinValue; } } }