PlcObjectSetPropertyValueTOperatorValue, TValue 方法
异步设置指定属性的值。
命名空间: TouchSocket.PlcBridges程序集: TouchSocketPro.PlcBridges (在 TouchSocketPro.PlcBridges.dll 中) 版本:4.0.0-beta.143+5fcca7a4e70968794985dc3793adc50531308be6
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()
Protected Function SetPropertyValue(Of TOperatorValue As {Structure, New}, TValue As {Structure, New}) (
plcOperator As IPlcOperator(Of TOperatorValue),
oldValue As TValue,
newValue As TValue,
propertyName As String,
millisecondsTimeout As Integer,
Optional cancellationToken As CancellationToken = Nothing
) As Task(Of Result)
member SetPropertyValue :
plcOperator : IPlcOperator<'TOperatorValue> *
oldValue : 'TValue *
newValue : 'TValue *
propertyName : string *
millisecondsTimeout : int *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> Task<Result> when 'TOperatorValue : struct, new() when 'TValue : struct, new()
- plcOperator IPlcOperatorTOperatorValue
- PLC 操作器。
- oldValue TValue
- 旧值。
- newValue TValue
- 新值。
- propertyName String
- 属性名称。
- millisecondsTimeout Int32
- 超时时间(毫秒)。
- cancellationToken CancellationToken (Optional)
- 取消令牌。
- TOperatorValue
- 操作值的类型。
- TValue
- 属性值的类型。
TaskResult操作结果。