OPC Studio User's Guide and Reference
UseDataPolling Property



OpcLabs.ServerOpcUA Assembly > OpcLabs.EasyOpc.UA.NodeSpace Namespace > UADataVariable Class : UseDataPolling Property
Determines whether data polling (internally invoked reads) will be used to handle data subscriptions to this variable.
Syntax
'Declaration
 
Public Property UseDataPolling As Boolean
'Usage
 
Dim instance As UADataVariable
Dim value As Boolean
 
instance.UseDataPolling = value
 
value = instance.UseDataPolling
public bool UseDataPolling {get; set;}
public:
property bool UseDataPolling {
   bool get();
   void set (    bool value);
}

Property Value

The default value of this property is True.

Remarks

Data polling must be turned off if you want to provide the data using custom data subscriptions (via DataSubscriptionChanged event and/or DataSubscriptionSet property). It is recommended that use set the UseDataPolling property to false on each data variable that uses custom data subscriptions. However, if you process the first DataSubscriptionChanged notification with OpcLabs.EasyOpc.UA.UADataSubscriptionChangedAction.Add action and set System.ComponentModel.HandledEventArgs.Handled to true, the data polling will be internally suppressed for this data variable automatically. Setting UseDataPolling to false explicitly might be necessary in some less common scenarios, such as when your code for custom data subscriptions is not handling the DataSubscriptionChanged events, but is instead observing the DataSubscriptionSet contents externally.

This method or property does not throw any exceptions, aside from execution exceptions such as System.Threading.ThreadAbortException or System.OutOfMemoryException.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also