Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="commType">通讯接口</param>
        /// <param name="deviceAddress">通讯地址</param>
        public DeviceManager(DeviceCommInterface commType, string deviceAddress)
        {
            DevicePKID = DeviceHelper.GetNewPKID();

            CommParam = new DeviceCommParam(DevicePKID.ToString(), commType, deviceAddress);  //设备通讯信息

            DeviceCores = new List <IDeviceCore>();
        }
Esempio n. 2
0
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="devicePKNO">设备PKNO,正常采集用AssetCode</param>
        /// <param name="commType">通讯类型 1:Fanuc CNC;21:OPC DA;22:OPC UA;30:自定义TCP;31:Modbus TCP;100:数据库;</param>
        /// <param name="deviceAddress">通讯地址</param>
        /// <param name="updateRate">更新率ms;为SamplingPeriod</param>
        public DeviceManager(string devicePKNO, DeviceCommInterface commType, string deviceAddress,
                             int updateRate = 1000)
        {
            DevicePKID = DeviceHelper.GetNewPKID();                                             //PKID

            DevicePKNO = string.IsNullOrEmpty(devicePKNO) ? DevicePKID.ToString() : devicePKNO; //PKNO

            CommParam = new DeviceCommParam(DevicePKNO, commType, deviceAddress, updateRate);   //设备通讯信息

            DeviceCores = new List <IDeviceCore>();
        }