'Declaration
<ExtensionAttribute()> Public Overloads Shared Function SubscribeDataSetField( _ ByVal subscriber As IEasyUASubscriber, _ ByVal pubSubResolverDescriptor As UAPubSubResolverDescriptor, _ ByVal pubSubConnectionDescriptor As UAPubSubConnectionDescriptor, _ ByVal subscribeDataSetFilter As UASubscribeDataSetFilter, _ ByVal dataSetFieldDescriptor As UADataSetFieldDescriptor, _ ByVal callback As EasyUADataSetFieldMessageEventHandler _ ) As Integer
'Usage
Dim subscriber As IEasyUASubscriber Dim pubSubResolverDescriptor As UAPubSubResolverDescriptor Dim pubSubConnectionDescriptor As UAPubSubConnectionDescriptor Dim subscribeDataSetFilter As UASubscribeDataSetFilter Dim dataSetFieldDescriptor As UADataSetFieldDescriptor Dim callback As EasyUADataSetFieldMessageEventHandler Dim value As Integer value = IEasyUASubscriberExtension.SubscribeDataSetField(subscriber, pubSubResolverDescriptor, pubSubConnectionDescriptor, subscribeDataSetFilter, dataSetFieldDescriptor, callback)
[Extension()] public static int SubscribeDataSetField( IEasyUASubscriber subscriber, UAPubSubResolverDescriptor pubSubResolverDescriptor, UAPubSubConnectionDescriptor pubSubConnectionDescriptor, UASubscribeDataSetFilter subscribeDataSetFilter, UADataSetFieldDescriptor dataSetFieldDescriptor, EasyUADataSetFieldMessageEventHandler callback )
[Extension()] public: static int SubscribeDataSetField( IEasyUASubscriber^ subscriber, UAPubSubResolverDescriptor^ pubSubResolverDescriptor, UAPubSubConnectionDescriptor^ pubSubConnectionDescriptor, UASubscribeDataSetFilter^ subscribeDataSetFilter, UADataSetFieldDescriptor^ dataSetFieldDescriptor, EasyUADataSetFieldMessageEventHandler^ callback )
Parameters
- subscriber
- The subscriber object that will perform the operation.
This is typically the EasyUASubscriber object.
The value of this parameter cannot be
null
(Nothing
in Visual Basic). - pubSubResolverDescriptor
- Describes how the PubSub logical information should be resolved to physical.
The value of this parameter cannot be
null
(Nothing
in Visual Basic). - pubSubConnectionDescriptor
- The PubSub connection descriptor.
Because the UAPubSubConnectionDescriptor has an implicit conversion from OpcLabs.BaseLib.Networking.ResourceAddress and System.String, in languages that support implicit conversion operators (such as C# or VB.NET), you can simply use a OpcLabs.BaseLib.Networking.ResourceAddress object, or a string (the so-called resource description string, usually a resource URL) in place of this parameter, and the corresponding OPC UA PubSub connection descriptor will be constructed automatically. When the implicit conversion operators are not supported (such as with Python.NET), you can use the UAPubSubConnectionDescriptor.FromResourceAddress or UAWriterGroupDescriptor.FromString static method instead.
Also, because the OpcLabs.EasyOpc.UA.PubSub.Configuration.UAPubSubConnectionElement has an implicit conversion to UAPubSubConnectionDescriptor, in languages that support implicit conversion operators (such as C# or VB.NET), you can simply use a OpcLabs.EasyOpc.UA.PubSub.Configuration.UAPubSubConnectionElement (from PubSub configuration) in place of this parameter, and the corresponding OPC UA PubSub connection descriptor will be constructed automatically. When the implicit conversion operators are not supported (such as with Python.NET), you can convert a OpcLabs.EasyOpc.UA.PubSub.Configuration.UAPubSubConnectionElement to UAPubSubConnectionDescriptor using the OpcLabs.EasyOpc.UA.PubSub.Configuration.UAPubSubConnectionElement.ToUAPubSubConnectionDescriptor static method instead.
The value of this parameter cannot be
null
(Nothing
in Visual Basic). - subscribeDataSetFilter
- Specifies how the incoming PubSub messages should be filtered before being delivered to the application.
Because the UASubscribeDataSetFilter has an implicit conversion from UAPublisherId, in languages that support implicit conversion operators (such as C# or VB.NET), you can simply use a UAPublisherId (containing the publisher Id that you want to allow in the filter) in place of this parameter, and the corresponding OPC UA subscribe dataset filter will be constructed automatically. When the implicit conversion operators are not supported (such as with Python.NET), you can use the UASubscribeDataSetFilter.FromUAPublisherId static method instead.
The value of this parameter cannot be
null
(Nothing
in Visual Basic). - dataSetFieldDescriptor
- The descriptor for the dataset field.
Because the UADataSetFieldDescriptor has implicit conversions from System.Guid and System.String, in languages that support implicit conversion operators (such as C# or VB.NET), you can simply use a GUID (representing the dataset field Id), or a string (representing the name of the dataset field) in place of this parameter, and the corresponding OPC UA dataset field descriptor will be constructed automatically. When the implicit conversion operators are not supported (such as with Python.NET), you can use the UADataSetFieldDescriptor.FromGuid or UADataSetFieldDescriptor.FromString static method instead.
The value of this parameter cannot be
null
(Nothing
in Visual Basic). - callback
- A callback method to be invoked for each time a dataset field is received.
The value of this parameter cannot be
null
(Nothing
in Visual Basic).