Connectivity Software User's Guide and Reference
CreateSystem(String,SparkplugConnectionDescriptor) Method



OpcLabs.EasySparkplug Assembly > OpcLabs.EasySparkplug.System Namespace > EasySparkplugInfrastructure Class > CreateSystem Method : CreateSystem(String,SparkplugConnectionDescriptor) Method
The Sparkplug system ID.

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

The Sparkplug connection descriptor.

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

Creates a new Sparkplug system object with the specified system ID and connection descriptor, and adds it to the infrastructure.
Syntax
'Declaration
 
<JetBrains.Annotations.NotNullAttribute()>
Public Overloads Function CreateSystem( _
   ByVal systemId As String, _
   ByVal connectionDescriptor As SparkplugConnectionDescriptor _
) As EasySparkplugSystem
'Usage
 
Dim instance As EasySparkplugInfrastructure
Dim systemId As String
Dim connectionDescriptor As SparkplugConnectionDescriptor
Dim value As EasySparkplugSystem
 
value = instance.CreateSystem(systemId, connectionDescriptor)
[JetBrains.Annotations.NotNull()]
public EasySparkplugSystem CreateSystem( 
   string systemId,
   SparkplugConnectionDescriptor connectionDescriptor
)
[JetBrains.Annotations.NotNull()]
public:
EasySparkplugSystem^ CreateSystem( 
   String^ systemId,
   SparkplugConnectionDescriptor^ connectionDescriptor
) 

Parameters

systemId
The Sparkplug system ID.

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

connectionDescriptor
The Sparkplug connection descriptor.

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

Return Value

Returns the created Sparkplug system object.

This method never returns null (Nothing in Visual Basic).

Exceptions
ExceptionDescription

One of the arguments provided to a method is not valid.

This is a usage error, i.e. it will never occur (the exception will not be thrown) in a correctly written program. Your code should not catch this exception.

A null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.

This is a usage error, i.e. it will never occur (the exception will not be thrown) in a correctly written program. Your code should not catch this exception.

Remarks

The newly created system uses EasySparkplugSystem.DefaultSparkplugVersion as its Sparkplug version.

This method throws System.ArgumentException when a system with the specified systemId already exists in the infrastructure.

 

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