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: caget -d DBR_...INT doesn't work
From: Michael Davidsaver via Tech-talk <tech-talk at aps.anl.gov>
To: Érico Nogueira Rolim <erico.rolim at lnls.br>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Wed, 8 Nov 2023 10:13:05 -0800
On 11/8/23 05:45, Érico Nogueira Rolim via Tech-talk wrote:
Hi there!


This was an inconsistency I noticed in caget. The help output lists
multiple DBR_...INT types as options for caget's -d option, but none of
them work, because the dbr_text array from
modules/ca/src/client/access.cpp includes only DBR_...SHORT strings.
Would it be okay to simply remove the INT options from the help output
entirely? Or should the tool try and replace "INT" for "SHORT", similar
to how it adds "DBR_" when it doesn't find a match at first?

I had not noticed this before.  I guess because DOUBLE and LONG are much more common.


$ caget -d INT some:name
Requested dbr type out of range or invalid - ignored. ('caget -h' for help.)
...

Correcting the help message would be a good first step.


Somewhat related to that, it seems a bit confusing that some pieces of
code use DBR_INT instead of standardizing on DBR_SHORT.

DBR_INT == DBR_SHORT

https://github.com/epics-base/epics-base/blob/0bc6ff3d4c0c309cd76e91c6bacad33c7ec59e28/modules/ca/src/client/db_access.h#L57-L58

They are identical, and at this point serve as a confusing reminder that
epics-base originated in the era of 16-bit CPUs.


Would a patch moving everything to DBR_SHORT be of interest?

I think so.  Changing the usage anyway.  The definitions of DBF_INT and DBR_INT
need to remain.



Cheers,

Érico


Aviso Legal: Esta mensagem e seus anexos podem conter informações confidenciais e/ou de uso restrito. Observe atentamente seu conteúdo e considere eventual consulta ao remetente antes de copiá-la, divulgá-la ou distribuí-la. Se você recebeu esta mensagem por engano, por favor avise o remetente e apague-a imediatamente.

Disclaimer: This email and its attachments may contain confidential and/or privileged information. Observe its content carefully and consider possible querying to the sender before copying, disclosing or distributing it. If you have received this email by mistake, please notify the sender and delete it immediately.


Replies:
Re: caget -d DBR_...INT doesn't work Ralph Lange via Tech-talk
References:
caget -d DBR_...INT doesn't work Érico Nogueira Rolim via Tech-talk

Navigate by Date:
Prev: RE: [EXTERNAL] CS-Studio XY Graph problem with >2046 samples Heesterman, Peter via Tech-talk
Next: AW: ADPerkinElmer Bad Pixel Files Sintschuk, Michael 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: caget -d DBR_...INT doesn't work Érico Nogueira Rolim via Tech-talk
Next: Re: caget -d DBR_...INT doesn't work Ralph Lange 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, 09 Nov 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·