Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mdavidsaver opened this issue Nov 2, 2022 · 1 comment
Open

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

mdavidsaver opened this issue Nov 2, 2022 · 1 comment

Comments

@mdavidsaver
Copy link
Member

mdavidsaver commented Nov 2, 2022

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
Copy link
Member Author

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

throw std::runtime_error("leaf field may not have sub-script : "+pv);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant