Hi Jimmy,
I've been thinking about that problem as well, and in some future version of asynPortDriver I plan to address it.
Meanwhile there is an easy workaround:
setDoubleParam(myParamIndex, correctValue-1);
setDoubleParam(myParamIndex, correctValue);
callParamCallbacks();
This will fool the parameter library into thinking that the value has changed, and it will always do the callbacks. If this is done with the lock taken (which will normally be the case) then no other thread can get the incorrect value of correctValue-1 from the parameter library for the short time that it has the "wrong" value.
Mark
________________________________
From: [email protected] [[email protected]] on behalf of Jimmy Johnson [[email protected]]
Sent: Friday, April 06, 2012 7:58 PM
To: [email protected]
Subject: asynPortDriver, I/O INTR and missing updates
We have recently built a number of drivers using asynPortDriver. The process has been extremely easy and the results good. We did run into one problem recently which I’d like to get input on. What we found was that we were missing updates from one driver when using “I/O INTR”. When we looked into it we discovered it was because the setDouble member of paramList checks to see whether the value being passed to it is different from the current parameter value before if updates its flag for inclusion as part of callCallbacks. About 1% of the time the data our driver retrived matched the previous value.
In our case we need the “I/O INTR” records to process regardless of whether the value differs or not (in addition to providing the currrent value it is triggering our servo processing). For now we just modified the asynPortDriver source but this is not how we want to proceed. Would it be possible to modify the setXXXParam calls to take a third defaulted parameter, e.g. setDoubleParam(int index, double value, bool ignorevaluecheck = false), offer an overloaded set of setXXXParam calls or is there a way to use the current class such that callbacks occur regardless of the value?
Thanks
Jimmy Johnson
- References:
- asynPortDriver, I/O INTR and missing updates Jimmy Johnson
- Navigate by Date:
- Prev:
asynPortDriver, I/O INTR and missing updates Jimmy Johnson
- Next:
Re: asynPortDriver, I/O INTR and missing updates Eric Norum
- 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
- Navigate by Thread:
- Prev:
asynPortDriver, I/O INTR and missing updates Jimmy Johnson
- Next:
Re: asynPortDriver, I/O INTR and missing updates Eric Norum
- 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
|