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: [SPAM] Re: Processing a record with asynPortDriver |
From: | Mark Rivers via Tech-talk <tech-talk at aps.anl.gov> |
To: | "Wang, Lin" <wanglin at ihep.ac.cn>, "sobhani, alex" <sobhaniba at ornl.gov> |
Cc: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Sat, 5 Nov 2022 17:16:32 +0000 |
>
Typically, in which circumstances do we need to force callbacks to asynPortDriver client even when the value in parameter library does not change? To update the record's timestamp or any other consideration?
One
circumstance is when using the asynInt32Average or asynFloat64Average device support for ai records. That device support takes callbacks from the driver for each values, and averages them when the record processes. For example, if the driver is doing callbacks
at 100Hz and the record is processing every 1 second then it will average 100 readings. In this case it is very important that device support receives all of the callbacks, even if the value does not change. Otherwise, it won't produce the correct average.
Mark
From: Wang, Lin <wanglin at ihep.ac.cn>
Sent: Saturday, November 5, 2022 9:40 AM To: Mark Rivers <rivers at cars.uchicago.edu>; sobhani, alex <sobhaniba at ornl.gov> Cc: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov> Subject: Re: [SPAM] Re: Processing a record with asynPortDriver Hello,
> getIntegerParam(param, ¤tValue);
> setIntegerParam(param, currentValue+1);
> setIntegerParam(param, currentValue);
> callParamCallbacks();
Years ago, I also saw another colleague's code using the method mentioned above to force a record to process, but I do not understand. Typically, in which circumstances do we need to force callbacks to asynPortDriver client even when the value in parameter library does not change? To update the record's timestamp or any other consideration?
Thanks, Lin
-----Original Messages----- |