using System;
using System.Collections.Generic;
using System.Text;

namespace Mesnac.Basic
{
    [Serializable]
    public class DeviceManage
    {
        private string _rtuaddr = "1";
        private string _rtucom = "COM1";
        private string devivename;
        private string deviceaddr;
        private string devinfo;
        private string rename;
        private int refreshtime = 1000;
        private UInt32 _Baud = 9600;
        private uint _databit = 8;
        private uint _stopbit = 1;
        private uint _checkbit = 0;
        private List<Variable> varlist;
        public DeviceManage()
        {
            AllVarList = new List<Variable>();
            DeviceName = "";
            DeviceAddr = "";
            Rename = "";
        }
        public string ComPort
        {
            get
            {
                return _rtucom;
            }
            set
            {
                _rtucom = value;
            }
        }
        public string RtuAddr
        {
            get
            {
                return _rtuaddr;
            }
            set
            {
                _rtuaddr = value;
            }
        }
        public UInt32 BaudRate
        {
            get
            {
                return _Baud;
            }
            set
            {
                _Baud = value;
            }
        }
        public uint Databits
        {
            get
            {
                return _databit;
            }
            set
            {
                _databit = value;
            }
        }
        public uint Stopbit
        {
            get
            {
                return _stopbit;
            }
            set
            {
                _stopbit = value;
            }
        }
        public uint Parity
        {
            get
            {
                return _checkbit;
            }
            set
            {
                _checkbit = value;
            }
        }
        #region device difine
        public string Devinfo
        {
            get
            {
                return devinfo;
            }
            set
            {
                devinfo = value;
            }
        }
        public string Rename
        {
            get
            {
                return rename;
            }
            set
            {
                rename = value;
            }
        }
        public List<Variable> AllVarList
        {
            get
            {
                return varlist;
            }
            set
            {
                varlist = value;
            }
        }
        public string DeviceName
        {
            get
            {
                return devivename;
            }
            set
            {
                devivename = value;
            }
        }

        public string DeviceAddr
        {
            get
            {
                return deviceaddr;

            }
            set
            {
                deviceaddr = value;
            }
        }
        public int RefreshTime
        {
            get
            {
                return refreshtime;
            }
            set
            {
                refreshtime = value;
            }
        }

        #endregion
    }
}