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: CA library usage problem |
From: | Andrew Johnson via Tech-talk <tech-talk at aps.anl.gov> |
To: | Jörn Dreyer <j.dreyer at hzdr.de>, tech-talk at aps.anl.gov |
Date: | Thu, 29 Sep 2022 12:45:07 -0500 |
Hi Jörn, On 9/29/22 7:49 AM, Jörn Dreyer via
Tech-talk wrote:
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.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. HTH, - Andrew -- Complexity comes for free, Simplicity you have to work for. |