EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025 
<== Date ==> <== Thread ==>

Subject: Re: DBE_PROPERTY events
From: "Johnson, Andrew N. via Core-talk" <core-talk at aps.anl.gov>
To: Michael Davidsaver <mdavidsaver at gmail.com>, Zimoch Dirk <dirk.zimoch at psi.ch>
Cc: "core-talk at aps.anl.gov" <core-talk at aps.anl.gov>
Date: Thu, 29 Aug 2024 17:21:34 +0000

On 8/29/24, 10:11 AM, Michael Davidsaver via Core Talk wrote:

 

On 8/29/24 06:20, Zimoch Dirk via Core-talk wrote:
> Checking the EPICS base code, I found thus in dbPut():
>      /* If this field is a property (metadata) field,
>       * then post a property change event (even if the field
>       * didn't change).
>       */
>      if (precord->mlis.count && pfldDes->prop)
>          db_post_events(precord, NULL, DBE_PROPERTY);
>
> So this behavior is on purpose, but I wonder why.

This was an explicitly made technical shortcut to get this feature in.

dbCore has no mechanism for previous value tracking, with this instead being left
to individual record support to handle.  Doing otherwise would seem to require
keeping a uniform previous value for every field, or eg. somehow encoding an
association between value and previous value into the DBD.

The above code is inside the dbPut() routine that modifies the field being referred to, so earlier on it does have access to the old field value before the write happens, and to the new value after the write. Property fields (i.e. fields that have pfldDes->prop set to indicate they hold metadata) are all simple and can’t be arrays or double-buffered, so it might not be too hard to copy the old value before writing to it, then compare the new value afterwards to determine whether to post this change. The code that stores the old value and later compares it should only do those things for property fields when someone is monitoring this record (the condition in the if above), which should be a small overhead.

Thus I could see this as being possible, my analysis agrees with Dirk’s. I don’t have an objection to doing that as long as the measured performance isn’t significantly different.

- Andrew

-- 

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

 


Replies:
Re: DBE_PROPERTY events Zimoch Dirk via Core-talk
References:
DBE_PROPERTY events Zimoch Dirk via Core-talk
Re: DBE_PROPERTY events Michael Davidsaver via Core-talk

Navigate by Date:
Prev: Re: DBE_PROPERTY events Michael Davidsaver via Core-talk
Next: Build failed: EPICS Base 7 base-7.0-1293 AppVeyor via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025 
Navigate by Thread:
Prev: Re: DBE_PROPERTY events Michael Davidsaver via Core-talk
Next: Re: DBE_PROPERTY events Zimoch Dirk via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025 
ANJ, 30 Aug 2024 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·