This method initially retrieves data from the start time to the end time. After the initial response it periodically (every updateInterval) responds with an updateDuration amount of data. The time of the last value returned in the initial response is used as the start time for the first update. After that, the time of the last value returned in an update is used as the start time for the next update. The results are returned via the client's OnPlayback method. The domain of the initial request is defined by startTime, endTime, and resampleInterval. All three must be specified. endTime must be greater than startTime. The resampleInterval determines how many subintervals the complete interval is divided into. The specified function is calculated at each subinterval beginning with htStartTime and selecting the data within the next resampleInterval, a value will be calculated according to the aggregate at each subinterval. For MinimumActualTime and MaximumActualTime used with aggregate values, if more than one instance of the value exists within a time range, which instance (time stamp) of the value is returned is server dependent. In any case, the server may set the OPCHDA_EXTRADATA quality flag to let the caller know that there are other timestamps with that value. A resampleInterval of 0 is illegal resulting in a return status of E_INVALIDARG. If only an initial set of data is desired, the dwNumIntervals should be set to 0 The request must still be cancelled. The updateInterval can not be less than the resampleInterval. The order of the data returned will match the order of the ItemIDs in the request.
Visual Basic (Declaration) | |
---|---|
Function PlaybackProcessed( _ ByVal transactionID As Integer, _ ByVal startTime As Date, _ ByVal endTime As Date, _ ByVal resampleInterval As TimeSpan, _ ByVal numIntervals As Integer, _ ByVal updateInterval As TimeSpan, _ ByVal serverHandles() As Integer, _ ByVal aggregate() As Integer, _ ByRef cancelID As Integer, _ ByRef errors As Integer() _ ) As Integer |
C# | |
---|---|
int PlaybackProcessed( int transactionID, DateTime startTime, DateTime endTime, TimeSpan resampleInterval, int numIntervals, TimeSpan updateInterval, int[] serverHandles, int[] aggregate, 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.
- resampleInterval
- Time between return values.
- numIntervals
- The number of ResampleIntervals in an update.
- updateInterval
- The interval to send data for updates.
- serverHandles
- The list of processed server items to be retrieved.
- aggregate
- The list of processed values to be returned.
- 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.Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows 7, Windows Server 2008 family