OPC Historian .NET Server Toolkit Reference
AdviseRaw Method (IAppPlugin)

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.
The beginning of the history period to be read.
Update interval to send new data
The list of server item handles for the items to be read.
Place to return a Server generated ID to be used in case the operation needs to be canceled.
Array of HRESULTs indicating whether the corresponding server handle was valid.
This method reads the values, qualities, and timestamps from the history database from the specified start time at the update interval for one or more items. This method is intended to be used to update the client software with new data as it becomes available; e.g., update a trend with new data on a periodic basis. The results are returned via the client's IOPCHDA_DataCallback::OnDataChange method.
Syntax
'Usage
 
Dim instance As IAppPlugin
Dim transactionID As Integer
Dim startTime As Date
Dim interval As TimeSpan
Dim serverHandles() As Integer
Dim cancelID As Integer
Dim errors As Integer()
Dim value As Integer
 
value = instance.AdviseRaw(transactionID, startTime, interval, serverHandles, cancelID, errors)
int AdviseRaw( 
   int transactionID,
   DateTime startTime,
   TimeSpan interval,
   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.
startTime
The beginning of the history period to be read.
interval
Update interval to send new 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 stored and handled by the advise handling thread until the request is cancelled. The sample implementation has one such thread. To improve performance it may be necessary in some servers to have multiple advise handling threads.
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

IAppPlugin Interface
IAppPlugin Members

 

 


Copyright © 2004-2019 Advosol Inc. All rights reserved

Send Feedback