| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- 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; }
- /// <summary>
- /// 1:ValueBit
- /// 2:Int32
- /// 3:Double
- /// </summary>
- 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;
- }
- }
- }
|