0

https://github.com/SeppPenner/SparkplugNet/blob/master/HowToUse.md

I have explored the above link and implemented the sample solution for sparkplug B with MQTT (sender and receiver).

But when I am executing the below methods I am getting a "Null reference" exception.

  1. RunVersionBApplication (Receiver)
  2. RunVersionBNode (sender)

Note:

  • If I am passing the primary application as false code working fine.

  • But If I am passing the primary application property as true I am getting below exception.

    var nodeOptions = new SparkplugNodeOptions("localhost", 1883, "client", "", "", **false**, 
                    "scada", groupId, edgeNodeId, TimeSpan.FromSeconds(130), null, null, null); 
    

    await node.Start(nodeOptions);

System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. Source=SparkplugNet
StackTrace: at SparkplugNet.Core.Application.SparkplugApplicationBase1.<ConnectInternal>d__34.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

Please help me to resolve this issue!

Kalpana K
  • 59
  • 1
  • 10

0 Answers0