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: DBE_PROPERTY events
From: Zimoch Dirk via Core-talk <core-talk at aps.anl.gov>
To: "core-talk at aps.anl.gov" <core-talk at aps.anl.gov>
Date: Thu, 29 Aug 2024 10:20:47 +0000
Hi everyone

Today I came across some "strange" behavior of property monitors. A colleague
found that 'camonitor -m p' gives him four times as many updates as a normal
monitor on a certain record. Checking the record, I found that each time it
receives it value from the hardware, it gets updates for the alarm limits as
well which are stored in .LOLO .LOW .HIGH and .HIHI. They rarely ever change,
but nevertheless, each update causes a DBE_PROPERTY event.

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. The commit 6a6e527fc1 that
introduced this code also explicitly states:

Author: Michael Davidsaver <mdavidsaver at bnl.gov>
Date:   Mon Nov 4 13:39:17 2013 -0500

    post DBE_PROPERTY from dbPut()

    All writes to a prop(YES) field result
    in a monitor, even when the field value
    doesn't change.


Is this really the desired behavior for puts to property fields? It definitely
surprised me. The goal of DBE_PROPERTY was, to my understanding, to allow
clients to monitor property changes with a (significantly) lower rate than value
changes.

Unfortunately, I am unable to find the corresponding merge request which may
have contained some enlightening comments about the reasons.

Do others think too that property events should only be sent on change or is the
current behavior desired by everyone else?

Implementing such behavior is of course a bit tricky as a before-after
comparison (in dbPut only without changes to the records) needs to take
different field types and possibly conversions into account. (Luckily properties
can very likely be expected to be scalars for the foreseeable future, thus
limiting the require amount of buffer space for comparison.)  I am willing to
invest some effort into this, if nobody opposes such a change.

Dirk




Replies:
Re: DBE_PROPERTY events Ralph Lange via Core-talk
Re: DBE_PROPERTY events J. Lewis Muir via Core-talk
Re: DBE_PROPERTY events Michael Davidsaver via Core-talk

Navigate by Date:
Prev: Build completed: EPICS Base 7 base-7.0-1291 AppVeyor via Core-talk
Next: Re: DBE_PROPERTY events Ralph Lange 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: Build completed: EPICS Base 7 base-7.0-1291 AppVeyor via Core-talk
Next: Re: DBE_PROPERTY events Ralph Lange 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, 29 Aug 2024 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·