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