Hi Kaz,
Ø
Is there a way to set/get enum string value of mbbo/mbbi record from within areaDetector driver?
I want to be clear about what you are asking. Are you asking whether an areaDetector driver can
1)
Select the mbbi value using a string (rather than a number)?
or
2)
Change the string and/or integer value associated with a particular enum index?
It is not currently possible to do 1), you can only select by number, not by string.
It is possible to do 2). That is done with the asynEnum interface. You implement methods that override one or more of these asynPortDriver methods:
-
readEnum
-
writeEnum
-
doCallbacksEnum
This is used in many areaDetector drivers so that they can populate the enum strings and values with appropriate values for a particular detector model. These are some of the drivers that implement readEnum() to set enum strings and values:
-
andor3.cpp
-
andorCCD.cpp
-
ADGenICam.cpp
-
GenICamFeature.cpp
-
arvFeature.cpp
-
ADVimba.cpp
-
VimbaFeature.cpp
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Gofron, Kazimierz via Tech-talk
Sent: Wednesday, July 6, 2022 2:43 PM
To: tech-talk at aps.anl.gov
Subject: Set/get enum value of mbbo from within AD driver
Is there a way to set/get enum string value of mbbo/mbbi record from within areaDetector driver?
I can set/get Enum values using caput/caget, but setIntegerParam()/getIntegerParam() which are appropriate for mbbo/mbbi are not appropriate for enum, and setStringParam()/getStrinParam
are not compatible with mbbo/mbbi type.
Also mbbo/mbbi do not have SVAL field, that sCalcoutRecord has.