Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sparkplug-dev] [EXTERNAL] Re: Device creation

The Sparkplug payloads are created through the use of an implementation that relies on the Google Protobuf. There are examples of the Protobuf and a Java library that handles a good deal of the payload management.

There is nothing special about the metric. In the example I mentioned earlier, you could create a Metric (a tag) that has a String data type. The edge node receives the Metric value and then processes the data accordingly. In turn, the response of this process updates the value of the same metric and then publishes the change as a node data (NDATA) or device data (DDATA) metric.

On Thu, Dec 21, 2023 at 9:09 AM Millieret, Xavier <XavierMillieret@xxxxxxxxx> wrote:

Thanks a lot for your answers, I appreciate, so thank you.
Let me write some precision

 

The idea is:
my edge node can accept some commands, like create a device and so on (this one is not known by my edge node, so I have not already this device id)

 

So my question is, how pass the command and payload relating to the command in SparkPlug format?

 

  • I can do this:
    Send a SP message with this topic
    spBv1.0/group_id/DCMD/edge_node_id/create and in the Metric Object pass all information to create my device.
  • And or publish this special cmd (create) in the NBIRTH message in Metric Object, after that the edge node can accept this command on the following topic spBv1.0/group_id/DCMD/edge_node_id
    And inside the Metric object the special cmd and in body the payload to launch the special command, and or add some properties associated to the metric?

 

Thank you by advance

 

Regards

 

Xavier Millieret

 

From: Bryce Nakatani <bnakatani@xxxxxxxxxx>
Sent: jeudi 21 décembre 2023 16:58
To: sparkplug developer discussions <sparkplug-dev@xxxxxxxxxxx>
Cc: Millieret, Xavier <XavierMillieret@xxxxxxxxx>
Subject: [EXTERNAL] Re: [sparkplug-dev] Device creation

 

You don't often get email from bnakatani@xxxxxxxxxx. Learn why this is important

Thanks for reaching out.

 

I'm not completely clear about your implementation.

 

The specification specifies the MQTT topic for the device command (DCMD). The topic has the form of

spBv1.0/group_id/DCMD/edge_node_id/device_id

 

The node and device birth certificates contain all the metrics that the edge node will publish. If you wanted a "special" function, this would have to be referenced through the data of a metric that is published in the birth certificate. The host does not arbitrarily create new metrics for the node or device.

 

If you need a special function metric, it could be of type string. The string written from host to edge could contain the information required. The result of the operation could be the metric's state reported to the host.

 

 

 

On Thu, Dec 21, 2023 at 5:10 AM Millieret, Xavier via sparkplug-dev <sparkplug-dev@xxxxxxxxxxx> wrote:

Hi SparkPlug team,

 

I am new on SparkPlug, and after reading the specification, I have some questions to implement my feature.

The question for is:

I must have some CRUD function for a device in my system, the main question is how pass the verb in the SP payload 

  • Either in the topic name for example spBv1.0/<groupe/DCMD/<edge_node_id>/<verbe-like-create-read-etc>, and in metric all information to create the device?
  • Either in the metric payload, and put in the body all information to create the device?
  • Either in the metric payload, and put all information to create the device inside properties attached at this metric?
  • How to return the result of the CRUD command

    All of them scenario works, but I don't know the right way to do this feature, so any help on this part will be appreciate

    Thanks a lot

Xavier Millieret

Eaton

 

 

 

_______________________________________________
sparkplug-dev mailing list
sparkplug-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/sparkplug-dev


Back to the top