Is there any way of parsing a json (dict) to check if is correct as a tag configuration? Also, is this possible with the different type of tags or even they are different they are treated as the same?
I'm not sure if I'm explaining myself.
Thx!
Is there any way of parsing a json (dict) to check if is correct as a tag configuration? Also, is this possible with the different type of tags or even they are different they are treated as the same?
I'm not sure if I'm explaining myself.
Thx!
I’m sure you could, do you have standard tag configurations you could check against? What defines “correct”
There's no easily accessible function that will check whether a given bundle of tag configuration will work other than creating the tags, no. The tag system is (deliberately) very dynamic under the hood, so what is "valid" configuration is not something that can be determined statically - it's a function of your Ignition version (as we add more valid capabilities to the base platform) but also what modules you have installed.
You could, in theory, have a function that tested against the current installed state - but no one has really asked us for one yet
What's the thing you're ultimately trying to do with this validation?
The closest you can get right now is to retrieve the tag configuration model from a tag provider (via context's .tagManager
then .getTagConfigModelAsync(provider)
). You can interrogate the model with .getApplicableProperties(propertyset) for a given configuration (turned into a PropertySet
). Not particularly simple.