Hi @star_board ,
I tried to replicate this as well and the only method I found is by manually creating the child nodes in the nodes.json. Keep in mind that the data behind these nodes is not linked and therefore updating the child will no update the parent. Example...
{
"address": "test/memory",
"type": "types/system/resources/memory",
"value": {
"total": 16772329472,
"used": 459796480,
"free": 15236046848,
"buffer": 41381888,
"cache": 1035104256,
"available": 16044298240
},
"mode": "read-only",
"metadata": {
"nodeClass": "Variable",
"description": "This variable node is of built-in flatbuffers type 'system-resources-memory'."
}
},
{
"address": "test/memory/total",
"type": "int32",
"value": 12,
"mode": "read-only",
"metadata": {
"nodeClass": "Variable"
}
},
{
"address": "test/memory/used",
"type": "int32",
"value": 123,
"mode": "read-only",
"metadata": {
"nodeClass": "Variable"
}
}
I copied the same type as the memory resource example you gave and the child nodes are not created. I believe they are using some recursive logic behind the scenes to create those nodes and it is not a built in feature of the datalayer. I agree this would be a useful function, but to the best of my knowledge, it is not currently available using KVD. Hopefully someone proves me wrong!
Do you absolutely need the top level JSON object representation along with the child nodes for each key-value pair? If not, see the model examples.
... View more