1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 <2022> 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 <2022> 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Set/get enum value of mbbo from within AD driver |
From: | "Gofron, Kazimierz via Tech-talk" <tech-talk at aps.anl.gov> |
To: | Mark Rivers <rivers at cars.uchicago.edu> |
Cc: | tech-talk <tech-talk at aps.anl.gov> |
Date: | Wed, 6 Jul 2022 21:56:38 +0000 |
Hi Mark,
Ad 1: Need to read/set enum string value of mbbo/mbbi record, instead of .VAL field within ADDriver.
VAL field is read/set with setIntegerParam() and getIntegerParam(), and I am looking for equivalent function for mbbo enum, if they exist.
================
Looking for equivalent to setting/reading enum using caget/caput (instead of setting mbbo .VAL to 2), like below:
setting mbbo:
```
gofron@HP/base/bin/linux-x86_64$ ./caput TPX3-TEST:cam1:TriggerMode "PEXSTART_NEXSTOP"
Old : TPX3-TEST:cam1:TriggerMode AUTOTRIGSTART_TIMERSTOP
New : TPX3-TEST:cam1:TriggerMode PEXSTART_NEXSTOP
```
or reading enum string of mbbo record:
```
kgofron@kgofron-HP-Z6-G4-Workstation:/epics/src/RHEL8/base/bin/linux-x86_64$ ./caget TPX3-TEST:cam1:TriggerMode
```TPX3-TEST:cam1:TriggerMode PEXSTART_NEXSTOP
================
The mbbo record is defined:
record(mbbo, "$(P)$(R)TriggerMode")
{
field(ZRST, "PEXSTART_NEXSTOP")
field(ZRVL, "0")
field(ONST, "NEXSTART_PEXSTOP")
field(ONVL, "1")
field(TWST, "PEXSTART_TIMERSTOP")
field(TWVL, "2")
field(THST, "NEXSTART_TIMERSTOP")
field(THVL, "3")
field(FRST, "AUTOTRIGSTART_TIMERSTOP")
field(FRVL, "4")
field(FVST, "CONTINUOUS")
field(FVVL, "5")
field(SXST, "SOFTWARESTART_TIMERSTOP")
field(SXVL, "6")
field(SVST, "SOFTWARESTART_TIMERSTOP")
field(SVVL, "7")
}
Thanks for looking into this,
Kaz
From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Wednesday, July 6, 2022 4:13 PM To: Gofron, Kazimierz <kgofron at bnl.gov> Cc: tech-talk <tech-talk at aps.anl.gov> Subject: RE: Set/get enum value of mbbo from within AD driver 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
Hi all,
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.
Thanks,
|