OPC Historian .NET Server Toolkit Reference
ReadModified Method (AppPlugin)

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.
Overload List
OverloadDescription
ReadModified(DateTime,DateTime,Int32,Int32[],OPCHDAModifiedItem[],Int32[])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.  
ReadModified(Int32,DateTime,DateTime,Int32,Int32[],Int32,Int32[])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.  
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

 

 


Copyright © 2004-2019 Advosol Inc. All rights reserved

Send Feedback