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.
Visual Basic (Declaration) | |
---|---|
Overloads Function ReadRaw( _ ByVal startTime As Date, _ ByVal endTime As Date, _ ByVal numValues As Integer, _ ByVal bounds As Boolean, _ ByVal serverHandles() As Integer, _ ByRef itemValues As OPCHDAItem(), _ ByRef errors As Integer() _ ) As Integer |
C# | |
---|---|
int ReadRaw( DateTime startTime, DateTime endTime, int numValues, bool bounds, int[] serverHandles, 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.
- 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.
- 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 timestamp. NOTE that any FAILED error code indicates that the corresponding OPCHDA_ITEM struct is undefined.
Return Value
HRESULTS success/error code.Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows 7, Windows Server 2008 family