Experimental Physics and Industrial Control System
|
It’s unclear to me why the PVXS documentation gives details of programmatically creating clients and servers as its only examples. These are actually only last resorts?
https://epics-base.github.io/pvxs/example.html
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.
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:
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://epics-base.github.io/pvxs/ioc.html#pvaccess-links
|
- Replies:
- Re: PVXS programmatically create pvalinks Florian Feldbauer via Tech-talk
- Re: PVXS programmatically create pvalinks Michael Davidsaver via Tech-talk
- 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
- Navigate by Date:
- Prev:
Re: PVXS programmatically create pvalinks Kasemir, Kay via Tech-talk
- Next:
Re: PVXS programmatically create pvalinks Florian Feldbauer 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 Kasemir, Kay via Tech-talk
- Next:
Re: PVXS programmatically create pvalinks Florian Feldbauer 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 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
·
Download
·
Search
·
IRMIS
·
Talk
·
Documents
·
Links
·
Licensing
·
|