'Declaration
<ExtensionAttribute()> Public Overloads Shared Sub TestConnection( _ ByVal subscriber As IEasyUASubscriber, _ ByVal pubSubConnectionDescriptor As UAPubSubConnectionDescriptor, _ ByVal waitMilliseconds As Integer _ )
'Usage
Dim subscriber As IEasyUASubscriber Dim pubSubConnectionDescriptor As UAPubSubConnectionDescriptor Dim waitMilliseconds As Integer IEasyUASubscriberExtension2.TestConnection(subscriber, pubSubConnectionDescriptor, waitMilliseconds)
[Extension()] public static void TestConnection( IEasyUASubscriber subscriber, UAPubSubConnectionDescriptor pubSubConnectionDescriptor, int waitMilliseconds )
[Extension()] public: static void TestConnection( IEasyUASubscriber^ subscriber, UAPubSubConnectionDescriptor^ pubSubConnectionDescriptor, int waitMilliseconds )
Parameters
- subscriber
- The subscriber object that will perform the operation.
This is typically the OpcLabs.EasyOpc.UA.PubSub.EasyUASubscriber object.
The value of this parameter cannot be
null
(Nothing
in Visual Basic). - pubSubConnectionDescriptor
- Descriptor for a PubSub connection (using physical parameters, or logical name).
Because the OpcLabs.EasyOpc.UA.PubSub.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 FromResourceAddress or FromString static method instead.
Also, because the OpcLabs.EasyOpc.UA.PubSub.Configuration.UAPubSubConnectionElement has an implicit conversion to OpcLabs.EasyOpc.UA.PubSub.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 OpcLabs.EasyOpc.UA.PubSub.UAPubSubConnectionDescriptor using the ToUAPubSubConnectionDescriptor static method instead.
The value of this parameter cannot be
null
(Nothing
in Visual Basic). - waitMilliseconds
- Number of milliseconds to wait before the connection test can pass.
Valid values of this parameter are in the range from
0
to2147483647 (Int32.MaxValue)
.