Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20192020  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  <20192020 
<== Date ==> <== Thread ==>

Subject: Re: Camonitor with client dictated update rate
From: Hinko Kocevar via Tech-talk <tech-talk@aps.anl.gov>
To: "Johnson, Andrew N." <anj@anl.gov>, Emanuele Laface <emanuele.laface@esss.se>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Mon, 1 Jul 2019 09:47:53 +0000
Thanks for the heads up Andrew!
//hinko
________________________________________
From: Johnson, Andrew N. <anj@anl.gov>
Sent: Friday, June 28, 2019 10:05:40 PM
To: Hinko Kocevar; Emanuele Laface
Cc: tech-talk@aps.anl.gov
Subject: Re: Camonitor with client dictated update rate

Hi Hinko,

There is a memory leak in the version of the decimation filter I sent out, due to my not completely understanding the filter API (and to a similar bug in the sync filter). An IOC that runs this filter much may eventually run out of memory. Please apply this change to my original code to fix the problem:

diff --git a/src/std/filters/decimate.c b/src/std/filters/decimate.c
index d34884e..502422f 100644
--- a/src/std/filters/decimate.c
+++ b/src/std/filters/decimate.c
@@ -63,6 +63,8 @@ static db_field_log* filter(void* pvt, dbChannel *chan, db_field_log *pfl) {

     if (i++ == 0)
         passfl = pfl;
+    else
+        db_delete_field_log(pfl);

     if (i >= my->n)
         i = 0;

- Andrew


On 6/10/19 10:46 AM, Andrew Johnson wrote:
On 6/10/19 8:34 AM, Hinko Kocevar wrote:

FYI, Andrew, I have not changed a single line of code for the decimate.c, when I deployed IOC for the system that uses this new filter. Can we expect it to appear in next EPICS base code so that we do not have to maintain it outside the vanilla sources?


I added documentation and test code and created a merge request<https://code.launchpad.net/~anj/epics-base/+git/base-3.15/+merge/368347> for it last week for the 3.15 branch of Base, so unless the other core developers object it should make it into the next releases of both 3.15.x and 7.0.x. IIRC I only made one minor change to the code to make it slightly more robust, without changing any functionality.

- Andrew.


--
Complexity comes for free, Simplicity you have to work for.



References:
Camonitor with client dictated update rate Hinko Kocevar via Tech-talk
Re: Camonitor with client dictated update rate William Layne via Tech-talk
Re: Camonitor with client dictated update rate Hinko Kocevar via Tech-talk
Re: Camonitor with client dictated update rate Matt Newville via Tech-talk
Re: Camonitor with client dictated update rate Emanuele Laface via Tech-talk
Re: Camonitor with client dictated update rate Johnson, Andrew N. via Tech-talk
Re: Camonitor with client dictated update rate Emanuele Laface via Tech-talk
Re: Camonitor with client dictated update rate Hinko Kocevar via Tech-talk
Re: Camonitor with client dictated update rate Emanuele Laface via Tech-talk
Re: Camonitor with client dictated update rate Hinko Kocevar via Tech-talk
Re: Camonitor with client dictated update rate Johnson, Andrew N. via Tech-talk
Re: Camonitor with client dictated update rate Johnson, Andrew N. via Tech-talk

Navigate by Date:
Prev: Re: [EXTERNAL] Beckhoff BK9000 support survey Hinko Kocevar via Tech-talk
Next: Re: [EXTERNAL] Beckhoff BK9000 support survey 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  <20192020 
Navigate by Thread:
Prev: Re: Camonitor with client dictated update rate Johnson, Andrew N. via Tech-talk
Next: Deadlock in PCAS Till Straumann 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  <20192020 
ANJ, 01 Jul 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·