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 | 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: alarm hook |
From: | Andrew Johnson <[email protected]> |
To: | "Liyu, Andrei" <[email protected]> |
Cc: | Matthias Clausen <[email protected]>, Geoff Savage <[email protected]>, EPICS core-talk <[email protected]>, "Zhukov, Alexander P." <[email protected]> |
Date: | Mon, 19 Jun 2006 17:58:51 -0500 |
Hi Andrei,You will be able to reimplement your logging code using the hook I am proposing. The routine called via the the recGblAlarmHook pointer is passed the *previous* values for the record's alarm status and severity as parameters, and can get the new values directly from the record's prec->stat and prec->sevr fields. Thus all the same information is available to the hook routine as was available where you inserted the changes in your modified version.
The aim of providing hooks like this is so that those sites that are not interested in functionality such as logging alarms are not significantly penalized, but users like you who want to do so are able to hook the IOC into their logging subsystem without having to make any changes to the source code of Base at all.
- Andrew -- Not everything that can be counted counts, and not everything that counts can be counted. -- Albert Einstein