-
Notifications
You must be signed in to change notification settings - Fork 4
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
Choices field incorrect for menu and device fields. WAS: get of record subfield succeeds (with surprising results) #8
Comments
From Dave Hickin <david.hickin_AT_diamond.ac.uk>: Matej has fixed the eget seg fault issue so an eget to the above fields now gives:
|
Does that mean the bug is fixed? The two first issues you are describing do look not completely random to me, given that .RTYP is a string and .DTYP is an enum. If it is about the eget tool segfaulting, I am not sure I am the right owner of the ticket. |
From Dave Hickin <david.hickin_AT_diamond.ac.uk>: Yes, it appears that the issue is that for a channel to a record field with enumerated type other than a VAL field the value.index correctly gets the index from the field, but the value.choices gets the values from the VAL field. |
When creating a pvAccess channel to a field of a record of an enumerated type PV whose DBF type is DBF_DEVICE or DBF_MENU, for example, the DTYP or SCAN fields of a bi/bo/mbbi/mbbo record, and performing an operation involving its "values.choices" field (Channel Get,Put or Monitor) the "choices" field is filled in incorrectly with the values from the record's "VAL" field. Fix this for EPICS base R3.14. R3.15 requires a separate fix.
I've retitled this with something more meaningful now I understand what's happening. For channels to DBF_MENU and DBF_DEVICE fields of a record whose VAL field is a DBF_ENUM the "value.choices" field is being filled in with the strings for the VAL field. For 3.14 this is fixed for example by testing the DBF type against DBF_ENUM. .For 3.15 there is the additional problem that dbChannelFinalFieldType() returns the DBR type instead of the DBF type (#17) . I'll treat that separately in that issue. |
From Dave Hickin <david.hickin_AT_diamond.ac.uk>:
If you do a pvget with the channel name equal to a field of a v3 record (with pvaSrv being used) then the get succeeds.
Sometimes the result is a scalar:
Other times the field value is converted to an enum using the choices of the PV (i.e.ZRST etc):
So the results can be surprising:
The text was updated successfully, but these errors were encountered: