Connectivity Software User's Guide and Reference
Name Property (SparkplugMetric)



OpcLabs.EasySparkplug Assembly > OpcLabs.EasySparkplug Namespace > SparkplugMetric Class : Name Property
The friendly name of this metric.
Syntax
'Declaration
 
<JetBrains.Annotations.NotNullAttribute()>
Public Property Name As String
'Usage
 
Dim instance As SparkplugMetric
Dim value As String
 
instance.Name = value
 
value = instance.Name
[JetBrains.Annotations.NotNull()]
public string Name {get; set;}
[JetBrains.Annotations.NotNull()]
public:
property String^ Name {
   String^ get();
   void set (    String^ value);
}

Property Value

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

The default value of this property is "easyMetric".

Exceptions
ExceptionDescription

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 metric name should be represented as a forward-slash delimited string. The slashes in the string represent folders of the metric to represent hierarchical data structures. For example, ‘outputs/A’ would be a metric with a unique identifier of ‘A’ in the ‘outputs’ folder. There is no limit to the number of folders. However, across the infrastructure of MQTT publishers a defined folder should always remain a folder.

All UTF-8 characters are allowed in the metric name. However, special characters including but not limited to the following are discouraged: . , \ @ # $ % ^ & * ( ) [ ] { } | ! ` ~ : ; ' " < > ?. This is because many Sparkplug Host Applications may have issues handling them.

 

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