OPCDA.NET Reference Manual
Refresh Method
See Also  Send Feedback
OpcDaNetUA.Net4 Assembly > OPCDA.NET Namespace > BGGroup Class : Refresh Method

source
Data source CACHE or DEVICE. If the DEVICE, then all active items in the CACHE are refreshed from the device BEFORE the callback.

Glossary Item Box

Available in the OPCDA.NET Professional Edition only.
Force a callback to DataChangeEventHandler() for all active items in the group (whether they have changed or not). Inactive items are not included in the callback. If the call fails then a BGException is thrown and no Callback will occur. Calling Refresh for an InActive Group will fail with E_FAIL. Calling refresh for an Active Group, where all the items in the group are InActive also fails the call with E_FAIL. Functionally this method is similar to what could be achieved by doing a READ of all of the active items in a group. NOTE: all of the results must be returned in a single callback. Thus if the items in the group require multiple physical transactions to one or more physical devices then the server must wait until all of them are complete before invoking OnDataChange. The expected behavior is that this Refresh will not affect the timing of normal OnDataChange callbacks which are based on the UpdateRate. For example, if the update rate is 1 hour and this method is called after 45 minutes then the server should still do its internal ‘checking’ at the end of the hour (15 minutes after the Refresh call). Calling this method may affect the contents of that next callback (15 minutes later) since only items where the value or status changed during that 15 minutes would be included. Items which had changed during the 45 minutes preceding the Refresh will be sent (along with all other values) as part of the Refresh Transaction. They would not be sent a second time at the end of the hour. The value sent in response to the Refresh becomes the ‘last value sent’ to the client when performing the normal subscription logic.

Syntax

Visual Basic (Declaration) 
Public Sub Refresh( _
   ByVal source As OPCDATASOURCE _
) 
C# 
public void Refresh( 
   OPCDATASOURCE source
)

Parameters

source
Data source CACHE or DEVICE. If the DEVICE, then all active items in the CACHE are refreshed from the device BEFORE the callback.

Requirements

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

See Also

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