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
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
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.
I am new on SparkPlug, and after reading the specification, I have some questions to implement my feature.
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
_______________________________________________
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
|