Experimental Physics and Industrial Control System
|
Hi Jörn,
On 9/29/22 7:49 AM, Jörn Dreyer via
Tech-talk wrote:
i guess I have a misunderstanding how to use the user callback functions
together with a subscription to a PV variable.
In my userfunc the value of arg.status is always 1 which evaluates to a
ca_message of "Normal successful completion". But the documentation say's to
check against ECA_NORMAL witch is 0.
What am I doing wrong here.
Actually the macro ECA_NORMAL
expands to the value 1, so arg.status == ECA_NORMAL will evaluate to true
in your userfunc as described above. The status macros defined in
caerr.h are somewhat confusing as they are actually a bitmask — the
bottom 3 bits are a severity code, and the severity code CA_K_SUCCESS has the
value 1. I suspect this may have been done to avoid using a status
value of 0 which could then be used to detect the absence of a
status value, although I doubt if anyone uses it like that now.
HTH,
- Andrew
--
Complexity comes for free, Simplicity you have to work for.
|
- References:
- CA library usage problem Jörn Dreyer via Tech-talk
- Navigate by Date:
- Prev:
Suspicious behavior of Pmac 2-5-16 IOC. .RBV and .VAL showing wrong values. Marco A. Barra Montevechi Filho via Tech-talk
- Next:
Re: Suspicious behavior of Pmac 2-5-16 IOC. .RBV and .VAL showing wrong values. Torsten Bögershausen 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
<2022>
2023
2024
2025
2026
- Navigate by Thread:
- Prev:
CA library usage problem Jörn Dreyer via Tech-talk
- Next:
Suspicious behavior of Pmac 2-5-16 IOC. .RBV and .VAL showing wrong values. Marco A. Barra Montevechi Filho 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
<2022>
2023
2024
2025
2026
|
|
ANJ, 19 Mar 2026 |
·
Home
·
News
·
About
·
Talk
·
Base
·
Modules
·
Extensions
·
·
Distributions
·
Download
·
Documents
·
Links
·
Licensing
·
|