epics-base / pva2pva

PV Access gateway/proxy and EPICS Process Database integration
https://epics-base.github.io/pva2pva/
Other
4 stars 13 forks source link

Can't attach "meta" to top of array of structure. #51

Open mdavidsaver opened 1 year ago

mdavidsaver commented 1 year ago

https://epics.anl.gov/tech-talk/2022/msg01741.php

...

record(mbbi, "$(P)FOO") { info(Q:group, { "$(N):Array":{ "attribute[0].value":{+type:"any", +channel:"VAL"}, "attribute[0].timeStamp":{+type:"meta", +channel:"TIME"}

The "meta" mapping attaches a sub-structure at the referenced position. So as specified, this creates "attribute[0].timeStamp.timeStamp" and friends.

What you intend should be possible with:

         "attribute[0]":{+type:"meta", +channel:"TIME"}

However, at the moment this results in an error:

TST:image1:Array: Error Group not created: leaf field may not have sub-script : attribute[0]

mdavidsaver commented 1 year ago

Maybe this error check is being done in the wrong place, during member parsing, where the mapping type is not available.

https://github.com/epics-base/pva2pva/blob/5c75fd7bfca83edbead521c3582aaab078bd270a/pdbApp/pdb.cpp#L748