Asynchronously reads values, qualities and timestamps for the items specified. ( Available only in OPC DA V3 servers )
This method is functionally similar to the OpcGroup.Read method except it is asynchronous and no source is specified (DEVICE or CACHE). The server will make the determination as whether the information will be obtained from the device or cache. This decision will be based upon the MaxAge parameter. If the information in the cache is within the MaxAge, then the data will be obtained from the cache, otherwise the server must access the device for the requested information.
Syntax
Parameters
- srvHnd
- Array of server item handles of the items to be read
- maxAge
- An array of “staleness” for each item, requested in milliseconds.
The server will calculate, for each requested item, the number of milliseconds between “now” and
the timestamp on each item. For each item that has not been updated within the last MaxAge
milliseconds, the item must be obtained from the underlying device. Or if the item is not available
from the cache, it will also need to be obtained from the underlying device. A max age of 0 is
equivalent to OPC_DS_DEVICE and a max age of 0xFFFFFFFF is equivalent to OPC_DS_CACHE. Without
existence of a cache the server will always read from device. In this case MaxAge is not relevant.
Clients should not expect that a cache exists, if they have not activated both the item and the
containing group. Some servers maintain a global cache for all clients. If the needed item is in
this global cache, it is expected that the server makes use of it to check the MaxAge value.
Servers should not automatically create or change the caching of an item based on a Read call with
MaxAge. (Note: Since this is a DWORD of milliseconds, the largest MaxAge value would be
approximately is 49.7 days).
- transactionID
- The Client generated transaction ID.
This is included in the 'completion' information provided to the OnReadComplete.
- cancelID
- Place to return a Server generated ID to be used in case the operation
needs to be canceled.
- errors
Return Value
HRESULT success/error code
Requirements
Target Platforms: Windows 7/8/10, Windows Server 2003/2008/2012/2016, .NET 4.x
See Also