mirror of
				https://gitee.com/ThingsGateway/ThingsGateway.git
				synced 2025-11-04 17:43:58 +08:00 
			
		
		
		
	OPCUAClient添加是否使用SourceTime的选项
This commit is contained in:
		@@ -257,8 +257,11 @@ public class OPCUAClient : CollectBase
 | 
			
		||||
                value = data.jToken;
 | 
			
		||||
            }
 | 
			
		||||
            var quality = StatusCode.IsGood(data.dataValue.StatusCode);
 | 
			
		||||
 | 
			
		||||
            var time = data.dataValue.SourceTimestamp.ToLocalTime();
 | 
			
		||||
            DateTime time = default;
 | 
			
		||||
            if (driverPropertys.SourceTimestampEnable)
 | 
			
		||||
            {
 | 
			
		||||
                time = data.dataValue.SourceTimestamp.ToLocalTime();
 | 
			
		||||
            }
 | 
			
		||||
            foreach (var item in itemReads)
 | 
			
		||||
            {
 | 
			
		||||
                if (item.DataTypeEnum == DataTypeEnum.Object)
 | 
			
		||||
 
 | 
			
		||||
@@ -43,6 +43,11 @@ public class OPCUAClientProperty : CollectDriverPropertyBase
 | 
			
		||||
    [DeviceProperty("安全策略", "True为使用安全策略,False为无")]
 | 
			
		||||
    public bool IsUseSecurity { get; set; } = true;
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// 是否使用SourceTime
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    [DeviceProperty("使用SourceTime", "")]
 | 
			
		||||
    public bool SourceTimestampEnable { get; set; } = true;
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// 激活订阅
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user