OPCHDA.NET Reference Manual
AdviseProcessed Method
See Also  Send Feedback
OpcHDAWrapperUA.Net4 Assembly > OPCHDA.NET Namespace > OpcHDAServer Class : AdviseProcessed Method

transactionID
An identifier created by the client and passed to the server in this call. The server shall return this identifier along with the results of this call.
startTime
The beginning of the history to be read.
resampleInterval
Interval between returned values.
server
The list server item handles for the items to be read.
aggregates
The list of aggregate values to be returned.
numIntervals
Number of resample intervals between updates.
cancelID
OUT: Place to return a Server generated ID to be used in case the operation needs to be canceled.
errors
OUT: Array of HRESULTs indicating whether the corresponding server handle was valid.

Glossary Item Box

This asynchronous function computes the aggregate values, qualities, and timestamps from the history database from the specified start time at the interval for one or more items.

This function is intended to be used to update the client software with new data as it becomes available; e.g., update a trend with new data on a periodic basis.

The results are returned via the client's DataChange event handler.

Syntax

Visual Basic (Declaration) 
Public Function AdviseProcessed( _
   ByVal transactionID As Integer, _
   ByRef startTime As OPCHDA.NET.OPCHDAtime, _
   ByVal resampleInterval As TimeSpan, _
   ByVal server() As Integer, _
   ByVal aggregates() As Integer, _
   ByVal numIntervals As Integer, _
   ByRef cancelID As Integer, _
   ByRef errors As Integer() _
) As Integer
C# 
public int AdviseProcessed( 
   int transactionID,
   ref OPCHDA.NET.OPCHDAtime startTime,
   TimeSpan resampleInterval,
   int[] server,
   int[] aggregates,
   int numIntervals,
   out int cancelID,
   out int[] errors
)

Parameters

transactionID
An identifier created by the client and passed to the server in this call. The server shall return this identifier along with the results of this call.
startTime
The beginning of the history to be read.
resampleInterval
Interval between returned values.
server
The list server item handles for the items to be read.
aggregates
The list of aggregate values to be returned.
numIntervals
Number of resample intervals between updates.
cancelID
OUT: Place to return a Server generated ID to be used in case the operation needs to be canceled.
errors
OUT: Array of HRESULTs indicating whether the corresponding server handle was valid.

Return Value

S_OK, S_FALSE, OPC_S_UNSUPPORTEDRATE, E_NOTIMPL, E_INVALIDARG, E_FAIL

Remarks

The request will be for all data from the startTime into the future, as it is collected, reported at the rate specified by: (numIntervals* resampleInterval). The resampleInterval determines the subintervals to which the specified functions will be applied.

Beginning with startTime and selecting the data within the next resampleInterval, the values specified by aggregate will be determined for each subinterval. Reporting shall continue until the request is canceled. Caution should be used in specifying start times prior to the present, as data which is already available will be returned unthrottled, with numIntervals worth of data in each response. Once all data which has already been collected has been sent, new data shall be sent as soon as a full numIntervals worth of data is available.

If there is no new data for a (numIntervals* resampleInterval) period, the server shall still send a response, with empty pointers for the arrays and dwCount = 0. This will allow the client to be sure that the connection is still active. For MinimumActualTime and MaximumActualTime, if more than one instance of the value exists within a subinterval, which instance (time stamp) of the value returned is server dependent. In any case, the server may set the OPCHDA_EXTRADATA quality flag to let the caller know that there are other timestamps with that value. See the discussion at ReadProcessed for specifics of what a server should return to the client in various situations.

Requirements

Target Platforms: Windows 7/8/10, Windows Server 2008/2012/2016, .NET 4.x

See Also

Copyright © 2002-2018 Advosol Inc. All Rights Reserved.