一款简单易用的基础网络通讯组件库。

PlcObjectSetPropertyValueTOperatorValue, TValue 方法

异步设置指定属性的值。

Definition

命名空间: TouchSocket.PlcBridges
程序集: TouchSocketPro.PlcBridges (在 TouchSocketPro.PlcBridges.dll 中) 版本:4.1.4.7+7f7e1f78093c99347956e09330d5d7aca1d2bdf2
C#
protected Task<Result> SetPropertyValue<TOperatorValue, TValue>(
	IPlcOperator<TOperatorValue> plcOperator,
	TValue oldValue,
	TValue newValue,
	string propertyName,
	int millisecondsTimeout,
	CancellationToken cancellationToken = default
)
where TOperatorValue : struct, new()
where TValue : struct, new()

参数

plcOperator  IPlcOperatorTOperatorValue
PLC 操作器。
oldValue  TValue
旧值。
newValue  TValue
新值。
propertyName  String
属性名称。
millisecondsTimeout  Int32
超时时间(毫秒)。
cancellationToken  CancellationToken  (Optional)
取消令牌。

类型参数

TOperatorValue
操作值的类型。
TValue
属性值的类型。

返回值

TaskResult
操作结果。

参见