On 2/26/09 7:23 PM, Ralph Lange wrote:
> Hi,
>
> In general I would second Andrew's statement. Looping over CA command
> line tool calls would be bad behaviour in terms of CA.
Hi, Ralph.
I agree w/ Andrew's statement too, but I think it just depends on what
Carl is trying to do. I think sometimes using caget (and other command
line tools) for scripting is fine for the job. Maybe I want to write
something very quickly that will poll the IOC via caget once every 5
minutes saving the result to a file. Or maybe I want to pass that caget
output to another program to do something else.
Even though caget and friends are designed for human consumption, if
the change is not that hard to make, I think it's worth it to enable the
output to be easily parsed.
> I have to admit, though, that arrays of strings with embedded spaces
> break one of the command line tools' underlying ideas: caput understands
> the caget return value of the same PV.
>
> So, an command line option to change the separator could be a feasible
> solution, or quoting those strings, or both. Any preferences?
Is there a character that is not allowed to appear in an EPICS
string...perhaps the null character (\000)?
Assuming there is such a character (and I know, sometimes such a
character is not necessary - it's good enough to know that the chosen
separator will not appear in just the strings to be returned), then I
vote for a command line option to change the separator because it's
simple and easy to parse.
Quoted strings would be a pain from a scripting point of view because
parsing becomes more difficult. One can't just split the "input" on
some delimiter.
Thanks,
Lewis
- References:
- caget with an array of space-containing strings Carl Schumann
- Re: caget with an array of space-containing strings J. Lewis Muir
- Re: caget with an array of space-containing strings Ralph Lange
- Navigate by Date:
- Prev:
Re: Record Initialization Dirk Zimoch
- Next:
Re: caget with an array of space-containing strings 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:
Re: caget with an array of space-containing strings Ralph Lange
- Next:
Re: caget with an array of space-containing strings 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
|