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

Subject: Re: PVXS programmatically create pvalinks
From: Michael Davidsaver via Tech-talk <tech-talk at aps.anl.gov>
To: Dave Bracey <dbracey at fnal.gov>, "Kasemir, Kay" <kasemirk at ornl.gov>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Tue, 10 Jun 2025 12:16:16 -0700
On 6/10/25 07:53, Dave Bracey via Tech-talk wrote:
It’s unclear to me why the PVXS documentation gives details of programmatically creating clients and servers as its only examples.

Just legacy and documentation (lack of) organization.  There is also a question
of scope.  And of course the fact that, as with some much OSS documentation, it
was originally written by an expert (me) for an expert (also me).

I would welcome help to reorganize the PVXS documentation, and to add cross-links.
Input, and PRs, from new(er) users would really help bring a prospective which I
have a hard time remembering.


PVXS contains two components.  The low level PVA network library (libpvxs.so),
and the higher level process database integration (libpvxsIoc.so).

The one came before the other.  Was documented first historically, and appears
at the top in the documentation tree.

There is also a question of scope.  PVXS only provides extensions to the
process database engine implemented by epics-base.  So it does not, for
example, document the DB file syntax.  Nor the record types.  Only the PVXS
specific extension points.



  These are actually only last resorts?

"last resort" may be a bit harsh, but in this instance I think it is accurate.
I think you would do well to study some existing EPICS drivers, and how they
use the device support API to achieve scalability.

You might find my "Basic EPICS Device Support" interesting.  (based on notes I
took when I was first learning)

https://urldefense.us/v3/__http://mdavidsaver.github.io/epics-doc/__;!!G_uCfscf7eWS!bGzMWUpwXyOlvdBge21xCFmCLUrvtAtWJtnMD-ePfiQMK9FO0yWzR81zafsG5nPLyXzoSY7WDagUrnV5JobJpe_0qg$

https://urldefense.us/v3/__https://epics-base.github.io/pvxs/example.html__;!!G_uCfscf7eWS!bGzMWUpwXyOlvdBge21xCFmCLUrvtAtWJtnMD-ePfiQMK9FO0yWzR81zafsG5nPLyXzoSY7WDagUrnV5JoZHAgooDA$  <https://urldefense.us/v3/__https://epics-base.github.io/pvxs/example.html__;!!G_uCfscf7eWS!eGDXNfdnpzOr3EuT-y03uY07LjysjThtNjiLarWtbQPe1ZVP25XlvPIPpYCdNiAK93L5kXGzhjFVErrRndbvwh8$>

PVXS looks to me like a modern and interesting implementation of EPICS, and it would be disappointing to me if this code was not a viable path.

Kay already mentioned, but I think it is worth emphasizing.

PVXS is not an implementation of, nor a replacement for, epics-base.

PVXS plugs into extension interfaces defined in epics-base


*From: *Kasemir, Kay <kasemirk at ornl.gov>
*Date: *Tuesday, June 10, 2025 at 9:26 AM
*To: *Dave Bracey <dbracey at fnal.gov>
*Cc: *tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
*Subject: *Re: PVXS programmatically create pvalinks

[EXTERNAL] – This message is from an external sender

Suppose I programmatically create two PV’s on a server:


Can I somehow make pv1 INP linked to pv2?

PVXS is just the network protocol layer.

“INP” links are an EPICS database concept.

If you want to use records, and that’s the common thing to do, you create an EPICS database and execute that with `softIocPVX` or a custom IOC setup that includes PVXS. You can now access those records via PVAccess (or also channel access).

In special cases, you might not be able to use records and instead implement some custom code which you then make network-accessible via PVAccess. You can use C++ and PVXS, or python and p4p. In any case, there won’t be “INP” links because there are no records. Ther are also no “SCAN” fields. You need to start your own threads to periodically update the PVs you want to serve. You need to implement whatever you want to happen in your own code.

Start out by trying to use the EPICS IOC.

If you can’t handle the task at hand with plain ai, ao, calc, … records, maybe add some aSub records to call into bespoke C/C++ code.

Writing your own custom PVAccess server should be your last choice.

*From: *Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Dave Bracey via Tech-talk <tech-talk at aps.anl.gov>
*Date: *Tuesday, June 10, 2025 at 10:17 AM
*To: *Michael Davidsaver <mdavidsaver at gmail.com>
*Cc: *tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
*Subject: *[EXTERNAL] Re: PVXS programmatically create pvalinks

Thanks Michael – couple questions: Q1: Suppose I programmatically create two PV’s on a server: Value val1 = nt: : NTScalar(TypeCode: : Int32, true). create(); server: : SharedPV pv1 = server: : SharedPV: : buildMailbox(); string pv1name = "PV1";

Thanks Michael – couple questions:

Q1:

Suppose I programmatically create two PV’s on a server:

   Value val1= nt::NTScalar(TypeCode::Int32, true).create();

   server::SharedPV pv1 = server::SharedPV::buildMailbox();

   string pv1name= "PV1";

   pv1.open(val1);

   ioc::server().addPV(pv1name, pv1);

   Value val2= nt::NTScalar(TypeCode::Int32, true).create();

server::SharedPV pv2 = server::SharedPV::buildMailbox();

   string pv2name= "PV2";

pv2.open(val2);

ioc::server().addPV(pv2name, pv2);

Can I somehow make pv1 INP linked to pv2?

