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  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: camonitor ignores format arguments for CHAR data
From: Andrew Johnson <[email protected]>
To: [email protected]
Date: Wed, 8 May 2013 12:53:39 -0500
Hi Stephanie & Eric,

On 2013-05-08 Allison, Stephanie wrote:
> And to DOUBLEs also?  I'd like to see my unsigned long fields as hex but
> they come in as DOUBLE due to CA.

We already provide separate options for that:

Floating point format:
...
  -lx:      Round to long integer and print as hex number
  -lo:      Round to long integer and print as octal number
  -lb:      Round to long integer and print as binary number

Eric Norum asked:
> Would it be reasonable to apply the '-0' options to CHAR types too?

It seems like it ought to be.  I started writing that we'd have to be careful 
because dbr_char_t is a typedef for char which might be signed or unsigned, 
but I looked and it's actually not, it's a typedef for epicsUInt8 which is 
always unsigned (epicsInt8 is also unsigned on some architectures).  However 
the val2str() routine in tool_lib.c that you quoted from is still questionable 
because it prints the DBR_CHAR value from a char variable ch, which is signed 
on some architectures...  Our handling of char values as signed or unsigned is 
unfortunately neither comprehensive nor correct (there is no 8-bit field type 
which will be signed on all architectures).

- Andrew
-- 
It is difficult to get a man to understand something, when his salary
depends upon his not understanding it. -- Upton Sinclair

References:
camonitor ignores format arguments for CHAR data Eric Norum
RE: camonitor ignores format arguments for CHAR data Allison, Stephanie

Navigate by Date:
Prev: RE: camonitor ignores format arguments for CHAR data Allison, Stephanie
Next: New version of STAR EPICS Virtual Machine Jiro Fujita
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: camonitor ignores format arguments for CHAR data Allison, Stephanie
Next: New version of STAR EPICS Virtual Machine Jiro Fujita
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·