Feature #226

Updated by Madars over 6 years ago

We shall design support for embedded UBF field support. And design some kind of API to operate with embedded buffers.

for example:

CBEget(p_ub, {C_BUF1, 2, C_BUF2_UNDEF_BUF1, 1, C_FIELD3, BADFLD}, occ, "HELLO WORLD", len, BFLD_STRING)

Here the path to embedded data would be set through the array of fields:
C_BUF1 -> embedded buffer 1 in the p_ub, occurrence 2
C_BUF2 -> embedded buffer in the C_BUF1, occurrence 1

C_FIELD3 ->String data field in C_BUF2

<pre>
The string path then would look like: "C_BUF[2].C_BUF2_UNDEF_BUF1[1].C_FIELD3" this would identify the exact field in embedded buffers.
</pre>

The recursive support shall be made in bridge and boolean expressions too.

This would allow to create the structural mappings of the JSON with embedded objects of multi levels

For example form above, the JSON could look like

<pre>
{
"C_BUF1":
[
{},
{},
{
"C_BUF2_UNDEF_BUF1":
[
{},
{
"C_FIELD3": "HELLO WORLD"
}
]
}
]
}
</pre>

The other option would be to keep embeded objects as pointer the parent buffer. But here we have a question about serialization and deseralization. This would also allow faster access to the objects and less memory will have to be moved in case of setting the value.

For serialization we could use new format where we convert the real pointer to internal data block pointers, starting from 1. The structure could be the TLV based.

Back