PicoOPC User's Guide and Reference
ReadAsync Method



OpcLabs.PicoOpc Assembly > OpcLabs.PicoOpc.UA Namespace > Client Class : ReadAsync Method
Maximum age of the values to be read.
Array of nodes and their attributes to read.
Asynchronously reads one or more attributes of one or mode nodes.
Syntax
'Declaration
 
<AsyncStateMachineAttribute(OpcLabs.PicoOpc.UA.Client+d__1)> 
Public Function ReadAsync( _ 
   ByVal maximumAge As TimeSpan, _ 
   ByVal nodeToReadArray() As ReadValueId _ 
) As Task(Of DataValue())
'Usage
 
Dim instance As Client
Dim maximumAge As TimeSpan
Dim nodeToReadArray() As ReadValueId
Dim value As Task(Of DataValue())
 
value = instance.ReadAsync(maximumAge, nodeToReadArray)
[AsyncStateMachine(OpcLabs.PicoOpc.UA.Client+d__1)] 
public Task<DataValue[]> ReadAsync( 
   TimeSpan maximumAge, 
   ReadValueId[] nodeToReadArray 
)
[AsyncStateMachine(OpcLabs.PicoOpc.UA.Client+d__1)] 
public: 
Task<array<DataValue>>^ ReadAsync( 
   TimeSpan maximumAge, 
   array<ReadValueId>^ nodeToReadArray 
) 

Parameters

maximumAge
Maximum age of the values to be read.
nodeToReadArray
Array of nodes and their attributes to read.

Return Value

Returns an array of attribute data values.
Exceptions
ExceptionDescription
Serves as the base class for application-defined exceptions.
Usage error.
The exception that is thrown when an I/O error occurs.
 
Remarks

Use 0 in maximumAge to read a new value from the data source. Use System.Threading.Timeout.InfiniteTimeSpan to get a cached value.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Client Class
Client Members