OPC Historian .NET Server Toolkit Reference
ReadProcessed(Int32,DateTime,DateTime,TimeSpan,Int32[],Int32[],Int32,Int32[]) Method

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.
The beginning of the history period to be read.
The end of the history period to be read.
Interval between returned values.
The list item handles for the items to be read from the server.
The list of aggregate values to be returned.
Place to return a Server generated ID to be used in case the operation needs to be canceled.
Array of HRESULTs indicating whether the corresponding server handle was valid.
Asynchronous ReadProcessed.
This method 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 method is intended to provide values calculated with respect to the resample interval. For example, This method 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 IOPCHDA_DataCallback::OnReadComplete method.
Syntax
'Usage
 
Dim instance As AppPlugin
Dim transactionID As Integer
Dim startTime As Date
Dim endTime As Date
Dim interval As TimeSpan
Dim serverHandles() As Integer
Dim aggregates() As Integer
Dim cancelID As Integer
Dim errors As Integer()
Dim value As Integer
 
value = instance.ReadProcessed(transactionID, startTime, endTime, interval, serverHandles, aggregates, cancelID, errors)
public int ReadProcessed( 
   int transactionID,
   DateTime startTime,
   DateTime endTime,
   TimeSpan interval,
   int[] serverHandles,
   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.
interval
Interval between returned values.
serverHandles
The list item handles for the items to be read from the server.
aggregates
The list of aggregate values to be returned.
cancelID
Place to return a Server generated ID to be used in case the operation needs to be canceled.
errors
Array of HRESULTs indicating whether the corresponding server handle was valid.

Return Value

HRESULTS success/error code.
Remarks
The requests are queued and handled by a thread. The sample implementation has on handling thread. To improve performance it may be necessary in some servers to have multiple handling threads.
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

AppPlugin Class
AppPlugin Members
Overload List

 

 


Copyright © 2004-2019 Advosol Inc. All rights reserved

Send Feedback