Example #1
0
 public DBModbusID()
 {
     devId    = 0;
     pointId  = 0;
     type     = UpDataBase.RTWriteProxy.MType.AI;
     dateTime = DateTime.Now;
 }
 public ModbusRegister()
 {
     equId    = 0;
     resId    = 0;
     devId    = 0;
     resValue = 0;
     pointId  = 0;
     type     = UpDataBase.RTWriteProxy.MType.AI;
     dateTime = DateTime.Now;
 }
Example #3
0
 public DataPoint()
 {
     _equipId    = 0;
     _resId      = 0;
     _dataType   = typeof(UInt16);
     _devId      = 0;
     _type       = UpDataBase.RTWriteProxy.MType.AI;
     _pointId    = 0;
     _pointValue = null;
     _dateTime   = DateTime.Now;
 }
        public ModbusRegister(int equiId, int registerId, int ponId, string strType)
        {
            equId    = equiId;
            resId    = registerId;
            devId    = 0;
            resValue = 0;
            pointId  = ponId;
            switch (strType)
            {
            case  "AI":
            {
                type = UpDataBase.RTWriteProxy.MType.AI;
                break;
            }

            case "DI":
            {
                type = UpDataBase.RTWriteProxy.MType.DI;
                break;
            }

            case "AO":
            {
                type = UpDataBase.RTWriteProxy.MType.AO;
                break;
            }

            case "DO":
            {
                type = UpDataBase.RTWriteProxy.MType.DO;
                break;
            }

            case "ACC":
            {
                type = UpDataBase.RTWriteProxy.MType.ACC;
                break;
            }
            }
            dateTime = DateTime.Now;
        }
Example #5
0
        public IDModel(int idDev, string myType, int idPoint)
        {
            devID   = idDev;
            pointID = idPoint;

            switch (myType.Trim())
            {
            case "AI":
            {
                type = UpDataBase.RTWriteProxy.MType.AI;
                break;
            }

            case "DI":
            {
                type = UpDataBase.RTWriteProxy.MType.DI;
                break;
            }

            case "AO":
            {
                type = UpDataBase.RTWriteProxy.MType.AO;
                break;
            }

            case "DO":
            {
                type = UpDataBase.RTWriteProxy.MType.DO;
                break;
            }

            case "ACC":
            {
                type = UpDataBase.RTWriteProxy.MType.ACC;
                break;
            }
            } //switch
        }
Example #6
0
        public DataPoint(int equipId, int resId, string strDataType, int devId, string strType, int pointId)
        {
            _equipId    = equipId;
            _resId      = resId;
            _devId      = devId;
            _pointId    = pointId;
            _pointValue = null;
            _dateTime   = DateTime.Now;

            switch (strDataType.Trim())
            {
            case "U16":
            {
                _dataType = typeof(UInt16);
                break;
            }

            case "S16":
            {
                _dataType = typeof(Int16);
                break;
            }

            case "U32":
            {
                _dataType = typeof(UInt32);
                break;
            }

            case "S32":
            {
                _dataType = typeof(Int32);
                break;
            }

            case "F32":
            {
                _dataType = typeof(Single);
                break;
            }

            case "Bit":
            {
                _dataType = typeof(Boolean);
                break;
            }
            }

            switch (strType)
            {
            case "AI":
            {
                _type = UpDataBase.RTWriteProxy.MType.AI;
                break;
            }

            case "DI":
            {
                _type = UpDataBase.RTWriteProxy.MType.DI;
                break;
            }

            case "AO":
            {
                _type = UpDataBase.RTWriteProxy.MType.AO;
                break;
            }

            case "DO":
            {
                _type = UpDataBase.RTWriteProxy.MType.DO;
                break;
            }

            case "ACC":
            {
                _type = UpDataBase.RTWriteProxy.MType.ACC;
                break;
            }
            }
        }
Example #7
0
 public IDModel(int idDev, UpDataBase.RTWriteProxy.MType myType, int idPoint)
 {
     devID   = idDev;
     type    = myType;
     pointID = idPoint;
 }
Example #8
0
 public IDModel()
 {
     devID   = 0;
     type    = UpDataBase.RTWriteProxy.MType.AI;
     pointID = 0;
 }