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: asynPortDriver callParamCallbacks(); not working but callParamCallbacks(0); working |
From: | Mark Rivers via Tech-talk <[email protected]> |
To: | 'Hugot Sebastien' <[email protected]> |
Cc: | "[email protected]" <[email protected]> |
Date: | Mon, 18 Feb 2019 17:57:34 +0000 |
Hi Hugo, If I understand what you are saying correctly, you see a different behavior when you call callParamCallbacks(); vs callParamCallbacks(0); That does not make sense to me. This is the code in asynPortDriver: /** Calls callParamCallbacks(0, 0) i.e. with both list and asyn address. */ asynStatus asynPortDriver::callParamCallbacks() { return this->callParamCallbacks(0, 0); } /** Calls callParamCallbacks(addr, addr) i.e. with list=addr, which is normal. */ asynStatus asynPortDriver::callParamCallbacks(int addr) { return this->callParamCallbacks(addr, addr); } /** Calls paramList::callCallbacks(addr) for a specific parameter list. * \param[in] list The parameter list number. Must be < maxAddr passed to asynPortDriver::asynPortDriver. * \param[in] addr The asyn address to be used in the callback. Typically the same value as list. */ asynStatus asynPortDriver::callParamCallbacks(int list, int addr) { return this->params[list]->callCallbacks(addr); } Note that: callParamCallbacks simply calls callParamCallbacks(0,0) callParamCallbacks(0) also simple calls callParamCallbacks(0,0) Ultimately both call this->params[list]->callCallbacks(addr); So I don’t see how they can behave differently. Please send more evidence for your claim that they behave differently. Mark From: [email protected] <[email protected]>
On Behalf Of Hugot Sebastien via Tech-talk Hello, I was relieved to find the solution of an asyn problem I had (behavior change from 4-26 to 4-27). (https://epics.anl.gov/tech-talk/2015/msg01713.php) Now, when I use the code, setParamStatus(param, ASYN_SUCCESS); /* If it might previously have been an error
code */ setXXXParam(param, value); callParamCallbacks(); setParamStatus(param, ASYN_ERROR); /* Or other error */ callParamCallbacks(); does not update the value of my parameter, but with this version (using
callParamCallbacks(0); instead of callParamCallbacks();) setParamStatus(param, ASYN_SUCCESS); /* If it might previously have been an error
code */ setXXXParam(param, value); callParamCallbacks(0); setParamStatus(param, ASYN_ERROR); /* Or other error */ callParamCallbacks(0); the parameter value is updated. Do you have any idea for such a behavior ? I am using asyn4-32. Sébastien. Préservons notre environnement, n’imprimez ce mail que si nécessaire. |