mirror of
https://github.com/ThingsGateway/ThingsGateway.git
synced 2026-10-29 04:16:49 +08:00
添加上传插件获取采集设备属性值的快捷方法
This commit is contained in:
@@ -110,6 +110,19 @@ public abstract class UpLoadBase : DriverBase
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取设备的属性值
|
||||
/// </summary>
|
||||
public virtual string GetDevicePropertyValue(CollectDeviceRunTime collectDeviceRunTime, string propertyName)
|
||||
{
|
||||
|
||||
if (collectDeviceRunTime == null)
|
||||
return null;
|
||||
return collectDeviceRunTime.DevicePropertys.FirstOrDefault(a => a.PropertyName == propertyName).Value;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 初始化
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user