FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important
information on the platform change.
03-19-2024 09:53 AM - edited 03-19-2024 01:25 PM
Using python SDK is it possible to create a datalayer node with a customizable JSON data format? Is there any example of this? I have seen the example samples-python/datalayer.provider.all-data, but this option is not considered.
Thanks in advance! 😃
Solved! Go to Solution.
03-19-2024 02:31 PM
When you say customizable JSON data format, what exactly do you mean?
Each datalayer node must be provided as a fixed type. This could be a complex datatype defined as flatbuffers.
See the official documentation and the Python provider sample for reference.
The easiest route, if it makes sense in your application, would be to store the value as a JSON string. This way you could parse it on the client side as a JSON object.
03-19-2024 04:54 PM - edited 03-19-2024 04:55 PM
Using the Modbus app just as an example, I would like to create a datalayer node with a JSON object like this:
Is this doable using the SDK?
03-19-2024 05:13 PM
Yes, you will have to use flatbuffers in this case. See my comment above for the documentation and examples.