EPICS Controls 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  2019  2020  2021  2022  2023  2024  <20252026  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  <20252026 
<== Date ==> <== Thread ==>

Subject: Re: Waveform VAL fields in newer versions of EPICS
From: Michael Davidsaver via Tech-talk <[email protected]>
To: "Baily, Scott A" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Wed, 8 Oct 2025 07:15:21 -0700
Hi Scott,

On 10/7/25 16:19, Baily, Scott A via Tech-talk wrote:

In EPICS 3.14.12 IOCs running the command dba <waveformrecordname> returned a field address that was the same as the BPTR field of the waveform record.

In EPICS 3.15.9 and epics 7, this is no longer the case.  The dba command gets its information by calling dbNameToAddr as is proper for an SPC_DBADDR field, this should give the actual location of the VAL field contents.  In 3.14.12 this address is also stored in the BPTR field.  It appears that dbNameToAddr no longer results in paddr->pfield pointing to the contents of the VAL field.  Is this expected behavior? If so, how should one obtain the contents of SPC_DBADDR field? I assume this is available (for this specific case) if BPTR were directly referenced, but this doesn’t seem like the proper method. 

In general, I would recommend looking to dbGet() / dbPut() as the canonical examples of how to interact with dbAddr.  Beginning with 3.15.0.1, it became allowed for a rset::get_array_info callback to modify dbAddr::pfield.


   /* Update field info from record (if necessary);
     * may modify paddr->pfield.
     */
    if (!dbfl_has_copy(pfl) &&
        paddr->pfldDes->special == SPC_DBADDR &&
        (prset = dbGetRset(paddr)) &&
        prset->get_array_info) {
        status = prset->get_array_info(paddr, &no_elements, &offset);

https ://github.com/epics-base/epics-base/blob/7444936a22c00a8776f3bba9bed84acf91801b1c/modules/database/src/ioc/db/dbAccess.c#L932-L939


An example from aaiRecord.c

static long get_array_info(DBADDR *paddr, long *no_elements, long *offset)
{
    aaiRecord *prec = (aaiRecord *)paddr->precord;

    paddr->pfield = prec->bptr;
    *no_elements =  prec->nord;
    *offset = 0;
    return 0;
}

https ://github.com/epics-base/epics-base/blob/7444936a22c00a8776f3bba9bed84acf91801b1c/modules/database/src/std/rec/aaiRecord.c#L221



References:
Waveform VAL fields in newer versions of EPICS Baily, Scott A via Tech-talk

Navigate by Date:
Prev: Re: [EXTERNAL] Re: EPICS CA and PVA across subnets Kasemir, Kay via Tech-talk
Next: Intermittent memory issues - codec.cpp:1135: std::bad_alloc Peiyun Shi 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  2019  2020  2021  2022  2023  2024  <20252026 
Navigate by Thread:
Prev: Waveform VAL fields in newer versions of EPICS Baily, Scott A via Tech-talk
Next: Python script to set start & end time of data browser Vishnu Patel 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  2019  2020  2021  2022  2023  2024  <20252026 
ANJ, 19 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·