 | PIPointUpdateValuesAsync Method (IListAFValue, AFUpdateOption, AFBufferOption, CancellationToken) |
This method writes or replaces one or more values on the target system using the configured data reference.
Namespace:
OSIsoft.AF.PI
Assembly:
OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 2.10.6.195
Syntax[HandleProcessCorruptedStateExceptionsAttribute]
public Task<AFErrors<AFValue>> UpdateValuesAsync(
IList<AFValue> values,
AFUpdateOption updateOption,
AFBufferOption bufferOption,
CancellationToken cancellationToken = null
)
<HandleProcessCorruptedStateExceptionsAttribute>
Public Function UpdateValuesAsync (
values As IList(Of AFValue),
updateOption As AFUpdateOption,
bufferOption As AFBufferOption,
Optional cancellationToken As CancellationToken = Nothing
) As Task(Of AFErrors(Of AFValue))
Dim instance As PIPoint
Dim values As IList(Of AFValue)
Dim updateOption As AFUpdateOption
Dim bufferOption As AFBufferOption
Dim cancellationToken As CancellationToken
Dim returnValue As Task(Of AFErrors(Of AFValue))
returnValue = instance.UpdateValuesAsync(values,
updateOption, bufferOption, cancellationToken)
public:
[HandleProcessCorruptedStateExceptionsAttribute]
Task<AFErrors<AFValue^>^>^ UpdateValuesAsync(
IList<AFValue^>^ values,
AFUpdateOption updateOption,
AFBufferOption bufferOption,
CancellationToken cancellationToken = nullptr
)
[<HandleProcessCorruptedStateExceptionsAttribute>]
member UpdateValuesAsync :
values : IList<AFValue> *
updateOption : AFUpdateOption *
bufferOption : AFBufferOption *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken null
*)
-> Task<AFErrors<AFValue>>
Parameters
- values
- Type: System.Collections.GenericIListAFValue
The values to be written or replaced on the target system. - updateOption
- Type: OSIsoft.AF.DataAFUpdateOption
An enumeration value that specifies how to treat duplicate values.
It can also be used to specify that an existing value should be removed.
- bufferOption
- Type: OSIsoft.AF.DataAFBufferOption
An enumeration value that specifies buffering option. - cancellationToken (Optional)
- Type: System.ThreadingCancellationToken
A cancellation token used to abort processing before completion. Passing the default CancellationToken.None
will run to completion or until the PIConnectionInfo.OperationTimeOut period elapses.
Return Value
Type:
TaskAFErrorsAFValue
Returns a task whose result is
if there are no errors.
Otherwise the result is an
AFErrorsTKey instance containing error information.
ExceptionsException | Condition |
---|
AggregateException |
Asynchronous methods throw AggregateException on failure which will contain one or
more exceptions containing the failure.
|
Remarks
For successful data write through Buffer, this method requires that
PI Buffer Subsystem (PIBufSS) needs to be correctly pre-configured with Buffering Manager.
Currently, buffering data through PIBufSS has a limitation where error feedback from PI Data Archive
cannot be returned to the caller.
Data write through Buffer will be fanned to Collective members.
Notes to Callers |
---|
This call might use a background task to complete some of its work. See the
Threading Overview
for some matters to consider when execution transitions to another thread.
|
Version InformationAFSDK
Supported in: 2.10.5, 2.10, 2.9.5, 2.9, 2.8.5, 2.8
See Also