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

Subject: Re: Get the type of a PV in C++ API
From: Ralph Lange via Tech-talk <tech-talk at aps.anl.gov>
To: Tech Talk <tech-talk at aps.anl.gov>
Date: Thu, 2 Nov 2023 15:01:58 +0100
Not an answer to your question, but...

That library you are using is part of the first generation of user-facing libraries.
Meanwhile, there's a second generation (both for C++ and Java) with more modern and language-specific API designs. Better usability, easier to work with, better performance.
These second-generation libraries are stable; they will be replacing the older generation.
For your use case: The C++ second-generation library is called PVXS - https://mdavidsaver.github.io/pvxs/

For any new development - please start there. It will save you from migrating your application at some point in the near future.

Cheers,
~Ralph


On Thu, 2 Nov 2023 at 12:46, Eusebio Naif Al-Soliman Fuentes via Tech-talk <tech-talk at aps.anl.gov> wrote:
Hello everybody.
 
I have a small question. In the pvaClient library for C++ (https://docs.epics-controls.org/projects/pvaclient-cpp/en/latest/) there are many examples to get the value and other fields of a PV.
 
However, in order to get the value as a double, like in this example https://github.com/epics-rip/exampleCPP/blob/master/exampleClient/src/examplePvaClientGet.cpp, you have to previously know that the PV value is a double. Is there any method to get the type (int, long, double...) of the value field? Something like ->getType().
 
Thanks in advance.
--

Saludos/Best regards

University of Granada  

Eusebio Naif Al-Soliman Fuentes
MSc. Data Science and Computer Engineering

eunaif at correo.ugr.es


Replies:
Re: Get the type of a PV in C++ API Eusebio Naif Al-Soliman Fuentes via Tech-talk
References:
Get the type of a PV in C++ API Eusebio Naif Al-Soliman Fuentes via Tech-talk

Navigate by Date:
Prev: Get the type of a PV in C++ API Eusebio Naif Al-Soliman Fuentes via Tech-talk
Next: Linux distribution suggestion for EPICS Vincent van Beveren 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  <20232024 
Navigate by Thread:
Prev: Get the type of a PV in C++ API Eusebio Naif Al-Soliman Fuentes via Tech-talk
Next: Re: Get the type of a PV in C++ API Eusebio Naif Al-Soliman Fuentes 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  <20232024 
ANJ, 03 Nov 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·