OPCHDA.NET Reference Manual
AdviseRaw Method
See Also  Send Feedback
OpcHDAWrapperUA.Net4 Assembly > OPCHDA.NET Namespace > OpcHDAServer Class : AdviseRaw 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.
startTime
The beginning of the history period to be read.
updateInterval
Update interval to send new data
server
The list of server item handles for the items to be read.
cancelID
OUT: Place to return a Server generated ID to be used in case the operation needs to be canceled.
errors
OUT: Array of HRESULTs indicating whether the corresponding server handle was valid.

Glossary Item Box

This asynchronous function 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 function 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 DataChange event handler.

Syntax

Visual Basic (Declaration) 
Public Function AdviseRaw( _
   ByVal transactionID As Integer, _
   ByRef startTime As OPCHDA.NET.OPCHDAtime, _
   ByVal updateInterval As TimeSpan, _
   ByVal server() As Integer, _
   ByRef cancelID As Integer, _
   ByRef errors As Integer() _
) As Integer
C# 
public int AdviseRaw( 
   int transactionID,
   ref OPCHDA.NET.OPCHDAtime startTime,
   TimeSpan updateInterval,
   int[] server,
   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.
updateInterval
Update interval to send new data
server
The list of server item handles for the items to be read.
cancelID
OUT: Place to return a Server generated ID to be used in case the operation needs to be canceled.
errors
OUT: Array of HRESULTs indicating whether the corresponding server handle was valid.

Return Value

S_OK, S_FALSE, OPC_S_UNSUPPORTEDRATE, E_NOTIMPL, E_INVALIDARG, E_FAIL

Remarks

The request will be for all data from the startTime into the future, as it is collected, reported at the rate specified by the updateInterval.

Reporting will continue until the request is canceled. Caution should be used in specifying start times prior to the present, as data which is already available will be returned unthrottled, with updateInterval worth of data in each response. Once all data which has already been collected has been sent, new data will be sent for every updateInterval.

If there is no new data, the server shall still send a response with an entry for each Item, with a zero dwCount and a errors code of OPC_S_NODATA for any item for which there was no data. This way a client can be sure that the interval has been processed.

This function uses the updateInterval to throttle the rate of data return. No annotations will be identified in an advise. See the discussion at ReadRaw for specifics of what a server should return to the client in various situations.

Requirements

Target Platforms: Windows 7/8/10, Windows Server 2008/2012/2016, .NET 4.x

See Also

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