@@ -30,7 +30,10 @@ public partial class SparkplugNodeBase<T>
30
30
/// <exception cref="ArgumentNullException">Thrown if the options are null.</exception>
31
31
/// <exception cref="Exception">Thrown if the MQTT client is not connected.</exception>
32
32
/// <returns>A <see cref="MqttClientPublishResult"/>.</returns>
33
- public async Task < MqttClientPublishResult > PublishDeviceBirthMessage ( List < T > knownMetrics , string deviceIdentifier , ILogger < KnownMetricStorage > ? logger = null )
33
+ public async Task < MqttClientPublishResult > PublishDeviceBirthMessage (
34
+ List < T > knownMetrics ,
35
+ string deviceIdentifier ,
36
+ ILogger < KnownMetricStorage > ? logger = null )
34
37
{
35
38
if ( this . Options is null )
36
39
{
@@ -166,8 +169,8 @@ protected virtual async Task<MqttClientPublishResult> PublishMessageForDevice(IE
166
169
throw new ArgumentNullException ( deviceIdentifier , $ "The known metrics for the device { deviceIdentifier } aren't set properly.") ;
167
170
}
168
171
169
- // Get the data message.
170
- var dataMessage = this . messageGenerator . GetSparkplugDeviceDataMessage (
172
+ // Get the device data message.
173
+ var deviceDataMessage = this . messageGenerator . GetSparkplugDeviceDataMessage (
171
174
this . NameSpace ,
172
175
this . Options . GroupIdentifier ,
173
176
this . Options . EdgeNodeIdentifier ,
@@ -181,6 +184,6 @@ protected virtual async Task<MqttClientPublishResult> PublishMessageForDevice(IE
181
184
this . IncrementLastSequenceNumber ( ) ;
182
185
183
186
// Publish the message.
184
- return await this . client . PublishAsync ( dataMessage ) ;
187
+ return await this . client . PublishAsync ( deviceDataMessage ) ;
185
188
}
186
189
}
0 commit comments