EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20222023  2024  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  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Processing a record with asynPortDriver
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, "Sobhani, Alex" <sobhaniba at ornl.gov>
Date: Fri, 4 Nov 2022 19:22:55 +0000
Hi Alex,

> Is there a function that I can call like this: "processRecord(param);", and it will just process the record associated with that param?

asynPortDriver does not actually know anything about processing records.  It can be used in C++ code that is not running in an IOC application at all.  So the real question is whether it is possible to force callbacks to the asynPortDriver client, which is typically, but not always, EPICS asyn device support.  

The answer is that the asynPortDriver parameter library caches value, status, and severity and only does callbacks if any of those has changed.  As you indicated you can force a callback like this, which is admittedly rather ugly.

getIntegerParam(param, &currentValue);
setIntegerParam(param, currentValue+1);
setIntegerParam(param, currentValue);
callParamCallbacks();

You could also toggle the value of status by replacing get/setIntegerParam with get/setParamStatus.

Mark





From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Sobhani, Alex via Tech-talk <tech-talk at aps.anl.gov>
Sent: Friday, November 4, 2022 1:45 PM
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Processing a record with asynPortDriver
 
I can use setIntegerParam(param, val); to change the value of a record,
and if val is different from the PV's current value, the record will get
processed. But if val is the same as the PV's current value the record
will not get processed. So if I want to process a record I have to find
out its current value using getIntegerParam, and then set it to
something other than this.


Is there a function that I can call like this: "processRecord(param);",
and it will just process the record associated with that param? I can
make one using the procedure I described in the previous paragraph but I
am sure there is a better way to do this.


Alex


Replies:
Re: [SPAM] Re: Processing a record with asynPortDriver Wang, Lin via Tech-talk
References:
Processing a record with asynPortDriver Sobhani, Alex via Tech-talk

Navigate by Date:
Prev: Re: Phoebus Alarm Log Table docs William F Badgett Jr via Tech-talk
Next: Re: [SPAM] Re: Processing a record with asynPortDriver Wang, Lin via Tech-talk
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  <20222023  2024 
Navigate by Thread:
Prev: Processing a record with asynPortDriver Sobhani, Alex via Tech-talk
Next: Re: [SPAM] Re: Processing a record with asynPortDriver Wang, Lin via Tech-talk
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  <20222023  2024 
ANJ, 05 Nov 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·