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  <20092010  2011  2012  2013  2014  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  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: camonitor and caget - displaying unsigned longs in hexadecimal
From: Andrew Johnson <[email protected]>
To: Ralph Lange <[email protected]>, Eric Norum <[email protected]>
Cc: TECHTALK Tech-Talk <[email protected]>
Date: Mon, 7 Dec 2009 10:23:28 -0600
Eric Norum wrote:
>
> 1) I think that caget does not require the '-d LONG' since specifying -0x
> (or b or o) sets  type = DBR_LONG; anyway.

It might internally (I haven't looked at the code), but it doesn't display the 
result using 0x.  My experience matches Ernest's:

tux% cainfo anjHost:compressExample.N
anjHost:compressExample.N
    State:            connected
    Host:             tux:5064
    Access:           read, write
    Native data type: DBF_DOUBLE
    Request type:     DBR_DOUBLE
    Element count:    1
tux% caget -0x anjHost:compressExample.N
anjHost:compressExample.N      23
tux% caget -d LONG -0x anjHost:compressExample.N
anjHost:compressExample.N
    Native data type: DBF_DOUBLE
    Request type:     DBR_LONG
    Element count:    1
    Value:            0x17


> 2) The getopt format string in camonitor does have "d:" in it, but
> there's no corresponding "case 'd':'"statement in the following switch
> statement.  An oversight, perhaps? Could the option-handling code from
> caget.c be copied to camonitor.c?

That might trigger a question of how to display the results for the structured 
types.  Currently camonitor outputs one line per monitor event and only 
supports a limited number of data types with a fixed output format.  If we 
allow -d the tool would have to break one of those assumptions.  In this case 
I suspect making the -0 option always make DBR_LONG requests for a DBF_DOUBLE 
or DBF_FLOAT type would resolve this problem without needing us to add -d 
support.

Maybe Stephanie could work with Ralph (who maintains catools) to develop a 
solution?

- Andrew
-- 
The best FOSS code is written to be read by other humans -- Harald Welte


References:
camonitor and caget - displaying unsigned longs in hexadecimal Allison, Stephanie
Re: camonitor and caget - displaying unsigned longs in hexadecimal Eric Norum
Re: camonitor and caget - displaying unsigned longs in hexadecimal Ernest L. Williams Jr.

Navigate by Date:
Prev: Re: camonitor and caget - displaying unsigned longs in hexadecimal Ernest L. Williams Jr.
Next: Elcomat 3000 Pete R. Jemian
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: camonitor and caget - displaying unsigned longs in hexadecimal Ernest L. Williams Jr.
Next: asyn R4.10, R4.11, R4.12 Szalata, Zenon M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·