Q(s)2:

I notice if I try to use dbFindRecord on those names, they are not found.  Is this because they have no database records?  Are “Value”, “PV” and “Record” distinct concepts here?  Can a record be attached to them programmatically?

Q(s)3:

Is doing these things programmatically a bad idea here?  In other words, have I reached the extent of what it can do ATM, and I should go back to importing DBD’s?

Thanks –

Dave Bracey, Fermilab

*From: *Michael Davidsaver <mdavidsaver at gmail.com>
*Date: *Monday, June 9, 2025 at 9:27 PM
*To: *Dave Bracey <dbracey at fnal.gov>
*Cc: *tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
*Subject: *Re: PVXS programmatically create pvalinks

[EXTERNAL] – This message is from an external sender

On 6/5/25 11:13, Dave Bracey via Tech-talk wrote:

I have an application that programmatically creates PV’s using pvxs::ioc::server (based on the examples at https://urldefense.us/v3/__https://epics-base.github.io/pvxs/example.html__;!!G_uCfscf7eWS!bGzMWUpwXyOlvdBge21xCFmCLUrvtAtWJtnMD-ePfiQMK9FO0yWzR81zafsG5nPLyXzoSY7WDagUrnV5JoZHAgooDA$ <https://urldefense.proofpoint.com/v2/url? u=https-3A__urldef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any way to create links between these PV’s?

As a note,

    I notice that fields that implement timestamp, alarms, display units, etc are implemented in nt.cpp with explicit name strings, and I don’t see anything relevant to links.

nt.cpp is relevant for servers, not PVA links specifically nor PVA clients in general.  PVA link is one specific PVA client which knows how to read/write certain PVA structures to certain types of database record field.

    If this is not implemented, I suppose one would build a DB file and call dbLoadRecords on it?  If one does that, can those PV’s reference PV’s created created programmatically?

Speaking of "links" generally refers to the process database feature, which is implemented for database records.  Both CA and PVA links can target local or remote PVs.  This local vs. remote distinction is meant to be mostly abstracted from the prospective of someone writing database files.

https://urldefense.us/v3/__https://epics-base.github.io/pvxs/ioc.html*pvaccess-links__;Iw!!G_uCfscf7eWS!bGzMWUpwXyOlvdBge21xCFmCLUrvtAtWJtnMD-ePfiQMK9FO0yWzR81zafsG5nPLyXzoSY7WDagUrnV5JoaKUuQ3Xg$ <https://urldefense.proofpoint.com/v2/url?u=https-3A__urldefense.us_v2_url-3Fu-3Dhttps-2D3A-5F-5Furldefense.proofpoint.com-5Fv2-5Furl-2D3Fu-2D3Dhttps-2D2D3A-2D5F-2D5Fepics-2D2D2Dbase.github.io-2D5Fpvxs-2D5Fioc.html-2D2D23pvaccess-2D2D2Dlinks-2D26d-2D3DDwMFaQ-2D26c-2D3DgRgGjJ3BkIsb5y6s49QqsA-2D26r-2D3D-2D2DF5ElEx0xTIzUkth-2D5F6VDnd86lqN2rUgF0GIN-2D2DS3DMY4-2D26m-2D3D6-2D2DV8ArEDsLH4VCiF0Szog7n440bs5T7xIipxtcz-2D2DuMwQNhwR1SqYXcHO5RyJ4KKN-2D26s-2D3Dj8g2-2D5Flht5C2XvzFs9vVp9IHQrR-2D5F1R3zjZoQEBxcwkwA-2D26e-2D3D-26d-3DDwMGaQ-26c-3Dv4IIwRuZAmwupIjowmMWUmLasxPEgYsgNI-2DO7C4ViYc-26r-3D8RMagXS5oBauLyLs1HfVUTdnjjuRYthZ97c5pPc4pBQ-26m-3DDj5U3fQRYJ899CFArAYelgbiHLTwr6Bz2kWu7B5AU9YKRZVnwqFEhAguc4L0TuoX-26s-3DtTNziQejOVYCXKNCkLxH0lHKhmmHqGFXSmHm-5FjiUH-5Fk-26e-3D&d=DwMFaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=-F5ElEx0xTIzUkth_6VDnd86lqN2rUgF0GIN-S3DMY4&m=j6YNyt1g_lUTC2vaGDrxrcS68fTC64Hcmb0B0NoLVwuB01r35hWQMHoNL7iKLM5-&s=xHc- OvCarZa6NYyzun_0_FJk1PDboC1hE2_409VaMEg&e=>



References:
PVXS programmatically create pvalinks Dave Bracey via Tech-talk
Re: PVXS programmatically create pvalinks Michael Davidsaver via Tech-talk
Re: PVXS programmatically create pvalinks Dave Bracey via Tech-talk
Re: PVXS programmatically create pvalinks Kasemir, Kay via Tech-talk
Re: PVXS programmatically create pvalinks Dave Bracey via Tech-talk

Navigate by Date:
Prev: RE: Update IOC with pushed data Mark Rivers via Tech-talk
Next: Re: Update IOC with pushed data Michael Davidsaver 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  <2025
Navigate by Thread:
Prev: Re: PVXS programmatically create pvalinks Florian Feldbauer via Tech-talk
Next: How to update combo box items with subset of PV items Alessandra Palazzo 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  <2025
ANJ, 10 Jun 2025 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·