uaPLUS Reference
ReadModified(DateTime,DateTime,Int32,Int32[],OPCHDAModifiedItem[],Int32[]) Method
See Also  Send Feedback
I_HDAPlugin Namespace > IAppPlugin Interface > ReadModified Method : ReadModified(DateTime,DateTime,Int32,Int32[],OPCHDAModifiedItem[],Int32[]) Method

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.
itemValues
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 a defined value, quality and time stamp. NOTE that any FAILED error code indicates that the corresponding OPCHDA_MODIFIEDITEM struct is undefined.

Glossary Item Box

Synchronous 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 domain of the request is defined by startTime, endTime, and numValues; at least two of these must be specified. If endTime is less than startTime, or endTime and numValues alone are specified, the data shall be returned in reverse order, with later data coming first. If all three are specified, the call shall return up to numValues results going from startTime to endTime, in either ascending or descending order depending on the relative values of startTime and endTime. If more than numValues results exist within that time range, the errors entry for that ItemID shall be OPC_S_MOREDATA. If numValues is 0, then all the values in the range are returned. If a value has been modified multiple times, all values for the time are returned. This means that a timestamp can appear in the array more than once. The order of the returned values with the same timestamp should be from most recent to oldest modified value. It is server dependent whether multiple modifications are kept or only the most recent.

Syntax

Visual Basic (Declaration) 
Overloads Function ReadModified( _
   ByVal startTime As Date, _
   ByVal endTime As Date, _
   ByVal numValues As Integer, _
   ByVal serverHandles() As Integer, _
   ByRef itemValues As OPCHDAModifiedItem(), _
   ByRef errors As Integer() _
) As Integer
C# 
int ReadModified( 
   DateTime startTime,
   DateTime endTime,
   int numValues,
   int[] serverHandles,
   out OPCHDAModifiedItem[] 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.
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.
itemValues
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 a defined value, quality and time stamp. NOTE that any FAILED error code indicates that the corresponding OPCHDA_MODIFIEDITEM struct is undefined.

Return Value

HRESULTS success/error code.

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows 7, Windows Server 2008 family

See Also

© 2010-2018 Copyright Advosol Inc. All Rights Reserved.