www.pudn.com > Modbus.rar > dataStruct.cs, change:2013-04-09,size:839b


using System; 
using System.Collections.Generic; 
 
using System.Text; 
using System.Runtime.InteropServices; 
 
namespace Modbus数据采集工具 
{ 
    class TAG 
    { 
        public  int modAdd; 
        public TAG_TYPE tagType; 
        public int length; 
        public Type type; 
        public string ip; 
        public int port; 
        public byte slaveAddress; 
        public object value;      
    } 
    enum TAG_TYPE 
    { 
        coilstatus, 
        inputStatus, 
        holdingregister, 
        inputregister, 
        other 
    } 
 
    //注意这个属性不能少 
     [StructLayoutAttribute(LayoutKind.Sequential,CharSet=CharSet.Ansi,Pack=1)] 
    struct E_REALTIME 
    { 
        public uint srcIP; 
        public uint dstIP; 
        public int farmID; 
        public uint nLen;  
     } 
 
}