PlcObjectGetPropertyValuesTOperatorValue, TValue 方法
异步获取指定属性的多个值。
命名空间: TouchSocket.PlcBridges程序集: TouchSocketPro.PlcBridges (在 TouchSocketPro.PlcBridges.dll 中) 版本:4.0.0-beta.143+5fcca7a4e70968794985dc3793adc50531308be6
protected Task<Result<ReadOnlyMemory<TValue>>> GetPropertyValues<TOperatorValue, TValue>(
IPlcOperator<TOperatorValue> plcOperator,
string propertyName,
int millisecondsTimeout,
CancellationToken cancellationToken = default
)
where TOperatorValue : struct, new()
where TValue : struct, new()
Protected Function GetPropertyValues(Of TOperatorValue As {Structure, New}, TValue As {Structure, New}) (
plcOperator As IPlcOperator(Of TOperatorValue),
propertyName As String,
millisecondsTimeout As Integer,
Optional cancellationToken As CancellationToken = Nothing
) As Task(Of Result(Of ReadOnlyMemory(Of TValue)))
member GetPropertyValues :
plcOperator : IPlcOperator<'TOperatorValue> *
propertyName : string *
millisecondsTimeout : int *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> Task<Result<ReadOnlyMemory<'TValue>>> when 'TOperatorValue : struct, new() when 'TValue : struct, new()
- plcOperator IPlcOperatorTOperatorValue
- PLC 操作器。
- propertyName String
- 属性名称。
- millisecondsTimeout Int32
- 超时时间(毫秒)。
- cancellationToken CancellationToken (Optional)
- 取消令牌。
- TOperatorValue
- 操作值的类型。
- TValue
- 属性值的类型。
TaskResultReadOnlyMemoryTValue包含属性值的结果。