OPC Historian .NET Server Toolkit Reference
ReadRaw(Int32,DateTime,DateTime,Int32,Boolean,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.
The maximum number of values returned for any item over the time range. If only one time is specified, the time range must extend to return this number of values.
True if bounding values should be returned.
The list of server item handles for the items to be read.
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 ReadRaw.
This method reads the values, qualities, and timestamps from the history database for the specified time domain for one or more items. When bBounds is TRUE, the bounding values for the time domain are returned. This method is intended for use by clients wanting the actual data saved within the historian. The actual data may be compressed or may be all data collected for the item depending on the historian and the storage rules invoked when the item values were saved. The optional bounding values are provided to allow clients to interpolate values for the start and end times when trending the actual data on a display.
The results are returned via the client's IOPCHDA_DataCallback::OnReadComplete method.
Syntax
'Usage
 
Dim instance As IAppPlugin
Dim transactionID As Integer
Dim startTime As Date
Dim endTime As Date
Dim numValues As Integer
Dim bounds As Boolean
Dim serverHandles() As Integer
Dim cancelID As Integer
Dim errors As Integer()
Dim value As Integer
 
value = instance.ReadRaw(transactionID, startTime, endTime, numValues, bounds, serverHandles, cancelID, errors)
int ReadRaw( 
   int transactionID,
   DateTime startTime,
   DateTime endTime,
   int numValues,
   bool bounds,
   int[] serverHandles,
   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.
numValues
The maximum number of values returned for any item over the time range. If only one time is specified, the time range must extend to return this number of values.
bounds
True if bounding values should be returned.
serverHandles
The list of server item handles for the items to be read.
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 one 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

IAppPlugin Interface
IAppPlugin Members
Overload List

 

 


Copyright © 2004-2019 Advosol Inc. All rights reserved

Send Feedback