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  <20202021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: DBR_VFIELD and complex field types
From: Ralph Lange via Core-talk <core-talk at aps.anl.gov>
To: EPICS Core Talk <core-talk at aps.anl.gov>
Date: Tue, 9 Jun 2020 09:33:18 +0200
Hi Michael,

Before looking closer at the implementation, I would like to understand what you are trying to achieve.
So: What are you trying to achieve?

Thanks a lot,
~Ralph


On Tue, 9 Jun 2020 at 01:19, Michael Davidsaver via Core-talk <core-talk at aps.anl.gov> wrote:
I'd like to ask for some review of an idea I've been trying out
(funding courtesy of ESS) to be able to usefully represent
complex types as database fields.  My immediate application is
to the PVA data containers shared_vector and PVStructure,
although there are others.

The way I've done this works, but wasn't my first idea.  I won't
call it a hack, but it's not far removed.  So I'm open to alternate
ways to accomplish this.  (though I do think a solution is needed)

In short, I add a new DBR_VFIELD to the database module without
adding any DBF_* code.  A short (and ugly) usage example is:

> DBADDR *paddress = ...;
> shared_vector<const void> aval;
> struct VField {
>     const VFieldType *vtype;
>     shared_vector<const void> *aval;
> } varg = {&vfSharedVector, &aval};
> dbGet(paddress, DBR_VFIELD, NULL, &varg, NULL);


This project involved changes to multiple modules in order to make
something testable.  Even the changes to Base come in two parts.
Each has accompanying discussion.

1. Add alarm message and time tag to dbCommon in Base

Not directly related to DBR_VFIELD, but adds an alarm
message string, and time tag a la. PVA.  Also, adds
a 'utag' server side filter which can apply a bitmask
to the time tag.

https://github.com/epics-base/epics-base/pull/71

2. Add DBR_VFIELD in Base

Also adds a new stdstringinRecord type as an example.

https://github.com/mdavidsaver/epics-base/pull/1

3. Apply DBR_VFIELD to QSRV

Adds svectorinRecord where VAL is shared_vector<const void>
aka reference counted pointer to an immutable array.

https://github.com/mdavidsaver/pva2pva/pull/3

4. Add device support for svectorinRecord to a driver

I picked this TCP socket based driver mainly because
I created a easy simulator.  The driver is changed to
use shared_vector internally instead of copying arrays.

https://github.com/mdavidsaver/pscdrv/pull/1


The end result is driver which handles waveform data more
efficiently, and can also pass a time tag from the (simulated)
device, which can then be used to filter out some monitor updates
(eg. beam vs. no beam).

Replies:
Re: DBR_VFIELD and complex field types Michael Davidsaver via Core-talk
References:
DBR_VFIELD and complex field types Michael Davidsaver via Core-talk

Navigate by Date:
Prev: DBR_VFIELD and complex field types Michael Davidsaver via Core-talk
Next: [Bug 1882520] Re: Constant arrary input links of size 1 don't work Dirk Zimoch via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: DBR_VFIELD and complex field types Michael Davidsaver via Core-talk
Next: Re: DBR_VFIELD and complex field types Michael Davidsaver via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 09 Jun 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·