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

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.
timeStamps
The timestamps for the requested data.
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.

Glossary Item Box

Asynchronous ReadAtTime.
This method reads the values and qualities from the history database for the specified timestamps for one or more items. This method is intended to provide values to correlate with other values with a known timestamp. For example, the values of sensors when lab samples were collected.
The results are returned via the client's IOPCHDA_DataCallback::OnReadComplete method.

The order of the values and qualities returned shall match the order of the time stamps supplied in the request. When no value exists for a specified timestamp, a value shall be interpolated from the surrounding values to represent the value at the specified timestamp. The interpolation will follow the same rules as the standard Intpolated aggregate as outlined in Section 2.9 of the OPC HDA specification. The OPCHDA_ITEM structure will return OPCHDA_NOAGGREGATE in the aggregate field. If a value is found for the specified timestamp, the server will set the OPCHDA_RAW bit in the quality. If the value is interpolated from the surrounding values, the server will set the OPCHDA_INTERPOLATED bit in the quality.

Syntax

Visual Basic (Declaration) 
Overloads Function ReadAtTime( _
   ByVal transactionID As Integer, _
   ByVal timeStamps() As Date, _
   ByVal serverHandles() As Integer, _
   ByRef cancelID As Integer, _
   ByRef errors As Integer() _
) As Integer
C# 
int ReadAtTime( 
   int transactionID,
   DateTime[] timeStamps,
   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.
timeStamps
The timestamps for the requested data.
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 XP Professional, Windows Server 2003 family, Windows Vista, Windows 7, Windows Server 2008 family

See Also

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