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

The beginning of the history period to be read.
The end of the history period to be read.
Interval between returned values.
The list of server item handles for the items to be read.
The calculation to be performed on the raw data to create the values to be returned.
OUT: Array of objects in which the item values are returned. The order of the objects in the array shall be the same as the order of the server item handles.
Array of HRESULTs indicating the success of the individual item reads. The errors correspond to the handles passed in phServer. This indicates whether the read succeeded in obtaining defined values, qualities and timestamps. NOTE any FAILED error code indicates that the contents of the corresponding OPCHDAItem structure are UNDEFINED.
Synchronous 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, etc. for each item during the specified time domain when resampleInterval is 1 hour.
Syntax
'Usage
 
Dim instance As AppPlugin
Dim startTime As Date
Dim endTime As Date
Dim interval As TimeSpan
Dim serverHandles() As Integer
Dim aggregates() As Integer
Dim itemValues As OPCHDAItem()
Dim errors As Integer()
Dim value As Integer
 
value = instance.ReadProcessed(startTime, endTime, interval, serverHandles, aggregates, itemValues, errors)
public int ReadProcessed( 
   DateTime startTime,
   DateTime endTime,
   TimeSpan interval,
   int[] serverHandles,
   int[] aggregates,
   out OPCHDAItem[] itemValues,
   out int[] errors
)

Parameters

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 of server item handles for the items to be read.
aggregates
The calculation to be performed on the raw data to create the values to be returned.
itemValues
OUT: Array of objects in which the item values are returned. The order of the objects in the array shall be the same as the order of the server item handles.
errors
Array of HRESULTs indicating the success of the individual item reads. The errors correspond to the handles passed in phServer. This indicates whether the read succeeded in obtaining defined values, qualities and timestamps. NOTE any FAILED error code indicates that the contents of the corresponding OPCHDAItem structure are UNDEFINED.

Return Value

HRESULTS success/error code.
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