OPCHDA.NET-UA
ReadProcessed(Int32,OPCHDAtime,OPCHDAtime,TimeSpan,Int32[],Int32[],Int32,Int32[]) Method
See Also  Send Feedback
OpcHDaNetUaOption.Net4 Assembly > hdaUAwrapper Namespace > HDAServer Class > ReadProcessed Method : ReadProcessed(Int32,OPCHDAtime,OPCHDAtime,TimeSpan,Int32[],Int32[],Int32,Int32[]) 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 period to be read.
endTime
The end of the history period to be read.
resampleInterval
Interval between returned values.
server
The list item handles for the items to be read from the server.
aggregates
The list of aggregate values to be returned.
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 aggregate values, qualities, and timestamps from data in the history database for the specified time domain for one or more items.

The time domain is divided into subintervals of duration resampleInterval. The specified aggregate is calculated for each subinterval beginning with startTime by using the data within the next resampleInterval.

This function is intended to provide values calculated with respect to the resample interval. For example, this function can provide hourly statistics such as Maximum, Minimum, Average, et. al. for each item during the specified time domain when resampleInterval is 1 hour.

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

Syntax

Visual Basic (Declaration) 
Public Overloads Function ReadProcessed( _
   ByVal transactionID As Integer, _
   ByVal startTime As OPCHDAtime, _
   ByVal endTime As OPCHDAtime, _
   ByVal resampleInterval As TimeSpan, _
   ByVal server() As Integer, _
   ByVal aggregates() As Integer, _
   ByRef cancelID As Integer, _
   ByRef errors As Integer() _
) As Integer
C# 
public int ReadProcessed( 
   int transactionID,
   OPCHDAtime startTime,
   OPCHDAtime endTime,
   TimeSpan resampleInterval,
   int[] server,
   int[] aggregates,
   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 period to be read.
endTime
The end of the history period to be read.
resampleInterval
Interval between returned values.
server
The list item handles for the items to be read from the server.
aggregates
The list of aggregate values to be returned.
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_E_MAXEXCEEDED, E_NOTIMPL, E_INVALIDARG, E_FAIL

Remarks

The domain of the request is defined by startTime, endTime, and htResampleInterval. If startTime or endTime is given in string (relative) format, the value returned shall be the DateTime to which that value was translated by the server. All three must be specified. If endTime is less than startTime, the data shall be returned in reverse order, with later data coming first. For MinimumActualTime and MaximumActualTime, if more than one instance of the value exists within a subinterval, which instance (time stamp) of the value is 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. If htResampleInterval is 0, the server shall create one aggregate value for the entire time range. This allows aggregates over large periods of time. 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 © 2018 Advosol Inc. All Rights Reserved.