-
Notifications
You must be signed in to change notification settings - Fork 96
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
Add new VType class in Phoebus to manage Description in Enum and manage Labels properly in PVTable #3237
base: master
Are you sure you want to change the base?
Conversation
add EnumDisplay for Boolean Type to manage ONAM & ZNAM
There are several ways to do this, so we can argue about this for a long time, but here's what I would do, and this has to be done in the VTypes:
Remove That would avoid adding new a AdvancedEnum, AdvancedBoolean and EnumProvider. Note that IOCs use VEnum for boolean data. VBoolean is just true/false. Boolean records (bi, bo) use a VEnum with two options, that's how you can have labels for the two states beyond just true/false. Doing some intermediate work here until VTypes are updated means it has to be re-done in 2 weeks. |
@katysaintin with the previous PR #3228 merged I hope you are no longer stuck I think I would like a bit more time on this issue primarily to understand the impact on the existing code. |
@kasemir Thank you for your code review . For Boolean , I use Enum value instead, but some widget and rule use ONAM & ZNAM such as LED Boolean Button or boolean rule . If I use an enum it's become pv == 0 instead of !pv0 , that why I want to use VBoolean. For ,boolean EPICS , I'm not sure, are bo and bi record are boolean or enum ? is EnumDisplay get ONAM & ZNAM ? Anyway, thank you so much both of you @shroffk @kasemir for your help. Katy |
Yes No problem, I'm not stuck anymore, I can keep as it in my fork for instant. |
Yes, channels to bo and bi records use VEnum with two labels/choices in the EnumDisplay. |
Hello @shroffk and @kasemir ,
Here is my proposal for fix Description and Enum values in waiting epics-base/epicsCoreJava#141
resolution. Perhaps it will help you to fix it in epics core-vtype module .
In PVTable I update all the code in order to get description by this way instead of PV instanceof DisplayProvider
I also use EnumDisplay to display Boolean value, because actually it display VBoolean.toString
Here is a screenshot on PVTable with Muscade OPCUA DataSource