Connectivity Software User's Guide and Reference
HandleAndReturn(SparkplugData) Method



OpcLabs.EasySparkplug Assembly > OpcLabs.EasySparkplug.OperationModel Namespace > SparkplugMetricReadEventArgs Class > HandleAndReturn Method : HandleAndReturn(SparkplugData) Method
The value/timestamp that is the result of the metric read.

The value of this parameter cannot be null (Nothing in Visual Basic).

Indicate that the event has been completely handled, and return the specified Sparkplug data as the event handling result.
Syntax
'Declaration
 
Public Overloads Sub HandleAndReturn( _
   ByVal data As SparkplugData _
) 
'Usage
 
Dim instance As SparkplugMetricReadEventArgs
Dim data As SparkplugData
 
instance.HandleAndReturn(data)
public void HandleAndReturn( 
   SparkplugData data
)
public:
void HandleAndReturn( 
   SparkplugData^ data
) 

Parameters

data
The value/timestamp that is the result of the metric read.

The value of this parameter cannot be null (Nothing in Visual Basic).

Remarks

Marks the event as handled and sets the specified Sparkplug data as the result of the event handling.

Calling this method indicates that the event has been fully processed and no further action is required. The specified data will be used as the outcome of the event handling, containing the value and timestamp that result from the read operation.

If you want to use the current time as the timestamp, and only specify the value, you can use the other convenience overload of this method.

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

 

Sparkplug is a trademark of Eclipse Foundation, Inc. "MQTT" is a trademark of the OASIS Open standards consortium. Other related terms are trademarks of their respective owners. Any use of these terms on this site is for descriptive purposes only and does not imply any sponsorship, endorsement or affiliation.

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