'Declaration<ExtensionAttribute()> Public Overloads Shared Function SubscribeDeviceMetric( _ ByVal consumer As IEasySparkplugConsumer, _ ByVal hostDescriptor As SparkplugHostDescriptor, _ ByVal deviceDescriptor As SparkplugDeviceDescriptor, _ ByVal metricName As String, _ ByVal callback As EasySparkplugMetricNotificationEventHandler _ ) As Integer
'UsageDim consumer As IEasySparkplugConsumer Dim hostDescriptor As SparkplugHostDescriptor Dim deviceDescriptor As SparkplugDeviceDescriptor Dim metricName As String Dim callback As EasySparkplugMetricNotificationEventHandler Dim value As Integer value = IEasySparkplugConsumerExtension.SubscribeDeviceMetric(consumer, hostDescriptor, deviceDescriptor, metricName, callback)
[Extension()] public static int SubscribeDeviceMetric( IEasySparkplugConsumer consumer, SparkplugHostDescriptor hostDescriptor, SparkplugDeviceDescriptor deviceDescriptor, string metricName, EasySparkplugMetricNotificationEventHandler callback )
[Extension()] public: static int SubscribeDeviceMetric( IEasySparkplugConsumer^ consumer, SparkplugHostDescriptor^ hostDescriptor, SparkplugDeviceDescriptor^ deviceDescriptor, String^ metricName, EasySparkplugMetricNotificationEventHandler^ callback )
Parameters
- consumer
- The consumer object that will perform the operation.
The value of this parameter cannot be
null(Nothingin Visual Basic). - hostDescriptor
- The Sparkplug host descriptor.
The value of this parameter cannot be
null(Nothingin Visual Basic). - deviceDescriptor
- The Sparkplug device descriptor.
The value of this parameter cannot be
null(Nothingin Visual Basic). - metricName
- The Sparkplug metric name.
The value of this parameter cannot be
null(Nothingin Visual Basic). - callback
- The callback to invoke for the notification.
The value of this parameter can be
null(Nothingin Visual Basic).