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  <20202021  2022  2023  2024  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  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: get alias "real" name
From: "Johnson, Andrew N. via Tech-talk" <tech-talk at aps.anl.gov>
To: Alfio Rizzo <Alfio.Rizzo at ess.eu>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Thu, 29 Oct 2020 16:27:25 +0000
Hi Alfio,

On Oct 29, 2020, at 10:59 AM, Alfio Rizzo via Tech-talk <tech-talk at aps.anl.gov> wrote:

I was wondering if the the correct way to get the PV aliased name is to look at the .NAME field of its alias.
If I do 
Ø  pvget myalias.NAME
I should get the “real” PV name which the alias point to.
However this start to not be true if the length of the “real” PV name is > 39 chars ( <= 60 )
since the .NAME filed value is truncated to 39 chars (maybe  some limitation on DBR_STRING ?)  

That is indeed the expected way to get the canonical name, and I can use caget's long string support to fetch names that are longer than 39 characters:

woz$ caget this-is-a-very-long-pvname-prefix:BaseVersion.NAME
this-is-a-very-long-pvname-prefix:BaseVersion.NAME this-is-a-very-long-pvname-prefix:BaseV
woz$ caget -S this-is-a-very-long-pvname-prefix:BaseVersion.NAME$
this-is-a-very-long-pvname-prefix:BaseVersion.NAME$ this-is-a-very-long-pvname-prefix:BaseVersion

Unfortunately pvget doesn’t provide any equivalent to the -S flag of caget, and I’m not aware of any functionality in QSRV that can handle long strings properly at the server end (which would be the right place to handle this):

woz$ pvget this-is-a-very-long-pvname-prefix:BaseVersion.NAME
this-is-a-very-long-pvname-prefix:BaseVersion.NAME 2020-10-29 11:11:09.355  this-is-a-very-long-pvname-prefix:BaseV 
woz$ pvget this-is-a-very-long-pvname-prefix:BaseVersion.NAME$
this-is-a-very-long-pvname-prefix:BaseVersion.NAME$ 2020-10-29 11:11:09.355  [116,104,105,115,45,105,115,45,97,45,118,101,114,121,45,108,111,110,103,45,112,118,110,97,109,101,45,112,114,101,102,105,120,58,66,97,115,101,86,101,114,115,105,111,110,0]

There is an issue filed against QSRV for this, but nobody has proposed a good solution yet. Ideas and code contributions welcomed from any C++ developers out there!

- Andrew

-- 
Complexity comes for free, simplicity you have to work for.


References:
get alias "real" name Alfio Rizzo via Tech-talk

Navigate by Date:
Prev: get alias "real" name Alfio Rizzo via Tech-talk
Next: Re: Error in dbd/HPE3631Atest.dbd" line 12090 Johnson, Andrew N. 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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: get alias "real" name Alfio Rizzo via Tech-talk
Next: ArrayData read problem Jong Woo Kim 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  <20202021  2022  2023  2024 
ANJ, 29 Oct 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·