OPC Historian .NET Server Toolkit Reference
ReadModified(Int32,DateTime,DateTime,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.
The maximum number of values returned for any item over the time range. If only one time is specified, this number specifies the extent of the time range.
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 ReadModified.
This method reads the values, qualities, timestamps, user ID, and timestamp of the modification from the history database for the specified time domain for one or more items. The purpose of This method is to read values from history that have been modified/replaced. If ReadRaw, ReadProcessed, or ReadAtTime has returned a quality of OPCHDA_EXTRADATA, indicating that there are values which have been superseded, This method reads those values which were superseded. Only values that have been modified/replaced or deleted are read by this method.
The results are returned via the client's IOPCHDA_DataCallback::OnReadModifiedComplete method.

The time domain of the request is defined by startTime and endTime. If endTime is less than startTime, the data shall be returned in reverse order, with later data coming first. Unlike the synchronous method, if numValues is non-zero, the method continues sending data in blocks of size numValues until all requested data has been sent. The cancelID can be used to cancel the request. If a value has been modified multiple times, all values for the time are returned. This means that a time stamp can appear in the array more than once. The order of the returned values with the same time stamp should be from most recent to oldest modified value. It is server dependent whether it keeps multiple modifications or only the most recent. In asynchronous ReadModified, unlike in synchronous, if all three parameters (startTime, endTime, numValues) are specified, the method continues sending data in blocks of size dwNumValues until all requested data has been sent. The cancelID which can be used to cancel the request.
Syntax
'Usage
 
Dim instance As AppPlugin
Dim transactionID As Integer
Dim startTime As Date
Dim endTime As Date
Dim numValues As Integer
Dim serverHandles() As Integer
Dim cancelID As Integer
Dim errors As Integer()
Dim value As Integer
 
value = instance.ReadModified(transactionID, startTime, endTime, numValues, serverHandles, cancelID, errors)
public int ReadModified( 
   int transactionID,
   DateTime startTime,
   DateTime endTime,
   int numValues,
   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, this number specifies the extent of the time range.
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 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