Hi,
> Would it be reasonable to apply the '-0' options to CHAR types too?
And to DOUBLEs also? I'd like to see my unsigned long fields as hex but they come in as DOUBLE due to CA.
Thank you,
Stephanie Allison
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf
> Of Eric Norum
> Sent: Wednesday, May 08, 2013 9:54 AM
> To: [email protected] Talk
> Subject: camonitor ignores format arguments for CHAR data
>
> 'camonitor -h' reports:
>
> .....
> Integer number format:
> Default: Print as decimal number
> -0x: Print as hex number
> -0o: Print as octal number
> -0b: Print as binary number
>
>
> But attempting to use this with a UCHAR waveform record has no effect.
>
> $ camonitor -0x koherasE15test:BasiK:Register10
> koherasE15test:BasiK:Register10 2013-05-08 09:43:51.018324 28 126 0 103 78 0 0
> -59 0 8 95 0 0 0 0 -106 1 17 0 -1 0 -124 9 -72 47 -77 6 22 6
> koherasE15test:BasiK:Register10 2013-05-08 09:43:53.018341 28 126 0 105 78 0 0
> -59 0 8 95 0 0 0 0 -106 1 17 0 -1 0 -124 9 -72 47 -77 6 22 6
>
> is the the same as without the '-0x':
>
> $ camonitor koherasE15test:BasiK:Register10
> koherasE15test:BasiK:Register10 2013-05-08 09:43:19.010327 28 126 0 105 78 0 0
> -60 0 8 95 0 0 0 0 -106 1 17 0 -1 0 -124 9 -72 47 -77 6 22 6
> koherasE15test:BasiK:Register10 2013-05-08 09:43:21.010336 28 126 0 105 78 0 0
> -59 0 8 95 0 0 0 0 -106 1 16 0 -1 0 -124 9 -72 47 -77 6 22 6
>
>
> The code in R3.14.12/base/src/catools/ makes it clear why this is the case. The tool_lib.c
> code has
>
> switch (base_type) {
>
> .....
>
> case DBR_CHAR:
> ch = ((dbr_char_t*) val_ptr)[index];
> sprintf(str, "%d", ch);
> break;
> case DBR_INT:
> sprint_long(str, ((dbr_int_t*) val_ptr)[index], outTypeI);
> break;
> case DBR_LONG:
> sprint_long(str, ((dbr_long_t*) val_ptr)[index], outTypeI);
> break;
>
>
> Would it be reasonable to apply the '-0' options to CHAR types too?
> --
> Eric Norum
> [email protected]
- Replies:
- Re: camonitor ignores format arguments for CHAR data Andrew Johnson
- References:
- camonitor ignores format arguments for CHAR data Eric Norum
- Navigate by Date:
- Prev:
camonitor ignores format arguments for CHAR data Eric Norum
- Next:
Re: camonitor ignores format arguments for CHAR data Andrew Johnson
- 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
2023
2024
- Navigate by Thread:
- Prev:
camonitor ignores format arguments for CHAR data Eric Norum
- Next:
Re: camonitor ignores format arguments for CHAR data Andrew Johnson
- 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
2023
2024
|